procmail
[Top] [All Lists]

Re: Using procmail to requeue incoming email?

1999-03-05 00:17:30
cueman(_at_)cuenet(_dot_)com writes:
Philip Guenther said at one time:
...
The next problem is that SENDMAILFLAGS cannot contain more than one
argument for sendmail.  This is a known bug which I hope to fix soon.

Not a problem, you could update the docs to reflect this however.

Actually, it's the documented behavior (look for the description of
SENDMAIL variable on the procmailrc(5) manpage).  It just isn't the
'right' behavior'.


But unfortunately this does not accomplish my goal. I didn't consider
re-queuing this way would change the Return-Path to the owner of the
sendmail doing the requeueing.

Changing the envelope sender address is _usually_ the correct
behavior:  if something goes wrong with the forwarding, the original
sender can't do anything about it, so they shouldn't get the bounce
message.  In fact, you should probably set the envelope sender should
probably be set to _your_ address, as you're the person to fix it if
something goes wrong.


I run several Smartlists and one in particular is becoming unwieldly
with all the bounced mail, it is a large list. So I want to take all
that incoming stuff and queue it, then process it in a more controlled
fashion later. Doing things the above way changes the headers too
much so Smartlist doesn't process things correctly, or at all in the
case damaen is doing the requeueing.

Okay, since you're just forwarding to flist, it should be relatively
safe to preserve the envelope sender for flist's use.

        :0
        * ^Return-Path: *\/<.*
        ! $SENDMAIL -C/etc/sendmail.cf2 -oQ/home/lists/mqueue \
                -oem -odq -oi -f "$MATCH" test

The condition extracts the value of the Return-Path: header into the
MATCH variable, and then uses that for the -f argument to sendmail.

Now for the Dire Warning:

        May all the daemons that roam the Internet haunt you and your
        progeny if you misuse this to redirect bounces to address that
        cannot do anything about them!


(We now return you to your regularly scheduled reality.)


Philip Guenther

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