# dnf install mailx
Send test email
# mail <email_address>
Subject: test
test
.
# tail -f /var/log/maillog
Connection timeout...
Email forwarding settings
setting file
/etc/postfix/sasl_passwd
[smtp.gmail.com]:587 <google account email address>:16-digit app password
# postmap /etc/postfix/sasl_passwd
setting file
/etc/postfix/main.cf
relayhost = [smtp.gmail.com]:587
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_tls_security_options = noanonymous
smtp_sasl_mechanism_filter = plain
# systemctl restart postfix
firewalld settings
# firewall-cmd --list-services --permanet
cockpit dhcpv6-client ssh
# firewall-cmd --add-service=smtp --permanent
Success
# firewall-cmd --add-service=smtps --permanent
Success
# firewall-cmd --list-services --permanet
cockpit dhcpv6-client smtp smtps ssh
Send test email
# mail <email_address>
Subject: test
test
.
Check the queue
# postqueue -p
(Reference) Delete queue
# postsuper -d ALL deferred
Recommended Posts