Postfix: Installation (en)
Jump to navigation
Jump to search
Install postfix on Ubuntu can be done using the command:
apt update apt -y install postfix
During the installation process:
- Choose Postfix to operate as an internet site.
- Fill in the hostname with Fully Qualified Domain Name (FQDN), for example, server.company.com
If you want to act as a relay for machines on the LAN, you need to edit:
# vi /etc/postfix/main.cf
Ensure it includes:
mydestination = ourdomain.com, domain.com, example.com LIST ALL OUR DOMAINS HERE inet_interfaces = all mynetworks = ip-address-LAN/subnet, 192.168.0.0/24
If you want postfix to relay mail to the Internet to an ISP's SMTP Server, depending on the ISP you use, you can add one of the following commands, for example:
relayhost = smtp.telkom.net relayhost = smtp.indosat.net.id relayhost = smtp.cbn.net.id relayhost = smtp.indo.net.id relayhost = mail.fast.net.id
Restart the Postfix MailServer:
# /etc/init.d/postfix restart
IPv6 Problem
If there are problems with IPv6 add in main.cf:
inet_protocols = ipv4