Search code examples
ruby-on-railsrubyemailtestingmailing-list

What is the best way to test mailing list software?


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


Solution

  • If you happen to have an email address on a system run with the Postfix MTA, you have an arbitrarily large supply of email addresses at your disposal. For example, my regular email address is nr@cs.tufts.edu, but mail sent to nr+xxx@cs.tufts.edu will get forwarded according to the contents of ~nr/.forward+xxx. I used this facility once when I need a collection of 120 distinct email addresses because I was acting as a trusted third party for anonymous communication between a bunch of other people.

    In the default configuration for Postfix, the manual says

    mail for name+foo is delivered to the alias name+foo or to the alias name, to the destinations listed in ~name/.forward+foo or in ~name/.forward, to the mailbox owned by the user name, or it is sent back as undeliverable.