procmail
[Top] [All Lists]

How do I extract an e-mail address from a message body and store it to a list to allow filter bypass?

2003-05-19 23:51:20
I receive e-mails from a known good source, and within them are e-mail
addresses that I would like to extract from the message to allow future
messages from them to avoid the filter (in the same manner as the
.nobounce file.)  The e-mail address is in the body of the e-mail, with
a line similar to the following:

Buyer:   mailto:buyeremail(_at_)domain(_dot_)com

My question is twofold:
        (1) exactly how do I extract just the e-mail address into a
variable, and 
        (2) how do I append it to the list of e-mail addresses to be
bypassed?  I reviewed the Procmail man page, as well as procmailrc, and
came up with the following:

#This block of code will be placed into the section after the e-mail is
recognized as being from the proper source.

{
        :0 B
        *       ^buyer.*mailto:\/$
        | `echo $MATCH >> .customerlist`
        | ${FORMAIL} -A"X-Remarks: Good Customer"

# (Does everything after the '\/' (back whack, whack) go into the $MATCH
variable?)

}

I don't believe it is as simple as that but, then again, I am known for
taking more complicated approaches to solving a given problem.

Any ideas or help would be greatly appreciated!


Bard Polley
Polley Computer Solutions
http://www.bardwareonline.com <http://www.bardwareonline.com/> 
sales(_at_)bardwareonline(_dot_)com
 


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail