Digital Marketing

Configure Postfix Server as a Relay on CentOS

Install Postfix and ensure that the service is enabled:
# yum install postfix cyrus-sasl-plain
# systemctl enable postfix
In case Sendmail is installed, remove it:
# yum remove -y sendmail*

Configure Postfix Server as a Relay

Note that this section applies to both servers. Open /etc/postfix/ for editing and configure the following:
relayhost =
fallback_relay =
Create a new file /etc/postfix/sasl_passwd and add the authentication details of the external SMTP server:
Prevent non-root access:
# chmod 0600 /etc/postfix/sasl_passwd
Create a database file:
# postmap /etc/postfix/sasl_passwd
Check configuration and restart Postfix service:
# postfix check
# systemctl restart postfix
Test it:
# echo test|mailx -s TEST


Popular posts from this blog

Make online money from the Internet