Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

What is the absolute, bare minimum, no-hassle, hopefully idiot-proof way of setting up a local smtp server?

If you're going to say postfix, what are these alledgedly bare minimum, idiot proof steps to setting it up?

I'm sort of amazed at how difficult it seems to find this anywhere. I need:

  • a locally hosted smtp server that sends mail to the internet.
  • no tls or saslauth or whatever.
  • only allows mail to come from localhost.
  • no relays.

It seems like there should be some software package somewhere where you install, set up an account and then you have a local smtp server.

I'm not a sysadmin. People say postfix is dead simple but maybe I'm doing it wrong, all the setup docs I see are quite complicated, I actually don't have a spare hour to spend debugging a mailserver. I just want to send mail to the internet. Is it really that hard?

share|improve this question
3  
Interesting question and I've got the same point of view. –  Zenklys Mar 7 '12 at 22:53
add comment

2 Answers

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.

share|improve this answer
    
+1 for ssmtp. Like a charm. –  pkoch Dec 16 '12 at 20:03
add comment

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 port 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.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.