Page MenuHomePhabricator

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

Assigned To
Authored By
catalindazoot
Jun 8 2015, 9:16 AM
Referenced Files
F492373: pasted_file
Jun 10 2015, 3:13 PM
F492340: molepeople.png
Jun 10 2015, 2:55 PM
F492346: Screen Shot 2015-06-10 at 7.53.01 AM.png
Jun 10 2015, 2:55 PM
F490795: pasted_file
Jun 9 2015, 9:39 AM
F490798: pasted_file
Jun 9 2015, 9:39 AM
F487154: Screen Shot 2015-06-08 at 4.05.24 AM.png
Jun 8 2015, 11:08 AM
Tokens
"Mountain of Wealth" token, awarded by catalindazoot.

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.

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

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.

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.

Screen Shot 2015-06-08 at 4.05.24 AM.png (312×826 px, 54 KB)

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.

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

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:

pasted_file (389×453 px, 20 KB)

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.

pasted_file (758×601 px, 44 KB)

Any updates ? Is the bug confirmed ?

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

molepeople.png (355×811 px, 52 KB)

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

Screen Shot 2015-06-10 at 7.53.01 AM.png (344×600 px, 50 KB)

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.

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.