-> Check der Konfiguration
bash# postconf 1> /dev/null
-> Mach ein Backup!
bash# tar czf /root/postfix-$(date "+%F").tar.gz /etc/postfix
-> Für check's mit diff
bash# postconf > /root/postconf-$(date "+%F")
-> Disable VRYF
unix# postconf -e disable_vrfy_command=yes
-> nur Mails von localhosts
bash# postconf -e inet_interfaces=loopback-only
bash# postconf -e mynetworks="127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128"
/etc/postfix/main.cf:
...
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
...
-> Nur Spamer machen das nicht
bash# postconf -e smtpd_helo_required=yes
-> Outgoing Mail's
relayhost = [mail.ethz.ch]:587
smtp_tls_security_level = may
smtp_use_tls = yes
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/passwd
smtp_sasl_mechanism_filter = login
smtp_sasl_security_options = noanonymous
smtp_tls_CApath = /etc/pki/tls/certs
smtp_tls_CAfile = /etc/pki/tls/certs/ca-bundle.crt
/etc/postfix/passwd:
...
[mail.ethz.ch]:587 username:password
...
bash# postmap /etc/postfix/passwd
Ist etwas knapp gehalten.