gmail_as_a_relay_on_linux
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revisionNext revisionBoth sides next revision | ||
gmail_as_a_relay_on_linux [2015/11/04 18:16] – created juckins | gmail_as_a_relay_on_linux [2015/11/04 19:37] – juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Directions [[http:// | + | Verified platforms: \\ |
+ | * CentOS7 7.1.1503 (Core) | ||
+ | * CentOS6 6.7 (Final) | ||
- | 1. Make a backup copy of /etc/postfix/main.cf | + | Directions [[http:// |
- | 2. Edit / | + | 1. Make sure / |
+ | |||
+ | 2. Make a backup copy of / | ||
+ | |||
+ | 3. Edit / | ||
< | < | ||
Line 31: | 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 60: | Line 66: | ||
</ | </ | ||
- | 7. Send a test message: \\ | + | 9. Edit ~/.muttrc for each user as appropriate: \\ |
< | < | ||
- | echo 'It works' | mailx -s 'Test message' | + | #set from = $USER@$HOSTNAME |
+ | #set from = username@HOSTNAME_OR_ALIAS.domain | ||
+ | #set realname=" | ||
+ | set realname=$USER@$HOSTNAME | ||
</ | </ | ||
- | 8. Check mutt configuration for proper | + | 10. Send a test message: \\ |
+ | < | ||
+ | mutt -s "Test1" | ||
+ | </ | ||
+ | or | ||
+ | < | ||
+ | echo 'It works' | mailx -s 'Test message' | ||
+ | </ | ||
Other links:\\ | Other links:\\ |
gmail_as_a_relay_on_linux.txt · Last modified: 2024/01/01 12:40 by juckins