Is there a simple mail server I can install?
Just postfix
is needed.
For setup, just use the defaults. Internet site. When you get to it, there's a section for setting which computers are allowed to relay mail through the server. The default is 127.0.0.1 (worded slightly more verbosely) and this is good. This means even if another computer can connect to postfix, postfix
wont allow it to send mail anwhere but to the destinations postfix accepts as "local" domains.
But good network security on top won't hurt. A router blocking incoming connections and/or a firewall (see ufw
) will stop anybody else contacting postfix
.
If you need to reconfigure, just run:
sudo dpkg-reconfigure postfix
The easiest one I've ever installed is postfix with dovecot. There is a dovecot-postfix package, but it also looks like the Ubuntu server team has packaged this as mail-stack-delivery :
Description: mail server delivery agent stack provided by Ubuntu server team
Ubuntu's mail stack provides fully operational delivery with
safe defaults and additional options. Out of the box it supports IMAP,
POP3 and SMTP services with SASL authentication and Maildir as default
storage engine.
Looking in the Software Center, I see that dovecot-postfix is present as a meta-pacakge (but I don't know if it will be called that a release or two from now). But that is what I'd recommend -- it's straightforward and secure.
From the command line on my 10.10 desktop, I installed this via apt-get :
sudo apt-get install dovecot-postfix
Give it a shot if you like, and if you have questions, just start a new post.
Here's a oldish (2009) Ubuntu Server Blog post that gives some of the details on the dovecot-postfix configuration.
I'm trying to find out more information on the current status of Ubuntu-centric mailserver projects. Right now I'm not finding much more than a May 2010 wiki post about making anti-spam/virus integration easier.
If you only want to debug locally, you can follow this approach presented at stackoverflow. Single line in php.ini, no additional packages. Writes your outgoing mail to a file which can be opened with mail client in case you want to debug html mail.
sendmail_path = 'tee /tmp/mylocal.mail > /dev/null'