What is the best way to check your mailing list software?

I recently wrote a mailing list on Ruby On Rails. I would like to get some expert advice on the best way to test. For example, it would be great if I could write a script to generate 10,000 email addresses, use the software to send email to these 10,000 email addresses, and then write a script to make sure emails passed. I am not sure how simple / possible it is.

+4
source share
3 answers

If you have an email address on a system running with Postfix MTA, you have an arbitrarily large supply of email addresses at your disposal. For example, my usual email address is nr@cs.tufts.edu , but mail sent to nr+xxx@cs.tufts.edu will be sent according to the contents of ~ nr / .forward + xxx. I used this object once when I needed a collection of 120 different email addresses because I acted as a trusted third party for anonymous communication between a group of other people.

The default configuration for Postfix in the manual states

mail for the name + foo is delivered to the alias + foo or to the alias, to the destinations listed in ~ name / .forward + foo or to ~ name / .forward, to the mailbox belonging to the username, or it is sent back as invalid.

+4
source

as long as you own all 10,000 email addresses you can do this

A simple solution is to set up the email service with the catch-all email address, i.e. one that receives all incoming email to the same domain where the address does not exist. Then you can generate random nonsense for recipient addresses, but all in one domain, and after sending them you can collect them all from the catch-all account, cross off the recipientโ€™s email address list and compare them with the list of generated recipients

it would be better if you did this on your own server / email system, however, to avoid being blacklisted as a spammer!

+1
source

I suppose your ML manager has a command line interface that is either a web server or a mail server (or, hopefully, both)? You also need to check them out. The web interface is a little harder to check, but mail should be pretty simple. If I wrote such an ML manager, I would probably add an XML-RPC / SOAP web service to access administrator functions. If your ML manager also supports grouping mail by domain (all *@aol.com, etc.), it would be nice to check this out. In such matters, the TDD approach would be nice to follow. Many functions in MLM can be tested with unit tests.

0
source

All Articles