[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] 4xx errors



On Thu, 24. Apr 2008, 10:58:17 +0200, Kent Vinther Friis wrote:
> MSMTP treats 4xx errors as permanent errors. As an example:
> 
> msmtp: envelope from address no-reply@...146... not accepted by the server
> msmtp: server message: 451 4.7.1 Service unavailable - try again later
> msmtp: could not send mail
> 
> Exit status: 65 = EX_DATAERR.
> 
> What I would expect when getting a 4xx is something like exit status
> 75 = EX_TEMPFAIL, which would allow me to use the exit status to tell
> the difference between an unsendable e-mail (e.g. an invalid
> receipient address), and a mailserver that doesn't want to talk right
> now (e.g. disk full). At the moment the both give EX_DATAERR.
> 
> Other temporary errors, like connection refused, already give
> different exit codes, and I use that to see which mails should stay in
> my queue directory for another try, and which to move to a different
> directory. But for 4xx errors, as they give EX_DATAERR, I currently
> use grep on the log files for the rejected mails, to see which are 4xx
> errors, and move them back to the queue directory.
> 
> Would it be a big change to get 4xx errors as something lige EX_TEMPFAIL?

You are right, msmtp should return EX_TEMPFAIL for 4xx errors.
This is now fixed in CVS. Thanks for spotting this!

Martin