Created
February 19, 2015 21:06
Quick way to make SmartOS Zone send emails through gmail
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkgin -y in cy2-login | |
sed -i "s|localhost|localhost localhost.localdomain|g" /etc/hosts | |
echo "relayhost = [smtp.gmail.com]:587" >> /opt/local/etc/postfix/main.cf | |
echo "smtp_use_tls = yes" >> /opt/local/etc/postfix/main.cf | |
echo "smtp_sasl_auth_enable = yes" >> /opt/local/etc/postfix/main.cf | |
echo "smtp_sasl_password_maps = hash:/opt/local/etc/postfix/relay_passwords" >> /opt/local/etc/postfix/main.cf | |
echo "smtp_sasl_security_options = noanonymous" >> /opt/local/etc/postfix/main.cf | |
echo "smtp_always_send_ehlo = yes" >> /opt/local/etc/postfix/main.cf | |
echo "[smtp.gmail.com]:587 [email protected]:thepassword" > /opt/local/etc/postfix/relay_passwords | |
echo "root: [email protected]" >> /opt/local/etc/postfix/aliases | |
postmap /opt/local/etc/postfix/relay_passwords | |
postalias /opt/local/etc/postfix/aliases | |
svcadm restart postfix | |
echo "Test mail" | mail -s "Test" [email protected] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment