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:
- Change .forward file for the account listed in the From header, so that mail there will be delivered (instead of silently discarded).
- Generate messages, tagging each with a common X-List-Message-ID: (in my case, a hash of the message body).
- 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.
- 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.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.