in reply to Re: Handling Incoming Mail
in thread Handling Incoming Mail

Yep. I second this. You *really* don't want a simple error in your script resulting in lots of bounce messages going back to list admins.

Of course, what you are describing isn't a million miles away from using procmail/rules on the server to filter different lists into different folders and then using a protocol like IMAP to run queries against the folders to find certain messages. Some IMAP server (Cyrus?) use a database for message storage so you should get better-than-grep performance.

There a million ways to skin this cat. The tricky bit of the feline is the bit before the mail has been delivered, since errors then will result in lost mail and/or bounces going back (if your MTA considers that it hasn't discharged its duties it feels honour bound to confess to others).