mail

Setup a mail server to send email only

SMTP server

Here I just choose postfix. Someone on the Internet said the configuration was very complicated, but after I install postfix, I found the default config file is OK if you just want to send email from you locathost.

1
sudo apt-get install postfix

At first time when you test sending email, you might encount with such error:

1
2
postdrop: warning: unable to look up public/pickup: 
No such file or directory

That's because old sendmail daemon still running, just stop it and restart postfix can fix:

1
2
3
$ sudo /etc/init.d/sendmail stop 
$ sudo  mkfifo /var/spool/postfix/public/pickup
$ sudo /etc/init.d/postfix restart