Page MenuHomePhabricator

Can't send email to bugs@phabricator.com to create a task
Closed, ResolvedPublic

Description

I've tried multiple times, before and after confirming my email in phabricator, but still can't create tasks using email.

Relevant log lines from my MTA:

Dec 22 12:20:51 nospam postfix/smtpd[21824]: E1E705E5F9: client=localhost[127.0.0.1]
Dec 22 12:20:51 nospam postfix/cleanup[21907]: E1E705E5F9: 
  message-id=<1443423814.359115.1419268845590.JavaMail.zimbra@nichework.com>
Dec 22 12:20:51 nospam postfix/qmgr[19571]: E1E705E5F9: from=<mah@nichework.com>,
  size=2313, nrcpt=1 (queue active)
Dec 22 12:20:51 nospam postfix/smtp[22422]: BB0525E383: to=<bugs@phabricator.com>,
  relay=127.0.0.1[127.0.0.1]:10024, delay=0.22, delays=0.01/0/0.01/0.21, dsn=2.6.0,
  status=sent (250 2.6.0 Ok, id=22113-07, from MTA: 250 2.0.0 Ok: queued as E1E705E5F9)
Dec 22 12:20:52 nospam postfix/smtp[21929]: E1E705E5F9: to=<bugs@phabricator.com>,
  relay=mxa.mailgun.org[50.56.21.178]:25, delay=0.59, delays=0.04/0/0.2/0.35, dsn=2.0.0,
  status=sent (250 Great success)
Dec 22 12:20:52 nospam postfix/qmgr[19571]: E1E705E5F9: removed

Created here because of failures on WMF's phabricator (https://phabricator.wikimedia.org/T1077).

Is there any more information needed here?

Event Timeline

hexmode raised the priority of this task from to Needs Triage.
hexmode updated the task description. (Show Details)
hexmode added a project: Maniphest.
hexmode added a subscriber: hexmode.
Your email to Phabricator was not processed, because an error occurred while
trying to handle it:

Phabricator is not able to process this mail because more than one application
is willing to accept it, creating ambiguity. Mail needs to be accepted by
exactly one receiving application.

Accepting receivers: ConpherenceCreateThreadMailReceiver,
ManiphestCreateMailReceiver.

They have a user named bugs then.

Was just about to post that. A couple more things in the email I got:
Your email to Phabricator was not processed, because an error occurred while
trying to handle it:

Phabricator is not able to process this mail because more than one application
is willing to accept it, creating ambiguity. Mail needs to be accepted by
exactly one receiving application.

Accepting receivers: ConpherenceCreateThreadMailReceiver,
ManiphestCreateMailReceiver.

-- Original Message Body -----------------------------------------------------

Is there a problem?

-- Original Message Headers --------------------------------------------------

to: bugs@phabricator.com
from: "Mark A. Hershberger" <mah@nichework.com>
subject: testing my email sending to create bugs

...we also have a user named 'bugs' on this instance.

@hexmode - i think in your instance its actually going to be a user named 'task'.

Its username@instance.url... I think y'all have username task and task@instance.url -> create maniphest task setup./

Note that WMF's phabricator doesn't send me replies, it just silently fails.

Want to give me a login on your instance? Otherwise all these links just ask me to login.

Long story short, the task mail receiver and the conpherence mail receiver both think they can handle the email as the error message says. The task mail receiver is a configurable string; the conpherence mail receiver is any username.

On this instance, where the problem reproduces, the issue is we have maniphest set to 'bugs@' and we have a user 'bugs'.

There's some fun possibilities around disabled / deactivated accounts here. e.g. I am not sure if a non-active account would appear as a 404 when trying to view it from the web while still tripping the mail receiver code... etc.

If you have an account on MediaWiki.org (any Wikipedia account should work) then you can use that.

I renamed the bugs user here, and test email now works. I presume we should at least restrict people from registering magical email addresses.

@qgil - can you or another administrator verify that the account 'task' does not exist in any form on your instance? I think you have a deactivated or disabled user named task.

In terms of fixing at least this identified cause, there would like need to be a small code change around how we load users in this code path - basically filter out deactivated / disabled ones - and then here on Phabricator we would just disable the 'bugs' username. More generally, there should be some notion of "reserved" names in the username space as this sort of issue can happen a bunch of ways with the various create email addresses, etc.

Also, for anyone curious on the code, here's the pertinent bit from Conpherence code:

https://secure.phabricator.com/diffusion/P/browse/master/src/applications/conpherence/mail/ConpherenceCreateThreadMailReceiver.php;a6f63c0fa2313d059851881c544259c2713aead0$11-46

"canAcceptMail" is returning true, which means (surprise) there is some user(s) being found for the email string.

chad claimed this task.

Looks like we already have tasks covering warnings and creating an app to manage magic emails.

Closey closey.