in reply to Direct SMTP send with full resolution.

One of the issues with sending directly to an MX is that many, many MX's will refuse your mail because it doesn't come from a "real" SMTP server. Implementing enough of an SMTP server to play nice with that type of MX would be non-trivial.

One thing I've had luck with to solve your bounce-detection problem is to add an X- header to the mailing list mails, and let bounces go to a real mailbox. I do this, today, all in Perl:

  1. Change .forward file for the account listed in the From header, so that mail there will be delivered (instead of silently discarded).
  2. Generate messages, tagging each with a common X-List-Message-ID: (in my case, a hash of the message body).
  3. Enable a cron job (which runs a Perl script) that checks the mailbox for bounce responses (which I do by looking for the X-List-Message-ID header) over the next 72 hours, logs the mail addresses which bounced, and clears the message. This runs hourly.
  4. The last run of the cron job from above resets the .forward file and shuts off the cron job until the next time I need them.

This has worked very well for me, and catches the majority of bounced addresses. I even have a process that follows up on the bounces a week or two later with a "just checking" message before removing the address from my list.

<-radiant.matrix->
A collection of thoughts and links from the minds of geeks
The Code that can be seen is not the true Code
"In any sufficiently large group of people, most are idiots" - Kaa's Law