procmail
[Top] [All Lists]

Need help talking to formail

2003-07-02 21:58:17
I use the following recipe to flag html mail against a list of known "good 
people". If the message matches, I want to write the sender's name to a 
spammerlist (which I can review later).

Problem is the way it's currently written: the whole line, "From: Sender's 
Name <sender(_at_)domain(_dot_)com>", gets written to the spammerlist. I just 
want the 
email address. Any ideas?

:0 :
* !? egrep -is -f /home/me/goodhtml.txt
* ^Content-type: (text/html|multipart/mixed)
{
        :0 hw
        SPAMMER=|formail -c | egrep '^From:'

        :0 :
        | echo "$SPAMMER" >>spammerlist

        :0 :
        | echo "`date`: An HTML message from an unapproved source arrived." 
delete.log

        :0 :
        SPAM
}

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