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 [2021/04/02 13:21] juckinsgmail_as_a_relay_on_linux [2023/06/23 10:20] juckins
Line 17: Line 17:
 CentOS 8 Notes: CentOS 8 Notes:
   * (Nothing special noted)   * (Nothing special noted)
 +
 +RockyLinux 9 Notes:
 +  * ?
  
 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 39: Line 42:
 smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
  
-# NOTE: This section *should* be configured properly in CentOS8 by default+# NOTE: This section *should* be configured properly in CentOS8 and RockyLinux9 by default
 # list of CAs to trust when verifying server certificate # list of CAs to trust when verifying server certificate
 #smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt #smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
Line 86: Line 89:
 </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 = $USER@$HOSTNAME +set from = "`whoami`@`hostname`
-#set from = username@HOSTNAME_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 103: Line 103:
 <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" user@domain < /dev/null
 </code> </code>
  
gmail_as_a_relay_on_linux.txt · Last modified: 2024/01/01 12:40 by juckins