Thursday, March 6, 2025

Configure SMTP server

 yum install postfix


cd /etc/postfix/


#Edit main.cf and add entry

relayhost <emailserver>


#check relay host

cat main.cf | grep -i relayhost

systemctl restart postfix

systemctl status postfix


#check email using sendmail

echo "testemail" | sendmail -v <testemail@domain>


#check email sent using mailq

mailq


#check for any errors

tail -f /var/log/maillog


No comments:

Post a Comment