procmail
[Top] [All Lists]

Re: Bouncing mail?

2000-10-25 00:17:58
"ed stone" <ed11(_at_)ireland(_dot_)com> writes:
Pine and elm have an option to bounce mail.
"The final recipient will see a header indicating that you have 
Resent the msg, but the message's From: header will show the original 
author of the message, and replies to it will go back to that author, 
and not to you."
Is it possible to do the same with a procmail recipe before it ever 
gets to the MUA, ie I dont want certain mail ever geting to my INBOX 
but to be bounced (not forwarded!)to the, To: address of the e-mail...

<sigh>

Same word, different action.  What Pine and ELM mean by bounce is
the taking of a received message and resending it to another address.
The only modification made to the message is the addition of the the
Resent-* header fields.  That's as compared to when a mail system
returns a non-delivery notice to the sender of a message due to some
problem with delivery.  Such notices generally include at the original
message's header, if not the entire thing, such that it has effectively
'bounced' the message back to the sender.

Now, in most setups, procmail can do both of these.  The latter can be
done by feeding the message back to sendmail, optionally using formail to
add a Resent-To: header field.  The latter is generally done by having
procmail return a non-zero status code to the program that calls it,
usually the MTA.  To do that, you set the EXITCODE variable to the desired
exit code and then tell procmail to throw away the message, either by
delivering to /dev/null or, more efficiently though more obscurely,
by unsetting the HOST variable.**  If your MTA is sendmail, you can use
the exitcode listed in the /usr/include/sysexits.h file on your system
to indicate to sendmail why you rejected the message.  For other MTAs you
should check the documentation to see how it interprets various exitcodes.

Be aware that not all MTAs treat non-zero exitcodes as errors: if your
site using smail then you _cannot_ tell smail that the message was not
delivered.  Because of this, smail systems may completely lose messages
during times of machine load or if the disk fills up.

So, do you understand the difference now?


Philip Guenther

** Unsetting the HOST variable, or setting it to a value that doesn't
match the hostname of the machine upon which procmail is running causes
procmail to abandon the current rcfile.  If procmail is being run with the
names of multiple rcfiles on its command line, then such a mismatched HOST
setting will cause procmail to go on to the next rcfile.  Otherwise, or if
there are no more rcfiles on the command line, procmail will simply give
up and exit with the specified exitcode, or zero (success) by default.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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