Closed Bug 87801 Opened 23 years ago Closed 16 years ago

Better error messages when mail sending fails

Categories

(Bugzilla :: Email Notifications, defect, P1)

2.13
defect

Tracking

()

RESOLVED FIXED
Bugzilla 3.0

People

(Reporter: paul.thomas, Assigned: mkanat)

References

Details

(Whiteboard: [blocker will fix])

Someone here was using Bugzilla and had forgotten their password.
They filled in their e-mail address and clicked on "E-mail me a password".

The webpage returned back said

"Password has been emailed
No recipient addresses found in header The password for the e-mail address 
paul.thomas@sse.ie has been e-mailed to that address."

They never got an email!

I looked into it and it turned out that parameter passwordmail has accidently 
been saved with an extra newline in the email address and looked like this

From: bu
zilla@machine.sse.ie
To: %mailaddress%
Subject: Your Bugzilla password.
... etc ...

I took out the newline, saved the new parameter and it worked fine.

I reckon that the message "No recipient addresses found in header" was returned 
from sendmail, yet "The password for the e-mail address paul.thomas@sse.ie has 
been e-mailed to that address" was displayed, so it looks to me as if the 
return code from the call the sendmail is not been checked properly.

Although this bug only reveals itself when the system is not set up properly, I 
still reckon that any "dodgy" return code checking from sendmail is worth 
reporting.
Depends on: 84876
Whiteboard: MTAConfig
grr, dependency in wrong order...
No longer depends on: 84876
Blocks: 84876
Target Milestone: --- → Bugzilla 2.16
Priority: -- → P2
Mass moving to new product Bugzilla...
Assignee: tara → jake
Component: Bugzilla → Email
Product: Webtools → Bugzilla
Version: Bugzilla 2.12 → 2.13
We are currently trying to wrap up Bugzilla 2.16.  We are now close enough to
release time that anything that wasn't already ranked at P1 isn't going to make
the cut.  Thus this is being retargetted at 2.18.  If you strongly disagree with
this retargetting, please comment, however, be aware that we only have about 2
weeks left to review and test anything at this point, and we intend to devote
this time to the remaining bugs that were designated as release blockers.
Target Milestone: Bugzilla 2.16 → Bugzilla 2.18
Actually, this is a quite common problem with prefs being saved with a newline
at the end; I think this was recently fixed but can't be bothered to find the
bug # right now.

I agree that mail error checking would be nice; do you have a proposal of what
exactly should happen? My idea:

Bug 59351 calls for centralizing sendmail calls, which is great. Have the
MailMessage function return a non-zero status and log a message (hmmm, do we
have a log?) explaining what went wrong. Clients of MailMessage() can check the
status and print a message like:

"Bugzilla failed to send email to $recipient. This probably means the system has
a configuration problem. Please contact $maintainer and let him know of the
problem."
Changing default owner of Email Notifications component to JayPee, a.k.a.
J. Paul Reed (preed@sigkill.com).  Jake will be offline for a few months.
Assignee: jake → preed
No longer blocks: 84876
Depends on: 84876
These unloved bugs have been sitting untouched since June 2002 or longer.  If
nobody does anything else to them, they certainly won't make 2.18
Retargetting to 2.20.  If you really plan to push them right now, you might pull
them back in.
Target Milestone: Bugzilla 2.18 → Bugzilla 2.20
If bug 49893 is fixed, this becomes a wontfix, because the problem will no
longer be there to fix (at least not in this form).
Depends on: bz-smtp
No longer depends on: 84876
Whiteboard: MTAConfig → MTAConfig [blocker will obsolete]
As preed is no longer actively working on Bugzilla (from what I know), I somehow
doubt that this bug will make it in for 2.20. :-) If I'm wrong, feel free to
take it back and re-target it. :-)
Assignee: preed → email-notifications
Target Milestone: Bugzilla 2.20 → ---
Okay. So bug 49893 didn't obsolete this. Now we just need to actually handle errors of *all* the Mail::Mailer failures, and print something sensible out when they fail.
Summary: sendmail results error checking → Better error messages when mail sending fails
Whiteboard: MTAConfig [blocker will obsolete]
*** Bug 328808 has been marked as a duplicate of this bug. ***
*** Bug 312477 has been marked as a duplicate of this bug. ***
*** Bug 339093 has been marked as a duplicate of this bug. ***
For anybody who comes here, note that "undef error" in CGI.pm means that your mail server for SMTP is set incorrectly, or is rejecting your connections. That's the very first error that we should make better.
Assignee: email-notifications → mkanat
OS: Linux → All
Priority: P2 → P1
Hardware: PC → All
Target Milestone: --- → Bugzilla 2.24
QA Contact: mattyt-bugzilla → default-qa
Depends on: 353711
Whiteboard: [blocker will fix]
The Bugzilla 3.0 branch is now locked to security bugs and dataloss fixes only. This bug doesn't fit into one of these two categories and is retargetted to 3.2 as part of a mass-change. To catch bugmails related to this mass-change, use lts081207 in your email client filter.
Target Milestone: Bugzilla 3.0 → Bugzilla 3.2
This was fixed in Bugzilla 3.0 by switching to the Email:: modules, which give actually decent errors, and also by adding smtp_debug, which allows you to see what's really going on for SMTP servers.
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Target Milestone: Bugzilla 3.2 → Bugzilla 3.0
You need to log in before you can comment on or make changes to this bug.