Skip to content

Instantly share code, notes, and snippets.

@obedmhg
Created February 23, 2021 00:07
Show Gist options
  • Save obedmhg/3ab1626fa0e1ff01459f8067c4b27619 to your computer and use it in GitHub Desktop.
Save obedmhg/3ab1626fa0e1ff01459f8067c4b27619 to your computer and use it in GitHub Desktop.
Configure smtp on linux
#install sendemail
yum install sendmail
#configure email to allow send emails other than localhost
vi /etc/mail/sendmail.mc
# change from
#DAEMON_OPTIONS(`Port=smtp, Addr=127.0.0.1 Name=MTA’)dnl
# to
#DAEMON_OPTIONS(`Port=smtp, Name=MTA’)dnl
#open default smtp port on the firewall
firewall-cmd --zone=public --add-port=25/tcp --permanent
firewall-cmd --reload
#start the service
service sendmail restart
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment