Christopher Juckins

SysAdmin Tips, Tricks and other Software Tools

User Tools

Site Tools


gmail_as_a_relay_on_linux

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revisionBoth sides next revision
gmail_as_a_relay_on_linux [2015/11/04 18:41] juckinsgmail_as_a_relay_on_linux [2015/11/04 18:44] juckins
Line 1: Line 1:
 Directions [[http://mhawthorne.net/posts/postfix-configuring-gmail-as-relay.html|based on this page by Matthew Hawthorne]] worked: \\ Directions [[http://mhawthorne.net/posts/postfix-configuring-gmail-as-relay.html|based on this page by Matthew Hawthorne]] worked: \\
  
-1A. Make sure /etc/ssmtp/ssmtp.conf is the distro version (no changes)+1. Make sure /etc/ssmtp/ssmtp.conf is the distro version (no changes)
  
-1B. Make a backup copy of /etc/postfix/main.cf+2. Make a backup copy of /etc/postfix/main.cf
  
-2. Edit /etc/postfix/main.cf to have these settings:+3. Edit /etc/postfix/main.cf to have these settings:
  
 <code> <code>
Line 33: Line 33:
 </code> </code>
  
-2. Add your own Gmail credentials to /etc/postfix/sasl_passwd \\+4. Add your own Gmail credentials to /etc/postfix/sasl_passwd \\
 <code> <code>
 [smtp.gmail.com]:587  username:password [smtp.gmail.com]:587  username:password
 </code> </code>
  
-3. Run the following as root: \\+5. Run the following as root: \\
 <code> <code>
 # postmap /etc/postfix/sasl_passwd # postmap /etc/postfix/sasl_passwd
 </code> </code>
  
-4. Make sure the /etc/sasl_passwd* files are owned by the postfix user: \\+6. Make sure the /etc/sasl_passwd* files are owned by the postfix user: \\
 <code> <code>
 # chown postfix sasl_passwd* # chown postfix sasl_passwd*
 </code> </code>
  
-5. Tighten permissions: \\+7. Tighten permissions: \\
 <code> <code>
 # chmod 600 sasl_passwd sasl_passwd.db # chmod 600 sasl_passwd sasl_passwd.db
 </code> </code>
  
-6. Restart postfix: \\+8. Restart postfix: \\
 <code> <code>
 # /etc/init.d/postfix reload # /etc/init.d/postfix reload
Line 62: Line 62:
 </code> </code>
  
-7. Send a test message: \\ +9. Edit ~/.muttrc for each user as appropriate: \\
-<code> +
-echo 'It works' | mailx -s 'Test message' [email protected] +
-</code> +
- +
-8. Edit ~/.muttrc for each user as appropriate: \\+
  
 <code> <code>
Line 74: Line 69:
 #set realname="juckins@lightning" #set realname="juckins@lightning"
 set realname=$USER@$HOSTNAME set realname=$USER@$HOSTNAME
 +</code>
 +
 +10. Send a test message: \\
 +<code>
 +echo 'It works' | mailx -s 'Test message' [email protected]
 </code> </code>
  
gmail_as_a_relay_on_linux.txt · Last modified: 2024/01/01 12:40 by juckins