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 revision Previous revision
Next revision
Previous revision
gmail_as_a_relay_on_linux [2020/09/30 16:29]
juckins
gmail_as_a_relay_on_linux [2022/06/08 08:59] (current)
juckins
Line 1: Line 1:
 ===== Using Gmail as a Relay on CentOS Linux ===== ===== Using Gmail as a Relay on CentOS Linux =====
- 
-Required packages if CentOS6 6.7: \\ 
-  * postfix (tested version 2:2.6.6-6.el6_5) 
-  * ca-certificates.noarch (tested version 2015.2.4-65.0.1.el6_6) 
  
 Required packages if CentOS7 7.2.1511: \\ Required packages if CentOS7 7.2.1511: \\
Line 20: Line 16:
  
 CentOS 8 Notes: CentOS 8 Notes:
-  * (Nothing)+  * (Nothing special noted)
  
 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 90: Line 86:
 </code> </code>
  
-9. Edit ~/.muttrc for each user as appropriate: \\+9. Add these lines to the global /etc/Muttrc.local (easier than adding it to each user's $HOME/.muttrc): \\
  
 <code> <code>
-#set from = [email protected]$HOSTNAME +set from = "`whoami`@`hostname`
-#set from = [email protected]_OR_ALIAS.domain +set realname = "`whoami`@`hostname`"
-#set realname="juckins@lightning+
-set realname="$USER@$HOSTNAME(works in CENTOS7, mutt-1.5.21-26.el7.x86_64 but *not* via cron sending) +
 </code> </code>
  
Line 107: Line 100:
 <code> <code>
 echo 'It works' | mailx -s 'Test message' [email protected] echo 'It works' | mailx -s 'Test message' [email protected]
 +</code>
 +or 
 +<code>
 +mailx -a test.txt -s "test subject" [email protected] < /dev/null
 </code> </code>
  
gmail_as_a_relay_on_linux.1601497750.txt.gz · Last modified: 2020/09/30 16:29 by juckins