procmail
[Top] [All Lists]

Re: Dropping failed 'recieved notices' to the floor

1997-11-16 17:21:02
Timothy J Luoma <luomat+procmail(_at_)luomat(_dot_)peak(_dot_)org> writes:
What header do I need to add to my formail construct to have them routed to
/dev/null?

I'm not sure, but I would guess you would want to add something like:

-I"From: Scott's Autoack <nobody(_at_)digifix(_dot_)com>" \
-I"Return-Path: <nobody(_at_)digifix(_dot_)com> \
-I"Errors-To: <nobody(_at_)digifix(_dot_)com>

(I'm assuming that 'nobody' is aliased to /dev/null on your machine.. but I  
was yelled at once for assuming that, so I'll make it clear in case anyone  
here actually uses the nobody@ address)

I'm not sure if you can really add your own Return-Path or not... That is  
what many (most? dare I say `all'?) Mailers will bounce the message to.

The Return-Path: header is generally overwritten at the final destination
with the SMTP envelope sender.  It's the envelope sender that you want
set.  To do that, use the -f flag to sendmail or the ! action:

        :0
        * conditions go here
        ! -f 'nobody' recipient-1 recipient-2 etc...


The Errors-To: header should *not* be used: it's dead header folks, so
don't clutter mailboxes with it.


HOWEVER, with newer versions of sendmail (8.8.0 and later) you can
instead do the Right Thing and pass DSN (Delivery Status Notification)
parameters to sendmail on the command line telling it not to generate
any bounce messages for the address on the command line:

        :0
        * conditions go here
        ! -N never recipient-1 recipient-2 etc...

The -N flag takes one argument that's a case-insensitive comma
separated list of one or more of the following:
        NEVER
        SUCCESS
        FAILURE
        DELAY

"never" cannot be specified with any others.

You can also specify whether the entire message or just the headers
should be returned (-R full, -R hdrs) and you can specify a tracking ID
known as the Envelope-ID using the "-V envid" command line arguments.


Philip Guenther

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