Sam Varshavchik writes: > Alexei Batyr' writes: > >> So questions arised: >> 1 (most important). Why local sendmail silently discards "bad" messages >> without writing any errors to syslog? > > Because no historical version of any mail handler with an externally-invoked > "sendmail" command ever logged errors to syslog. Errors that resulted in > submitted mail getting refused, no different than any other error > encountered by any other executed command, they get reported to standard > error, and the command terminates with a non-zero exit status. > > And that's what occurs here. sendmail terminates with a non-zero exit code, > after emitting an error message. It is the responsibility of whatever forks > and executes a child process, and waits for the child process to terminate, > to check its exit code, and report any failures.
I agree, but "advanced PHP programmers" don't even think about checking return value of mail() function that invokes sendmail. > The "sendmail" command in Courier is not a daemon that logs to syslog. It's > an interactive command. In the original Sendmail sendmail, its sendmail" > was both, an executed command, and a daemon. The externally-executed > sendmail command, if it rejected a message for its own reasons, would also > print a message on standard error and terminate with a non-zero exit status. > Same thing here. OK, probably I need some logging wrapper for sendmail. Another question (or maybe feature request): I need to refuse sending mail to some addresses (domains). In Sendmail I could just specify "local:dev-null" in mailertable file for these domains. It would be helpful to have similar feature in esmtproutes. Another possibility - "badto" parameter in bofh by analogy to "badfrom". -- -- Alexei. ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ courier-users mailing list [email protected] Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users
