procmail
[Top] [All Lists]

Re: Doing something with bounce messages

2001-04-18 06:24:34
On Wed, Apr 18, 2001 at 04:01:17AM -0700, J. Ryan wrote:
Hello,

I am trying to build a recipe that does the following:

1. Takes a bounce notice for an email I send out and filters it for the
email address.
2. I want it to pass that email address to a perl program I wrote.

Arent't you by any chance trying to re-implement a *gasp* mailing-list
manager? You know there are some packages that do that for you...


I have been reading all the man pages and web sites but I haven't gotten a
good way to grep through the body to grab the email address of the intended
recipient.  This what I have so far:

:0b
* ^FROM_MAILER
   {
      arg1 = email address grepped  from body of text.  How do I do this?

    |myperl.pl $arg1 || EXIT
    #throw out the message don't need it anymore.
    /dev/null
    }

I am sure that there are about a million ways to do this.  If you could give
a clue as to where to look or just some general advice I'd be very happy.

Why don't you feed the whole body to your perl script and try to parse
e-mail addresses from there?

:0bw
* ^FROM_MAILER
| my_scripl.pl

-- 
    PHEDRE: Chère OEnone, sais-tu ce que je viens d'apprendre ?
    OENONE: Non ; mais je viens tremblante, à ne vous point mentir.
                                          (Phèdre, J-B Racine, acte 4, scène 6)
_______________________________________________
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>