oscarholmedo

Postfix with Google Apps mail

Jul 19th, 2013
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.71 KB | None | 0 0
  1. sudo apt-get install postfix mailutils
  2. Postfix -> No configuration option
  3.  
  4. sudo nano /etc/postfix/main.cf
  5. ----
  6. smtp_sasl_security_options = noanonymous
  7. relayhost = [smtp.gmail.com]:587
  8. smtp_use_tls = yes
  9. smtp_tls_CAfile = /etc/postfix/cacert.pem
  10. smtp_sasl_auth_enable = yes
  11. smtp_sasl_password_maps = hash:/etc/postfix/googleapps/password
  12. ----
  13.  
  14. sudo mkdir /etc/postfix/googleapps
  15. cd /etc/postfix/googleapps
  16. sudo nano password
  17. ----
  18. [smtp.gmail.com]:587 email@googleappdomain.com:password
  19. ----
  20.  
  21. sudo chmod 600 password
  22. sudo postmap password
  23. sudo cp /etc/ssl/certs/ca-certificates.crt /etc/postfix/cacert.pem
  24. sudo /etc/init.d/postfix restart
  25.  
  26. echo "Testing" | mail -s "Email test" destinationtest@mail.com
Add Comment
Please, Sign In to add comment