procmail
[Top] [All Lists]

Re: return SMTP code 550 from procmail back to MTA?

2007-11-10 12:24:02
On Nov 10, 2007 10:19 AM, Eugeny N Dzhurinsky <bofh(_at_)redwerk(_dot_)com> 
wrote:

Could somebody please advice is it possible to force pricmail to return
certain result code to MTA, for instance - send back code 550 when message is
considered as spam?

Exactly what your MTA returns to the remote MTA depends on a lot of
things.  For nearly all mechanisms by which procmail is invoked, your
MTA has probably already closed the connection to the remote MTA and
cannot return an in-protocol 550 response, so a failure exit from
procmail is likely to generate a delivery status notification (DSN)
message which will be mailed back to the (probably falsified) sender
of the spam.  This is generally frowned upon.

By the time procmail is involved your best alternative is simply to
throw the spam away, or (if there is *any* chance it isn't really
spam) drop it in a junk folder for later deletion.

However, if you really want to return an error code to your MTA, see
"man procmailrc" and look at the EXITCODE variable.

For the numeric values to assign, look in /usr/include/sysexits.h or
the equivalent file on your operating system.  Useful values are e.g.
65 (data format error), 67 (no such user), 68 (host name unknown), 75
(temporary failure, try again later) and 77 (permission denied).
____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>