procmail
[Top] [All Lists]

RE: Using formail

2001-03-30 11:24:31


What I want to do is modify the Subject line in an email & then have to
forwarded to another email account.  Here's is what I have:

:0fhw
* ^Subject:\/.*
| (formail -I"To: rcd(_at_)amherst(_dot_)com" \
           -A"Subject: [$HOST] $MATCH" \
  ) | $SENDMAIL -t

Well you don't want to use -A when dealing with the Subject: line and formail

Also I tend to prefer to use the 'a' flag to 'and' conditions rather than using
multi-line conditions and ( )
        others may disagree and be entitled to their reasoning.

Finally, I'd add an "Errors-To:" that points back to you once you forward the
message.  Assuming you are forwarding this from "joe(_at_)myserver(_dot_)com" to
"rcd(_at_)amherst(_dot_)com"

:0fhw
* ^Subject:\/.*
| formail -I"To: rcd(_at_)amherst(_dot_)com" -I"Subject: [$HOST] $MATCH" 
-I"Errors-To:
joe(_at_)myserver(_dot_)com"

        # I also like to indent 'and'ed conditions for readability
        :0a
        ! rcd(_at_)amherst(_dot_)com

TjL

_______________________________________________
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>