Blog

Nullmailer, a developer's best friend

Thursday November 22, 2007

Nullmailer is a very basic sendmail replacement that can forward local mail to remote SMTPs with authentication. Useful for testing anything that requires a sendmail call in a development environment without having to set up a local mail server (for example, verification emails sent by PHP’s mail() function).

It is available on Debian/Ubuntu systems with sudo apt-get install nullmailer. The source and RPM is available on the homepage.

The apt/dpkg configuration will let you enter a smarthost to forward mail to which should look something like the line below (if you installed from source you can add the same details to /etc/nullmailer/remotes):


mail.server.com smtp --port=25 --user=me@host --pass=changeme

The —user and —pass flags are optional and are only required for authenticated SMTP connections.

It’s one of those great pieces of software that you stumble upon by accident and fall in love with. I’ve also used it in production where webservers have been behind firewalls and it has never let me down.

Comments

Post Comment

Top

Copyright © 2007-2008 Undesigned