procmail
[Top] [All Lists]

Re: How to produce a temporary error for the MTA?

2009-05-29 12:51:16
At 16:24 2009-05-29 +0200, Michelle Konzack wrote:
Hello,

I have an account, where I have  to  do  sometimes  mainenance  and  any
deliveries could cause errors.

What I like to do is to touch a file which then is detected by  procmail
and produce a temporary error.

How can I do this?

The procmail return value, set via EXITCODE


An excerpt from a post of mine to this list four years ago:

# Standard EXIT codes (but check the docs specific to your chosen MTA):
#
# EX_USAGE        64
# EX_DATAERR      65
# EX_NOINPUT      66
# EX_NOUSER       67
# EX_UNAVAILABLE  69
# EX_OSERR        71
# EX_OSFILE       72
# EX_CANTCREAT    73
# EX_IOERR        74
# EX_TEMPFAIL     75
# EX_NOPERM       77

EXITCODE=67 followed by unsetting HOST would cause your MTA to treat the message as a NOUSER. It'll not be exactly the same as a regular nouser bounce, but the situations you're citing sound like you're dealing with morons anyway, so the little differences are not likely to be significant to them.

------

75 seems like an appropriate one. Note that you're not setting the individual MTA error message - it'll use whatever it associates with such a return value.

:0
* ? test -f ~/.procmail_tmp_nodeliver
{
        # set return value, then unset HOST, which causes procmail to stop
        EXITCODE=75
        HOST
}

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
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>