Nullmailer, a developer’s best friend

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.

Posted in Uncategorized | 2 Comments

Amazon S3 PHP Class

This class is a standalone Amazon S3 REST implementation for PHP 5.2.x (using CURL), that supports large file uploads and doesn’t require PEAR.

Download source: (view changelog)

Usage: See the class documentation and example.php in the source distribution.

Known Issues:

  • Files larger than 2GB are not supported on 32 bit systems due to PHP’s signed integer problem
  • SSL is enabled by default and can cause problems with large files. If you don’t need SSL, disable it with S3::$useSSL = false;

More Information:

NOTE ON FOLDERS: Amazon S3 does not support folders.  Clients like S3Fox create specific files that are displayed as folders.  Just use slash paths for your object names (foo/bar.txt) and (foo/) as your prefix when listing contents.

Amazon S3™ is a trademark of Amazon.com, Inc. or its affiliates.

Posted in Uncategorized | Tagged , | 305 Comments