procmail
[Top] [All Lists]

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

2003-05-21 03:14:29
Ross,

Thanks -- you gave me all the information I needed.  Here's what I went
with (I left out the [^         ] because there's no white space in
between the mailto: and the address.  Instead, I used .*, because there
should be nothing else after the mailto: except for the e-mail address:

#Passed the check for this e-mail sender
{
#Grab the buyer / e-mail address line, then:
#Add remark to e-mail for pop account, so I can sort the mail at the
machine, after downloading it

        :0 Bhf
        * ^buyer.*mailto:\/.*
        | formail -A"X-Remarks: Good Customer"

#Add everything after the mailto: to the acceptable e-mail address file.
#This file will be treated like the .nobounce file.

        :0 hic:
        | echo $MATCH >> ${HOME}/.goodcustomerlist

}

From there, I simply added another item to the sb.rc similar to the
NOBOUNCE case, and it works great.  Thanks for the help!

Bard Polley

 



-----Original Message-----
From: Dallman Ross [mailto:dman(_at_)nomotek(_dot_)com] 
Sent: Tuesday, May 20, 2003 7:04 AM
To: 'Bardwareonline'
Cc: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
Subject: RE: How do I extract an e-mail address from a message body and
store it to a list to allow filter bypass?


Uh, I left off the echo.  Sorry.

    :0:
    " echo $MATCH >> path/to/good/list


I, uh, obviously need more sleep.  Badly.

    | echo $MATCH >> path/to/good/list

I'm going to do this one last time.  Then I'm going to go
take an aspirin and a nap.

        :0 hic:
        | echo $MATCH >> path/to/good/list


The reason for the hi is that we want as low a footprint
as we can, and since we're not really saving the message at this point,
h is good; and i tells procmail we don't care, either. The c is because
we don't want this message to vanish; we already took the trouble to add
a custom header just above, remember? It will now clone itself, use one
copy to echo $MATCH, and let the clone fall through to $DEFAULT or more
processing later.

-- 
        "Weltbedenkend, ortlich lenkend!"
                -- Original von W. Dallman Ross



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