Postfix Installation (en)
Jump to navigation
Jump to search
Installing postfix on Ubuntu can be done using the command:
apt update apt -y install postfix
During the installation process:
- Select Postfix to operate as an - internet site.
- Fill in the hostname with your Fully Qualified Domain Name (FQDN), for example, server.company.com
If you want to act as a relay for machines on your LAN, you need to edit:
# vi /etc/postfix/main.cf
Ensure it contains:
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 forward/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 is an issue with IPv6 add to main.cf:
inet_protocols = ipv4