procmail
[Top] [All Lists]

Re: Procmail filter for outgoing mail

1997-06-24 07:40:00
On Tue, 24 Jun 97 14:26:22 +0100,
Chris Bidmead <bidmead(_at_)cbidmead(_dot_)demon(_dot_)co(_dot_)uk> wrote:
:0f
* ^To:.*Mag-Reader
| formail -I "Reply-To: 
chris-unix(_at_)cbidmead(_dot_)demon(_dot_)co(_dot_)uk" -s
{ }

    :0fh
    * ^TO_Mag-Reader
    | formail -I "Reply-To: 
chris-unix(_at_)cbidmead(_dot_)demon(_dot_)co(_dot_)uk"

It is unclear to me whether the -s does anything useful. (Perhaps I
should reread the manuals again :-)

Since you only add a header, it's needless to pass the body through
formail. You save a few bytes down a pipeline. 
  (If the -s was meant to make formail preserve the body, you don't
need that here, but the "canonical" way to do that is formail -k.)

The ^TO_ macro (available in 3.11pre4 [or so] and newer) will catch
Cc: and various Resent-To: as well as the normal To:. It contains a
nice wildcard so that you don't accidentally match on shmag-reader or
whatever. 

You already have a condition line. You can only have exactly one. 
So the { } is superfluous and likely a syntax error. 
  The :f flag turns the recipe into a non-delivering one so Procmail
will proceed after this recipe with a modified message.

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>