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 18:41] – juckins | gmail_as_a_relay_on_linux [2015/11/04 21:34] – juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Directions [[http:// | + | Verified platforms: \\ |
+ | * CentOS7 7.1.1503 (Core) | ||
+ | * CentOS6 6.7 (Final) | ||
- | 1A. Make sure /etc/ssmtp/ssmtp.conf is the distro version (no changes) | + | Directions [[http://mhawthorne.net/ |
- | 1B. Make a backup copy of /etc/postfix/main.cf | + | 1. If installed, make sure /etc/ssmtp/ssmtp.conf is the distro version (no changes) |
- | 2. Edit / | + | 2. Make a backup copy of / |
+ | |||
+ | 3. Edit / | ||
< | < | ||
Line 33: | Line 37: | ||
</ | </ | ||
- | 2. Add your own Gmail credentials to / | + | 4. Add your own Gmail credentials to / |
< | < | ||
[smtp.gmail.com]: | [smtp.gmail.com]: | ||
</ | </ | ||
- | 3. Run the following as root: \\ | + | 5. Run the following as root: \\ |
< | < | ||
# postmap / | # postmap / | ||
</ | </ | ||
- | 4. Make sure the / | + | 6. Make sure the / |
< | < | ||
# chown postfix sasl_passwd* | # chown postfix sasl_passwd* | ||
</ | </ | ||
- | 5. Tighten permissions: | + | 7. Tighten permissions: |
< | < | ||
# chmod 600 sasl_passwd sasl_passwd.db | # chmod 600 sasl_passwd sasl_passwd.db | ||
</ | </ | ||
- | 6. Restart postfix: \\ | + | 8. Restart postfix: \\ |
< | < | ||
# / | # / | ||
Line 62: | Line 66: | ||
</ | </ | ||
- | 7. Send a test message: \\ | + | 9. Edit ~/.muttrc for each user as appropriate: |
- | < | + | |
- | echo 'It works' | mailx -s 'Test message' | + | |
- | </ | + | |
- | + | ||
- | 8. Edit ~/.muttrc for each user as appropriate: | + | |
< | < | ||
Line 74: | Line 73: | ||
#set realname=" | #set realname=" | ||
set realname=$USER@$HOSTNAME | set realname=$USER@$HOSTNAME | ||
+ | </ | ||
+ | |||
+ | 10. Send a test message: \\ | ||
+ | < | ||
+ | mutt -s " | ||
+ | </ | ||
+ | or | ||
+ | < | ||
+ | echo 'It works' | mailx -s 'Test message' | ||
</ | </ | ||
gmail_as_a_relay_on_linux.txt · Last modified: 2024/01/01 12:40 by juckins