

There is an quicker way than editing the /etc/postfix/main.cf file, you can also use the postconf command. However, when changing the inet_interfaces parameter, you need to restart all the processes. Note: It is normally not necessary to restart the processes when parameters are changed, a reload is enough. Reload the postfix configuration: # systemctl restart postfix Note3: If you don’t set up a DNS server (but use the /etc/hosts file) or if your DNS server doesn’t deal with MX records, you can specify relayhost =, this form turns off MX lookups.Ĭheck the non-default configuration: # postconf -n

Note2: If you’ve got a DNS server dealing with MX records, you can specify relayhost = instead of the IP address. Note1: Be careful not to specify $mydomain in the mydestination option (this will store all the mails locally, which is not exactly what you want). Let’s assume that your server is called on the 192.168.1.0/24 network and your central mail server (outgoing mail gateway) is called at 192.168.1.1.Įdit the /etc/postfix/main.cf file and change the following directives: myhostname = Details related to the mail gateway configuration will be shown later. This tutorial will explain how to put in place this configuration. The RHCE 7 exam objective seems to be more geared towards the null-client configuration. the system accepts any mail from the local network and forwards them with the ones sent by the local users to a central mail server: this is the mail gateway configuration.the system doesn’t receive any mail from outside but forwards all mails sent by local users (even mails from local users to local users) to a central mail server: this is the null-client configuration,.Start the postfix service (normally already started): # systemctl restart postfix Main Configurations Install the postfix package if it is not already there: # yum install -y postfixĪctivate the postfix service at boot (normally already enabled): # systemctl enable postfix The configuration of a master DNS server can be avoided by using the syntax (see below) or the IP address of the mail gateway. In order to test this configuration, you will need to configure a central mail server.
