gmail_on_linux_with_ssmtp
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
gmail_on_linux_with_ssmtp [2015/11/04 18:12] – juckins | gmail_on_linux_with_ssmtp [2025/03/20 19:56] (current) – juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | Sending email on linux using SSMTP. | + | ==== Sending email via Gmail using SSMTP ==== |
[[http:// | [[http:// | ||
Line 7: | Line 7: | ||
[[http:// | [[http:// | ||
- | Edit ~/.muttrc for each user as appropriate: | + | Edit ~/.muttrc for each user as appropriate |
< | < | ||
Line 47: | Line 47: | ||
4 November 2015 | 4 November 2015 | ||
- | Gmail stopped working. | + | Gmail stopped working. |
This did not work: https:// | This did not work: https:// | ||
+ | Try a PHP or Perl solution, but does it require SSMTP or MSMTP? | ||
- | Directions | + | Final answer was to configure |
- | + | ||
- | 1. Make a backup copy of / | + | |
- | + | ||
- | 2. Edit / | + | |
- | + | ||
- | < | + | |
- | # sets gmail as relay | + | |
- | relayhost = [smtp.gmail.com]: | + | |
- | + | ||
- | # use tls | + | |
- | smtp_use_tls=yes | + | |
- | + | ||
- | # use sasl when authenticating to foreign SMTP servers | + | |
- | smtp_sasl_auth_enable = yes | + | |
- | + | ||
- | # path to password map file | + | |
- | smtp_sasl_password_maps = hash:/ | + | |
- | + | ||
- | # list of CAs to trust when verifying server certificate | + | |
- | # | + | |
- | # Below is provided by ca-certificates package (Mozilla CA root certificate bundle) | + | |
- | smtp_tls_CAfile = / | + | |
- | + | ||
- | # eliminates default security options which are incompatible with Gmail | + | |
- | smtp_sasl_security_options = | + | |
- | + | ||
- | # add debugging | + | |
- | debug_peer_list=smtp.gmail.com | + | |
- | debug_peer_level=3 | + | |
- | </ | + | |
- | + | ||
- | 2. Add your own Gmail credentials to / | + | |
- | < | + | |
- | [smtp.gmail.com]: | + | |
- | </ | + | |
- | + | ||
- | 3. Run the following | + | |
- | < | + | |
- | # postmap / | + | |
- | </ | + | |
- | + | ||
- | 4. Make sure the / | + | |
- | < | + | |
- | # chown postfix sasl_passwd* | + | |
- | </ | + | |
- | + | ||
- | 5. Tighten permissions: | + | |
- | < | + | |
- | # chmod 600 sasl_passwd sasl_passwd.db | + | |
- | </ | + | |
- | + | ||
- | 6. Restart postfix: \\ | + | |
- | < | + | |
- | # / | + | |
- | </ | + | |
- | or | + | |
- | < | + | |
- | # service postfix restart | + | |
- | </ | + | |
- | + | ||
- | 7. Send a test message: \\ | + | |
- | < | + | |
- | echo 'It works' | mailx -s 'Test message' | + | |
- | </ | + | |
- | + | ||
- | 8. Check mutt configuration for proper " | + | |
- | + | ||
- | Other links:\\ | + | |
- | + | ||
- | [[http:// | + | |
- | [[http:// | + | |
- | [[https:// | + | |
- | [[https:// | + |
gmail_on_linux_with_ssmtp.1446678766.txt.gz · Last modified: 2015/11/04 18:12 by juckins