RHEL7: Configure a system to forward all email to a central mail server.

https://www.certdepot.net/rhel7-configure-system-forward-email-central-mail-server/

# yum install -y postfix
# systemctl enable postfix
# systemctl restart postfix
# /etc/postfix/main.cf 
# postfix check
# postconf -n
# systemctl restart postfix
# postconf -e 'relayhost = 192.168.1.1'
# echo "This is a test." | mail -s "Test" me@example.com
# mailq
# postsuper -r 822FA3DE4
# postsuper -d 822FA3DE4
# tail -f /var/log/maillog
# firewall-cmd --permanent --add-service=smtp
# firewall-cmd --reload

Viet Luu has written 152 articles

Leave a Reply