procmail
[Top] [All Lists]

Re: Capturing a variable from the Message Body

1997-08-12 02:11:00
On Mon, 11 Aug 1997 15:29:54 -0700, abagchee(_at_)notes(_dot_)borland(_dot_)com 
wrote:
I am setting up a List Serve type system that periodically sends a message
out to a lot of people, based on email addresses in a Oracle Database.  The
problem is that not all addresses in the database are valid and will bounce
back.  Since every Bounced message structure from a daemon is different I
thought of sending a flag in the message body of the original message sent
to the List Serve.  Most Return Daemon messages contain the original text
of the message.  Next to the flag will have the email address of the person

Most bounces will be generated by one of about five popular programs.
I'd settle for handling those automatically and do the rest by hand.

being sent to i.e. xxxx: j(_at_)fff(_dot_)com . That way when I get a bounce 
message
back from a Mailer-Daemon I can tell who the original addressee was and
remove them from the database.
 I was wondering if there was a way for procmail to find this flag, and
then pass the email address coming after the flag to a variable.  If this
is possible, how do I do it?

:0BD  # Case sensitive, match in body of message
* ^[^a-z]*Bounce-catcher-id: moo-list(_at_)illness\(_dot_)com
* ^[^a-z]*Bounce-catcher-recipient: \/[^        ]+
{
  # ... whatever you want to do to it
}

There are too many bounce formats around to expect this to work,
either. The probability that there is some mutant IBM MVS program out
there that sends you the body converted to uppercase encoded in base64
encrypted in EBCDIC is a bit too high to be ignored. (And it's not
completely impossible that it comes back as a self-referential Lisp
snippet which decodes itself into something wild and wonderful.)

If there is another way of determining the original addressee from a
returned message from a Mailer_Daemon I would like to know that as well.

Encode it in your own outgoing address, which is (hopefully) where the
bounce will be sent. This is unlikely to work all of the time, either,
but you could get pretty far by combining these ideas. 
  <http://www.netusa.net/~eli/faqs/addressing.html>

/* era */

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

<Prev in Thread] Current Thread [Next in Thread>