Page MenuHomePhabricator

Herald "subscribe" rules do not take effect immediately, skipping mail about the first transaction
Closed, ResolvedPublic

Description

After the migration from mailing list to user type mailinglist, herald is not sending any mails at all.
I have one simple rule for Maniphest to send a mail each time a new task is created.
I have also made the mailing list user Administrator, but no luck. No mails are sent.

(Test: molepeople)

Event Timeline

catalindazoot assigned this task to epriestley.
catalindazoot raised the priority of this task from to Normal.
catalindazoot updated the task description. (Show Details)
catalindazoot added projects: Herald, Mailing Lists, Restricted Project.
chad raised the priority of this task from Normal to Needs Triage.Jun 8 2015, 10:23 AM
chad removed projects: Restricted Project, Mailing Lists.
chad removed subscribers: jhurwitz, angie, joshuaspence.
chad added a subscriber: chad.Jun 8 2015, 10:32 AM

I presume D13184 is the fix for this, and just waiting review.

catalindazoot added a comment.EditedJun 8 2015, 10:38 AM

I have also tried to make a NEW rule with the newly created mailing list type user but again no mail is sent. In Herald transcript i see the rule was applied ok but no mail is sent:
Conditions were met for H1 New task created·Outcome: Added mailable to mail targets.

epriestley updated the task description. (Show Details)Jun 8 2015, 10:47 AM

On this task, I got the second email, but the addressee list for the first mail was not computed correctly. This might already be resolved by changes attached to T8455, or might be a general issue related to T6367. I'll look into it.

epriestley renamed this task from herald rules no email sent after migration of mailing list to users to Herald "subscribe" rules do not take effect immediately, skipping mail about the first transaction.Jun 8 2015, 1:49 PM

Thanks for tracking down the root cause! It'd be great if the fix were landed today so that we could pull in this fix when also pulling in the fix for T8455.

I did an update this morning and we have the same behaviour. No mail is sent on task newly created.

catalindazoot reopened this task as Open.Jun 9 2015, 6:58 AM
chad added a comment.Jun 9 2015, 7:34 AM

How did you update?

git pull from github repo

chad added a comment.Jun 9 2015, 7:45 AM

You also need to stop the deamons, restart php/apache, and start them back up.

https://secure.phabricator.com/book/phabricator/article/installation_guide/#updating-phabricator

That is the process we always do.
Still not working.

chad added a comment.Jun 9 2015, 9:23 AM

Do you mind giving complete steps to reproduce here, I want to make sure we’re all on the same page as to your specific bug. Perhaps we fixed something else.

I have one Herald rule:

tasknotify user is a mailing list type user with Administrator rights.

I create a Maniphest tasks via email.

In the Herald transcript i see the rule has passed and the action is executed but no mail is sent.

Any updates ? Is the bug confirmed ?

I can't reproduce this. I created T8499 and immediately received mail about it to my "molepeople" list:

I created a second task via email and also received mail about it immediately:

You can use bin/mail list-outbound to list mail, and bin/mail show-outbound --id <id> to inspect messages. It's possible that some other rule or setting is causing this mail not to be delivered; if that's the case, you should be able to find a description of the reason by identifying and inspecting the message.

catalindazoot added a comment.EditedJun 10 2015, 3:13 PM

I found the mail in list-outbound with status Void:

It only has in To: listed my PHID and not the one of the tasknotify Herald rule.

My PHID: PHID-USER-jqit425oxelamdkon5ba
Tasknotify user: PHID-USER-tbglddnsehmpviqpvtuf

PROPERTIES
ID: 38773
Status: void
Related PHID: PHID-TASK-du7o2pdsdkmd5xpn7fam
Message: Message has no valid recipients: all To/Cc are disabled, invalid, or configured not to receive this mail.

PARAMETERS
subject: T6221: [Support] [NZM #34313] Solicitare
from: PHID-USER-jqit425oxelamdkon5ba
subject-prefix: [Maniphest]
vary-subject-prefix: [Created]
thread-id: maniphest-task-PHID-TASK-du7o2pdsdkmd5xpn7fam
is-first-message: 1
exclude: []
herald-force-recipients: []
mailtags: ["maniphest-other"]
is-bulk: 1
parent-message-id: <20150610150835.73398.90e0a75a-0f82-11e5.request-tracker@rt>
reply-to: T6221+1+02809a033bffdafd@phab
to: ["PHID-USER-jqit425oxelamdkon5ba"]

HEADERS
Thread-Topic: T6221: [Support] [NZM #34313] Solicitare
X-Herald-Rules: <3>
X-Phabricator-To: <PHID-USER-jqit425oxelamdkon5ba>

RECIPIENTS
! Catalin Constantin
    - This recipient is the user whose actions caused delivery of this message, but they have set preferences so they do not receive mail about their own actions (Settings > Email Preferences > Self Actions).

TEXT BODY
catalin created this task.

So it seems that not all recipients are loaded when creating the outbound mail.

One thing i notice is that your Herald rule just adds a subscriber. In my case it's set to send a mail to the tasknotification user.

I changed the Herald task to add the tasknotify user as subscriber. Now i get the mail.
Still the bug if the Herald action is to send mail.

Thanks! I think D13245 should really fix this.