A Simple Gmail SSMTP(Secure Simple Mail Transfer Protocol) fully automated installation shell script for all Ubuntu versions.SSMTP can be used only for sending mails alone.It doesn't has any features life receiving mails,drafts etc.
Updating the system
apt update -y
Installing mailutils
apt-get install mailutils -y
Installing smtp mail server
apt-get install ssmtp -y
Gets the mail id for mailing purposes, Which is the sender mail address and from this mail id mails will be sent ,Stores in ssmtp.conf file
echo -n "provide your email id:"
read mail
echo "AuthUser=$mail" >> /etc/ssmtp/ssmtp.conf
Gets the respective mail password for mailing purposes.
echo -n "Provide your email password:"
read password;
echo "AuthPass=$password" >> /etc/ssmtp/ssmtp.conf
Some configurations will be updated in-order to do a secure mail transfer.587 ssmtp port.
echo "mailhub=smtp.gmail.com:587" >> /etc/ssmtp/ssmtp.conf
echo "UseSTARTTLS=YES" >> /etc/ssmtp/ssmtp.conf
echo "FromLineOverride=YES" >> /etc/ssmtp/ssmtp.conf
SSMTP Fully Automated Installation Shell Script Available in Github
Top comments (0)