6.0.0-RC7
6/27/26

[#154] Presentation of sendmail error codes
Summary Presentation of sendmail error codes
Queue IMP
Queue Version HEAD
Type Enhancement
State Resolved
Priority 1. Low
Owners
Requester xidus (at) xidus (dot) net
Created 5/4/04 (8089 days ago)
Due
Updated 6/16/05 (7681 days ago)
Assigned 5/17/04 (8076 days ago)
Resolved 6/16/05 (7681 days ago)
Milestone
Patch No

History
292 Chuck Hagenbuch State ⇒ Resolved
 
558 Matt Selsky Comment #16 Reply to this comment
Committed.
434 Jan Schneider Comment #15 Reply to this comment
Much better, go ahead.
574 Matt Selsky Comment #14
New Attachment: Compose[1].patch Download
Reply to this comment
How's this?
427 Jan Schneider Comment #13 Reply to this comment
Please put the gettext strings in double quotes, and make only the 
varying error messages translateable.
35 Matt Selsky Comment #12
New Attachment: Compose.patch Download
Reply to this comment
This needs more testing, but I think we're on the right track.
403 Chuck Hagenbuch Comment #11 Reply to this comment
Here's the Mail_sendmail patch...
Committed, thanks.
143 Matt Selsky Comment #10
New Attachment: sendmail.php.patch Download
Reply to this comment
Here's the Mail_sendmail patch...
453 Chuck Hagenbuch Comment #9 Reply to this comment
I think the ideal solution would be to modify the PEAR::raiseError() 
call in Mail_sendmail to include the error code as a seperate 
parameter as well (it's in the raiseError() definition). Then in IMP, 
if there's an error code set, you can introduce the translatable 
strings. We shouldn't rely on the Mail_sendmail string staying the 
same, but the error code should be reliable.



Only downside is it requires changes to both packages, but it degrades 
to the current behavior just fine either way.
67 Matt Selsky Comment #8 Reply to this comment
Is it safe to rely on Mail_sendmail to never change the strings it 
returns?  If it is, I can move this code to imp/lib/Compose.php and 
only attempt to parse the error message if $conf['mailer']['type'] == 
'sendmail'.
118 Jan Schneider Comment #7 Reply to this comment
If we do it in IMP we could use gettext and translate the strings.
62 Matt Selsky Comment #6
New Attachment: sendmail.patch Download
State ⇒ Feedback
Reply to this comment
This patch lets the PEAR module Mail_sendmail know about the sendmail 
error codes and what they mean.  Or should the logic be more inside of 
IMP?
2610 Jan Schneider Taken from Horde DevelopersHorde Developers
 
69 Jan Schneider Comment #4
State ⇒ Accepted
Version ⇒ HEAD
Reply to this comment
New features go to HEAD only.
523 Jan Schneider Assigned to Horde DevelopersHorde Developers
Priority ⇒ 1. Low
 
513 Jan Schneider State ⇒ Assigned
 
56 Chuck Hagenbuch Comment #3
Type ⇒ Enhancement
Reply to this comment
Patch?
535 xidus (at) xidus (dot) net Comment #2 Reply to this comment
Even worse, in the case of EX_NOUSER, the user is given the impression 
that the mail was sent to NONE of the intended recipients.  However, 
if the mail was addressed to multiple recipients, it has been 
successfully sent to the extant recipients.  This easily leads to 
users clicking "send" multiple times to try to clear the error, 
sending multiple copies to the recipients that DO exist.



Handling in this case, with multiple recipients and one or more 
unknown to local sendmail, is very poor.  IMP should fail to send the 
message completely AND report the unknown addresses (reported by 
sendmail on stderr).
575 xidus (at) xidus (dot) net Comment #1
Priority ⇒ 2. Medium
State ⇒ Unconfirmed
Queue ⇒ IMP
Type ⇒ Bug
Reply to this comment
When using sendmail locally to inject e-mail, return codes from 
sendmail are displayed very cryptically.  IE: "There was an error 
sending your message: sendmail returned error code 67"  Sendmail only 
returns 6-7 error codes, shown in sendmail(8), and defined in 
/usr/include/sysexits.h.  Readable messages for these would be useful. 
  For instance, 67 is EX_NOUSER, which means one of the addressees 
didn't exist.  The user sending mail would much rather see that than 
"error 67"



Thanks...

Saved Queries