Configure SSMTP on Linux/Centos
1. install ssmtp package
#yum install ssmtp
2. Configure SSMTP - edit vi /etc/ssmtp/ssmtp.conf
#mailhub=mail
root=abc@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=abc@gmail.com
AuthPass=xxxxxx
UseSTARTTLS=YES
TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
RewriteDomain=localhost
Hostname=localhost
save and exit.
3. Test sendmail command line
#ssmtp xxxx@gmail.com
type masg
Ctrl+D ( close and send the massage)
4. Send mail to multiple recipients using in script
#ssmtp abc@gmail.com, zyz@gmail.com < msg.txt
1. install ssmtp package
#yum install ssmtp
2. Configure SSMTP - edit vi /etc/ssmtp/ssmtp.conf
#mailhub=mail
root=abc@gmail.com
mailhub=smtp.gmail.com:587
AuthUser=abc@gmail.com
AuthPass=xxxxxx
UseSTARTTLS=YES
TLS_CA_File=/etc/pki/tls/certs/ca-bundle.crt
RewriteDomain=localhost
Hostname=localhost
save and exit.
3. Test sendmail command line
#ssmtp xxxx@gmail.com
type masg
Ctrl+D ( close and send the massage)
4. Send mail to multiple recipients using in script
#ssmtp abc@gmail.com, zyz@gmail.com < msg.txt
No comments:
Post a Comment