Skip to content

Instantly share code, notes, and snippets.

@mcgrof
Created November 23, 2017 00:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mcgrof/3ca6ff5a005a198c808cdff31d782dbd to your computer and use it in GitHub Desktop.
Save mcgrof/3ca6ff5a005a198c808cdff31d782dbd to your computer and use it in GitHub Desktop.
/etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
append_dot_mydomain = no
readme_directory = no
compatibility_level = 2
smtpd_tls_cert_file=/etc/letsencrypt/live/encrypted.ninja/fullchain.pem
smtpd_tls_key_file=/etc/letsencrypt/live/encrypted.ninja/privkey.pem
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = encrypted.ninja
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = $myhostname, smtp.encrypted.ninja, localhost.encrypted.ninja, , localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
mailbox_command =
smtpd_tls_mandatory_protocols = !SSLv2,!SSLv3,!TLSv1,!TLSv1.1
smtpd_tls_protocols=!SSLv2,!SSLv3,!TLSv1,!TLSv1.1
smtpd_tls_ciphers = high
smtpd_tls_mandatory_ciphers = high
smtp_tls_ciphers = high
smtp_use_tls = yes
smtp_tls_mandatory_ciphers = high
tls_high_cipherlist = ECDH+aRSA+AES256:ECDH+aRSA+AES128:AES256-SHA:AES128+EECDH:AES128+EDH
tls_preempt_cipherlist = yes
smtpd_tls_security_level=may
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_tls_auth_only = yes
smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/address.txt, permit_mynetworks, reject_unauth_destination
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment