gmail_as_a_relay_on_linux_centos8
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_centos8 [2022/03/18 14:26] – created juckins | gmail_as_a_relay_on_linux_centos8 [2022/03/30 07:55] – juckins | ||
---|---|---|---|
Line 5: | Line 5: | ||
dnf install postfix ca-certificates mutt | dnf install postfix ca-certificates mutt | ||
dnf install cyrus-sasl, cyrus-sasl-gssapi, | dnf install cyrus-sasl, cyrus-sasl-gssapi, | ||
+ | systemctl start postfix | ||
+ | systemctl enable postfix | ||
Follow instructions at https:// | Follow instructions at https:// | ||
+ | |||
+ | Or see the same at {{ :: | ||
* Will this also break with less sure apps? | * Will this also break with less sure apps? | ||
* The "Less Secure Apps" is not available in Gmail if your account is configured for 2-factor authentication | * The "Less Secure Apps" is not available in Gmail if your account is configured for 2-factor authentication | ||
* Everything should work OK. | * Everything should work OK. | ||
+ | |||
+ | Perform the following steps as root: | ||
+ | | ||
+ | cd / | ||
+ | cp main.cf main.cf.distro | ||
+ | mkdir / | ||
+ | cd / | ||
+ | vi sasl_passwd | ||
+ | |||
+ | Add this line: | ||
+ | |||
+ | [smtp.gmail.com]: | ||
+ | |||
+ | postmap / | ||
+ | chown root:root / | ||
+ | chmod 0600 / | ||
+ | |||
+ | vi / | ||
+ | |||
+ | Comment out this line: | ||
+ | |||
+ | # | ||
+ | |||
+ | Now wdd to the end of the main.cf file: | ||
+ | |||
+ | # Local Edits | ||
+ | relayhost = [smtp.gmail.com]: | ||
+ | # Enable SASL authentication | ||
+ | smtp_sasl_auth_enable = yes | ||
+ | # Disallow methods that allow anonymous authentication | ||
+ | smtp_sasl_security_options = noanonymous | ||
+ | # Location of sasl_passwd | ||
+ | smtp_sasl_password_maps = hash:/ | ||
+ | # Enable STARTTLS encryption | ||
+ | smtp_tls_security_level = encrypt | ||
+ | # Location of CA certificates | ||
+ | smtp_tls_CAfile = / | ||
+ | |||
+ | Restart postfix: | ||
+ | |||
+ | systemctl restart postfix | ||
gmail_as_a_relay_on_linux_centos8.txt · Last modified: 2022/05/21 18:40 by juckins