Page MenuHomeSoftware Heritage

Phabricator sends triplicate mails
Closed, MigratedEdits Locked

Description

Some system administrators report phabricator is sending them triplicate mails.

From looking at a postfix log this looks like a local alias issue:

Sep 18 09:15:09 tate postfix/smtpd[30535]: 0C5E720246: client=unknown[192.168.100.29]
Sep 18 09:15:09 tate postfix/cleanup[30432]: 0C5E720246: message-id=<d9758c8e5607726f5f8248ca3c657631@localhost.localdomain>
Sep 18 09:15:09 tate postfix/qmgr[1042]: 0C5E720246: from=<phabricator@tate.softwareheritage.org>, size=4455, nrcpt=1 (queue active)
Sep 18 09:15:09 tate postfix/local[30537]: 0C5E720246: to=<phabricator@tate.softwareheritage.org>, orig_to=<forge@forge.softwareheritage.org>, relay=local, delay=0.1, delays=0/0/0/0.1, dsn=2.0.0, status=sent (delivered to command: /srv/phabricator/phabricator/scripts/mail/mail_handler.php)
Sep 18 09:15:09 tate postfix/cleanup[30432]: 2529F204F6: message-id=<d9758c8e5607726f5f8248ca3c657631@localhost.localdomain>
Sep 18 09:15:09 tate postfix/local[30537]: 0C5E720246: to=<phabricator@tate.softwareheritage.org>, orig_to=<forge@forge.softwareheritage.org>, relay=local, delay=0.1, delays=0/0/0/0.1, dsn=2.0.0, status=sent (forwarded as 2529F204F6)
Sep 18 09:15:09 tate postfix/qmgr[1042]: 2529F204F6: from=<phabricator@tate.softwareheritage.org>, size=4613, nrcpt=4 (queue active)
Sep 18 09:15:09 tate postfix/qmgr[1042]: 0C5E720246: removed
Sep 18 09:15:09 tate postfix/smtp[30439]: 2529F204F6: to=<$admin1>, orig_to=<forge@forge.softwareheritage.org>, relay=smtp.inria.fr[192.134.164.146]:25, delay=0.02, delays=0/0/0/0.01, dsn=2.0.0, status=sent (250 ok:  Message 402274990 accepted)
Sep 18 09:15:09 tate postfix/smtp[30439]: 2529F204F6: to=<$admin2>, orig_to=<forge@forge.softwareheritage.org>, relay=smtp.inria.fr[192.134.164.146]:25, delay=0.02, delays=0/0/0/0.01, dsn=2.0.0, status=sent (250 ok:  Message 402274990 accepted)
Sep 18 09:15:09 tate postfix/smtp[30439]: 2529F204F6: to=<$admin3>, orig_to=<forge@forge.softwareheritage.org>, relay=smtp.inria.fr[192.134.164.146]:25, delay=0.02, delays=0/0/0/0.01, dsn=2.0.0, status=sent (250 ok:  Message 402274990 accepted)
Sep 18 09:15:09 tate postfix/smtp[30439]: 2529F204F6: to=<$admin4>, orig_to=<forge@forge.softwareheritage.org>, relay=smtp.inria.fr[192.134.164.146]:25, delay=0.02, delays=0/0/0/0.01, dsn=2.0.0, status=sent (250 ok:  Message 402274990 accepted)
Sep 18 09:15:09 tate postfix/qmgr[1042]: 2529F204F6: removed

I'm not really sure why phabricator sends itself emails in the first place but here goes...

I've tried to fix the alias syntax, we'll see how much mail this task generates.

Revisions and Commits

Event Timeline

olasd triaged this task as Normal priority.Sep 18 2019, 11:31 AM
olasd created this task.

I can confirm that:

  • since the "forge email address" (forge@softwareheritage.org) has been fixed at gandi to forward emails back to the forge (T1965), phabricator emails got duplicated for some users

After investigating:

  • it turns out that phabricator is copying all outbound mails to that email address
  • no user has that email address set up, so it's apparently really a phabricator-internal thing
  • I couldn't find a config knob to disable that feature

therefore:

  • all outbound mails get processed again as inbound mails by phabricator (and apparently ignored)
  • the buggy alias also copied all inbound phabricator mails to root, therefore duplicating them for all sysadmins

finally:

  • the committed alias fix separately stops tate from forwarding all forge mail to sysadmins; it'll also stop us receiving all email replies to tickets, which was a behavior that I had noticed but never really tracked down

I'll look a bit further into why all outbound mails get copied to the From address, because that's not a very sensible behavior.