Installing Postfix Mail Server
This post is part of the series ‘Setting up Ubuntu Server and make it secure’.
Postfix is a mail server which can be used to receive and send mails through your Ubuntu Server installation.
The following steps assume, that you mainly use the server to send emails and you receive emails through another server, example GMail.
- To install postfix, execute the following:
sudo apt-get install postfix libsasl2-modules bsd-mailx
- Then there opens a interactive graphical mode, where you can setup Postfix. Simply follow the following steps for the most common setup
- Enter the FQDN of your server. This should be somthing like
- If your server should only send mail, but not receiving any, edit the following line in
inet_interfaces = alland change it to
inet_interfaces = loopback-onlyand restart postfix with
sudo service postfix restart
- You can add a
~/.forwardfile in the root’s and your’s home directory to automatically forward all mails to your real mail address. The only content of the file should be your mail address.