smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
+# Milter configuration
+# Based on https://www.linode.com/docs/guides/configure-spf-and-dkim-in-postfix-on-debian-9/#testing-postfix-dkim-on-debian-9-with-a-gmail-test
+# http://www.opendkim.org/opendkim-README
+# http://www.postfix.org/MILTER_README.html
+# OpenDKIM
+milter_default_action = accept
+# Postfix ≥ 2.6 milter_protocol = 6, Postfix ≤ 2.5 milter_protocol = 2
+milter_protocol = 6
+smtpd_milters = unix:opendkim/opendkim.sock
+non_smtpd_milters = $smtpd_milters
+
# Alex Dehnert, 2017-11-01
# Based on https://serverfault.com/questions/663979/virtual-alias-domains-how-to-use-different-ip-addresses-when-forwarding-mail
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject
-o milter_macro_daemon_name=ORIGINATING
- -o smtpd_proxy_filter=127.0.0.1:10025
+ -o content_filter=smtp:127.0.0.1:10025
-o smtpd_client_connection_count_limit=15
pickup fifo n - y 60 1 pickup
cleanup unix n - y - 0 cleanup
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
#smtp inet n - - - - smtpd
+
#
# Before-filter SMTP server. Receive mail from the network and
# pass it to the content filter on localhost port 10025.
# on localhost port 10026.
#
smtp inet n - y - 5 smtpd
- -o smtpd_proxy_filter=127.0.0.1:10025
+ -o content_filter=smtp:127.0.0.1:10025
-o smtpd_client_connection_count_limit=15
127.0.0.1:10026 inet n - n - - smtpd
-o smtpd_authorized_xforward_hosts=127.0.0.0/8
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o smtpd_data_restrictions=
-o mynetworks=127.0.0.0/8
- -o receive_override_options=no_unknown_recipient_checks
+ -o receive_override_options=no_unknown_recipient_checks,no_milters
smtp-forward unix - - n - - smtp -o smtp_bind_address=18.102.208.11
smtp-local unix - - n - - smtp -o smtp_bind_address=18.102.208.44