Simple local smtp server - minimal setup ubuntu

Solution 1:

Though it us not maintained, you can try esmtp. It does, however, support some of the functionality you don't want, but it is very easy to set up.

From Ubuntu's Synaptic Package Manager description for esmtp:

ESMTP is a user configurable relay-only Mail Transfer Agent (MTA) with a sendmail-compatible syntax. It's based on libESMTP supporting the AUTH (including the CRAM-MD5 and NTLM SASL mechanisms) and the StartTLS SMTP extensions.

The esmtp site lists some other alternatives, of which sSMTP seems the simplest. From Ubuntu's Synaptic Package Manager description for ssmtp:

A secure, effective and simple way of getting mail off a system to your mail hub. It contains no suid-binaries or other dangerous things - no mail spool to poke around in, and no daemons running in the background. Mail is simply forwarded to the configured mailhost. Extremely easy configuration.

Solution 2:

Ignore all the setup documents, you don't need them. On Debian/Ubuntu the setup issues have been dealt with. The debconf setup for the SMTP severs offer you a set of standard configurations. This includes a couple of options which will do what you want. Consider installing the postfix-doc package if you want some documentation.

From my experience the Debian/Ubuntu setup is pretty well the same for Exim4 and Postfix. The following options are for Exim4 but should work for Postfix. You can rerun the configuration with the dpkg-reconfigure command.

The default configuration when you select mail sent by smarthost; received via SMTP or fetchmail should give you very close to what you want. To prevent incoming mail set the listen address for incoming SMTP sessions to 127.0.0.1.

Alternatively, you may want to consider selecting mail sent by smarthost; no local mail. This will send most mail to another system for delivery. Messages about inability to send mail to the other server will be delivered locally.

Normally, the smarthost which will be delivering your mail is your ISP's relay server. On a LAN, MAN, or WAN, there may be a local mail server to use.