procmail
[Top] [All Lists]

Re: handle outgoing mail?

1997-09-09 11:51:48
Chris Bidmead wrote about his postroom script for filtering outgoing mail,

| I've no idea how canonically correct this is, and I hear some experts  
| muttering about not messing with envelopes, but I've used it for several  
| months now and it seems to work fine.

I also run outgoing mail through procmail when I can, and procmail doesn't
mess with the envelope unless you tell it to.  Generally the envelope sender
will be set later by the MTA, and the MUA tells the MTA who the envelope
recipients are by passing them as positional parameters.

So if you put procmail into the middle, just be careful of these:

1. Use procmail's -m option for outgoing mail so that the positional
   parameters that your MUA would normally tell the MTA are passed to
   procmail.

2. End your rcfile for outgoing mail with something like this so that those
   positional parameters are told to the MTA:

   :0
   ! "$@"

Now, if you *want* to screw around with the envelope, procmail will give you
plenty of opportunity, but that's a whole other course of study.

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