gmail_as_a_relay_on_linux
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
gmail_as_a_relay_on_linux [2015/11/04 19:10] – juckins | gmail_as_a_relay_on_linux [2022/06/08 08:59] – juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Test platforms: \\ | + | ===== Using Gmail as a Relay on CentOS Linux ===== |
- | * CentOS7 7.1.1503 (Core) | + | |
- | * CentOS6 6.7 | + | |
- | * Directions [[http:// | + | |
- | 1. Make sure / | + | Required packages if CentOS7 7.2.1511: \\ |
+ | * postfix (tested version 2.10.1-6.el7 ) | ||
+ | * ca-certificates.noarch (tested version 2015.2.4-70.0.el7_1) | ||
+ | * cyrus-sasl-plain (tested version 2015.2.6-70.1.el7_2) | ||
+ | * Got hint that this is needed from [[http:// | ||
+ | * cyrus-sasl-lib (tested version 2.1.26-20.el7_2) | ||
+ | |||
+ | Other CentOS 7 Notes: | ||
+ | * Best to use this version of mutt: mutt-1.6.2-1.fc22.x86_64.rpm | ||
+ | * Otherwise, you may get errors like: Bad IDN in " | ||
+ | * / | ||
+ | * As root, run ' | ||
+ | * If trouble sending after install, may need to consult [[http:// | ||
+ | |||
+ | CentOS 8 Notes: | ||
+ | * (Nothing special noted) | ||
+ | |||
+ | Directions [[http:// | ||
+ | |||
+ | 1. If it exists, make sure / | ||
2. Make a backup copy of / | 2. Make a backup copy of / | ||
Line 14: | Line 30: | ||
relayhost = [smtp.gmail.com]: | relayhost = [smtp.gmail.com]: | ||
- | # use tls | + | # use tls |
smtp_use_tls=yes | smtp_use_tls=yes | ||
Line 23: | Line 39: | ||
smtp_sasl_password_maps = hash:/ | smtp_sasl_password_maps = hash:/ | ||
+ | # NOTE: This section *should* be configured properly in CentOS8 by default | ||
# list of CAs to trust when verifying server certificate | # list of CAs to trust when verifying server certificate | ||
# | # | ||
Line 57: | Line 74: | ||
8. Restart postfix: \\ | 8. Restart postfix: \\ | ||
+ | < | ||
+ | # / | ||
+ | </ | ||
+ | or | ||
< | < | ||
# / | # / | ||
Line 65: | Line 86: | ||
</ | </ | ||
- | 9. Edit ~/.muttrc for each user as appropriate: \\ | + | 9. Add these lines to the global |
< | < | ||
- | #set from = $USER@$HOSTNAME | + | set from = " |
- | #set from = username@HOSTNAME_OR_ALIAS.domain | + | set realname = "`whoami`@`hostname`" |
- | #set realname=" | + | |
- | set realname=$USER@$HOSTNAME | + | |
</ | </ | ||
Line 78: | Line 97: | ||
mutt -s " | mutt -s " | ||
</ | </ | ||
- | or | + | or to send a message without using a separate file but note mailx is probably not looking at .muttrc: |
< | < | ||
echo 'It works' | mailx -s 'Test message' | echo 'It works' | mailx -s 'Test message' | ||
+ | </ | ||
+ | or | ||
+ | < | ||
+ | mailx -a test.txt -s "test subject" | ||
</ | </ | ||
gmail_as_a_relay_on_linux.txt · Last modified: 2024/01/01 12:40 by juckins