procmail
[Top] [All Lists]

Re: if-then or something similar

2001-07-20 10:46:08
On Fri, Jul 20, 2001 at 06:36:24PM +0200, Arvid Warnecke wrote:
Untested, but...

:0:
* ? grep -i `formail -rtzxTo:` .mutt.aliases
| $PERLSCRIPT

Keep in mind if there's a Reply-To: field in the message, it will try to
match on that instead of the From: field.

So, you probably mean `formail -rtzxFrom:`? Coz the To should be my
address... Or did I got something wrong now?

Nope. The -rt creates a NEW header, that would be approprate to put at the top
of a reply FROM you back TO them:

From: your-address
To: sender-address
X-Loop: if present in original message

The -t tells formail to get the value of To: from the From: header, not the
From_ envelope address.
-xTo: then extracts the value of the NEW To: field. Putting From: here would
extract YOUR address, as the sender of the new message.

This is all explained in Era Eriksson's excellent Procmail FAQ at
http://www.ling.helsinki.fi/users/reriksso/procmail/mini-faq.html#formail-rtzx

-- 
Andrew Edelstein        -       andrew(_at_)pure-chaos(_dot_)com
http://andrew.pure-chaos.com
_______________________________________________
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>