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 revision
Previous revision
Next revisionBoth sides next revision
gmail_as_a_relay_on_linux [2015/11/04 21:46] juckinsgmail_as_a_relay_on_linux [2016/04/13 21:11] juckins
Line 1: Line 1:
 ===== Using Gmail as a Relay on CentOS Linux ===== ===== Using Gmail as a Relay on CentOS Linux =====
  
-Required packages: \\ +Required packages if CentOS6 6.7: \\ 
-  * Postfix +  * postfix (tested version 2:2.6.6-6.el6_5) 
-  * ca-certificates-2015.2.4-65.0.1.el6_6.noarch (or current version)+  * ca-certificates.noarch (tested version 2015.2.4-65.0.1.el6_6)
  
-Verified platforms: \\ +Required packages if CentOS7 7.1.1503: \\ 
-  * CentOS7 7.1.1503 (Core+  * postfix (tested version 2:2.10.1-6.el7
-  * CentOS6 6.(Final)+  * ca-certificates.noarch (tested version 2015.2.4-70.0.el7_1) 
 + 
 +Other CentOS 7 Notes: 
 +  * May need to use [[http://unix.stackexchange.com/questions/109473/after-updating-ssmtp-to-version-2-61-i-cannot-send-mail-via-gmail|Use this link]]
  
 Directions [[http://mhawthorne.net/posts/postfix-configuring-gmail-as-relay.html|based on this page by Matthew Hawthorne]]: \\ Directions [[http://mhawthorne.net/posts/postfix-configuring-gmail-as-relay.html|based on this page by Matthew Hawthorne]]: \\
Line 21: Line 24:
 relayhost = [smtp.gmail.com]:587 relayhost = [smtp.gmail.com]:587
  
- use tls+# use tls
 smtp_use_tls=yes smtp_use_tls=yes
  
Line 64: Line 67:
  
 8. Restart postfix: \\ 8. Restart postfix: \\
 +<code>
 +# /bin/systemctl restart  postfix.service
 +</code>
 +or
 <code> <code>
 # /etc/init.d/postfix reload # /etc/init.d/postfix reload
Line 77: Line 84:
 #set from = $USER@$HOSTNAME #set from = $USER@$HOSTNAME
 #set from = username@HOSTNAME_OR_ALIAS.domain #set from = username@HOSTNAME_OR_ALIAS.domain
-#set realname="juckins@lightning" +#set realname=$USER@$HOSTNAME - doesn't get the hostname (?) 
-set realname=$USER@$HOSTNAME+set realname="juckins@lightning" 
 </code> </code>
  
gmail_as_a_relay_on_linux.txt · Last modified: 2024/01/01 12:40 by juckins