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.
Step-by-step
- 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
- Choose
Internet Site - Enter the FQDN of your server. This should be somthing like
server.example.com - If your server should only send mail, but not receiving any, edit the following line in
/etc/postfix/main.cf
inet_interfaces = alland change it toinet_interfaces = loopback-onlyand restart postfix withsudo 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.
Pingback: Setting up an Ubuntu Server | Stefan Profanter -- KB Blog