Closed Bug 284590 Opened 20 years ago Closed 19 years ago

When using SMTP, emails are not sent to the CC list associated with the flag type

Categories

(Bugzilla :: Email Notifications, defect)

2.18.3
defect
Not set
normal

Tracking

()

RESOLVED FIXED
Bugzilla 2.20

People

(Reporter: tim.nicholson, Assigned: wicked)

References

Details

Attachments

(2 files, 1 obsolete file)

User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041109 Firefox/1.0 Using local logins (emailregexp ^[^@]+$) and an emailsuffix, which is not supposed to be appended to CC List names, does not seem to send an email to the cc list, instead the MTA comes up with the following error:- ################################################### Your message Subject: chargeable_work requested: [Call 983] Test of charging flag again Sent: Thu, 3 Mar 2005 09:18:48 -0000 did not reach the following recipient(s): unknown on Thu, 3 Mar 2005 09:18:48 -0000 The e-mail system was unable to deliver the message, but did not report a specific reason. Check the address and try again. If it still fails, contact your system administrator. < espy.post #5.0.0 X-Postfix; No recipients specified> ################################################# I have tried this with a local (to the system) user such as root, and a full email address me@fully.qualified.domain (entered by temporarily turning of the local emailregexp and then turning it back on) Reproducible: Always Steps to Reproduce: 1. Set up a local user as described in details 2. Request a flag be set 3. Actual Results: Undeliverable error from the MTA Expected Results: sent an email to the address specified in the CC List field
Can anyone of you confirm?
This WORKSFORME. The flag type CC field doesn't use Bugzilla logins. It uses plain e-mail addresses which need not be Bugzilla logins. Since bug 277389, this actually works, and the page to edit flag types says so, too. Which version are you using?
so please close the bug
WFM per comment 2.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → WORKSFORME
I am using 2.18. I will revisit and see if I can get it to work, unless the fix is in 2.19?
The fix went into 2.18, too. (Btw, see bug 278414 on the need to fiddle with emailregexp when adding e-mail addresses to flag cc lists.)
Bug 278141 describes the problem I was trying to work around, without sucess, as my original comment indicates. The question is should I try 2.18.3 to fix it or hang on as 2.20rc2 is now out!
Version: unspecified → 2.18
I'm not sure I understand exactly... Are you saying that your initial problem is that of bug 278414?
No! Even when I change the regexp to avoid the red warning as described in 278414 I still get the MTA failure!
Version: 2.18 → unspecified
I have now upgraded to 2.18.3 and the problem remains! In the flags set up I have active and requestabel ticked and a cc list containing a single fully qualified email address (me@somewhere.else) but the MTA still reports "X-Supplementary-Info: < espy.g211.post #5.0.0 X-Postfix; No recipients specified>" Under other circumstances I do get emails sent as expected so its not a generic email set up problem.
Version: unspecified → 2.18.3
I have now found the circumstances under which the problem will occur and when it will not. If a flag is requestable, and there is a cc entry then the error occours, an email with no recipient is generated. If a flag is requestable, *and* specifically requestable, and there is a CC entry the error does not occur.
Status: RESOLVED → UNCONFIRMED
Resolution: WORKSFORME → ---
Confirming.
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: blocking2.22?
OS: Linux → All
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.22
This was reported against 2.18, and it's a crasher. Crashers get fixed. Also flagging bmo-regressions as it fits the profile with a crash that's been getting reported frequently on bmo lately.
Flags: blocking2.22?
Flags: blocking2.22+
Flags: blocking2.20.1+
Flags: blocking2.18.5+
Target Milestone: Bugzilla 2.22 → Bugzilla 2.18
Assignee: email-notifications → wicked
Looks like this happens when the bug is restricted to one or more groups or the attachment is private AND none of the flag CC list emails are allowed to see the bug/attachment. Note that the code starting from line 950 on Bugzilla/Flag.pm specifically excludes all non-account emails. Maybe we should add a check for no to/cc/bcc condition somewhere and just not try to sent the notification in this case? Or maybe we should reconsider this block about non-account emails never getting notifications about restricted bugs/attachments?
What you describe in comment 14 sounds like a dupe of bug 266147. Comment 11 seems to be a different problem.
Comment 14 is the "other problem". This bug is about comment 11.
(In reply to comment #16) > Comment 14 is the "other problem". This bug is about comment 11. What's this "other problem"? Bug 266147? I can trigger problem described in comment 11 when environment is how I described in comment 14. (In reply to comment #15) > What you describe in comment 14 sounds like a dupe of bug 266147. Comment 11 Hmm, this would mean there is another problem somewhere in the code with same symptoms as in comment 14. Could happen but I somehow doubt it.. Maybe we should fix bug 266147 first and then see if somebody can still reproduce this bug.
(In reply to comment #17) > Hmm, this would mean there is another problem somewhere in the code with same > symptoms as in comment 14. Could happen but I somehow doubt it.. Maybe we > should fix bug 266147 first and then see if somebody can still reproduce this > bug. That's what I thought might be the case... My intentions in comment 16 were to prevent this bug being resolved as a duplicate of bug 266147 before we're sure whether we're looking at two different issues or not.
When flag is requested from no-one the flag notification has an empty To field. This happens when either no requestee was specified or the flag is not specifically requestable. There's only a CC field with the flag's CC list email. I tested with sendmail and my flag mail was delivered succesfully in all test cases. But with SMTP mail delivery to same sendmail host resulted with no flag mail. Actually, SMTP doesn't even send an email to the CC list email but only to the requestee. So it seems the SMTP delivery basicly ignores the CC field of the message. Uh oh, from the Mail::Mailer documentation: The smtp mailer does not handle "Cc" and "Bcc" lines, neither their "Resent-*" fellows. So this is probably what we are running into here. :( Do we use CC or BCC email fields anywhere else? Other problem I noticed with these mails is that they contain ".. has asked for test-cclist.." text. Note the two blanks where the requestee should be located. Shouldn't this say "from wind" or just have one blank?
Status: NEW → ASSIGNED
For the record, comment 12 is based on seeing the effect in a mail_delivery_method=testfile environment.
(In reply to comment #19) > Other problem I noticed with these mails is that they contain ".. has asked > for test-cclist.." text. Note the two blanks where the requestee should be > located. Shouldn't this say "from wind" or just have one blank? Minor cleanup unrelated to this bug. I really don't care seeing two whitespaces instead of one. Much more important is the problem about SMTP ignoring the CC list. If we haven't any other choice, then the fix is to loop over the CC list and add them in turn to the To: field in Bugzilla::Flag::notify(), which is a trivial fix, especially thanks to my fix for bug 266147, but is slower as we cannot send only one email (but generally, I don't expect the flag CC list to be very long).
I'd rather see people in the "To" field anyhow, instead of exposing their email address to everybody via "CC."
I tested SMTP mailer and found following restrictions: 1) Only one address per one To field is supported because comma separated addresses will not be processed. However, multiple To fields can be used. 2) CC or BCC fields are not supported. It tries to but there's a bug between Mail::Header and Mail::Mailer, first one created all uppercase hash refs for CC/BCC and latter expects mixed case. Maybe we should add something about this to release notes so that people editing mail parameters or templates knows to avoid these constructs?
Keywords: relnote
Attached patch Fix CC of flag notifications, V1 (obsolete) — Splinter Review
This patch changes notification mails by: 1) No longer uses CC field 2) Uses only one address per one To field 3) Ignores blank addresses
Attachment #206953 - Flags: review?(LpSolit)
according to rfc2822 (3.6) you're only allowed one To: field i have encountered issues with some systems not liking multiple to fields and had to work around them for other projects.
Comment on attachment 206953 [details] [diff] [review] Fix CC of flag notifications, V1 I'm with glob. I don't like having multiple To: fields. I think the best solution is to do a loop in Flag::notify() over the addressee and the CC list, and adding a new $vars->{'to'} field which is used by the To: field only. This way, you can keep the addressee field as is.
Attachment #206953 - Flags: review?(LpSolit) → review-
Moved loop to Flag.pm module to proces and send flag notification mail for each recipient.
Attachment #206953 - Attachment is obsolete: true
Attachment #207122 - Flags: review?(LpSolit)
Comment on attachment 207122 [details] [diff] [review] Fix CC of flag notifications, V2 r=LpSolit for tip only. This patch needs to be backported.
Attachment #207122 - Flags: review?(LpSolit) → review+
Hmm, looks like 2.18 branch is not affected by the problems fixed in the patches in this bug. It doesn't have the SMTP mail delivery method and sendmail should support CC mail fields correctly. This MTA error in 2.18 is most likely effect of the bug 266147 like I originally suspected.
Flags: blocking2.18.5+
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
Comment on attachment 207130 [details] [diff] [review] Fix CC of flag notifications, V2 - 2.20 branch r=LpSolit
Attachment #207130 - Flags: review?(LpSolit) → review+
Flags: approval?
Flags: approval2.20?
Flags: approval?
Flags: approval2.20?
Flags: approval2.20+
Flags: approval+
tip: Checking in Bugzilla/Flag.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Flag.pm,v <-- Flag.pm new revision: 1.59; previous revision: 1.58 done Checking in template/en/default/request/email.txt.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/request/email.txt.tmpl,v <-- email.txt.tmpl new revision: 1.11; previous revision: 1.10 done 2.20: Checking in Bugzilla/Flag.pm; /cvsroot/mozilla/webtools/bugzilla/Bugzilla/Flag.pm,v <-- Flag.pm new revision: 1.45.2.4; previous revision: 1.45.2.3 done Checking in template/en/default/request/email.txt.tmpl; /cvsroot/mozilla/webtools/bugzilla/template/en/default/request/email.txt.tmpl,v <-- email.txt.tmpl new revision: 1.9.4.2; previous revision: 1.9.4.1 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago19 years ago
Resolution: --- → FIXED
Summary: CC List in Flags does not seem to send to required recipients → When using SMTP, emails are not sent to the CC list associated with the flag type
Keywords: relnote
There's no reason for this bug to have the relnote keyword on it anymore--these versions have been released long since.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: