# See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be used as the name. The Debian default # is /etc/mailname. #myorigin = /etc/mailname smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) biff = no # appending .domain is the MUA's job. append_dot_mydomain = no # Uncomment the next line to generate "delayed mail" warnings #delay_warning_time = 4h readme_directory = no # See http://www.postfix.org/COMPATIBILITY_README.html -- default to 2 on # fresh installs. compatibility_level = 2 # TLS parameters ##### SmartMachine Begin. #smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_cert_file=/etc/letsencrypt/live/%s/fullchain.pem #smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_key_file=/etc/letsencrypt/live/%s/key.pem smtpd_tls_security_level=may smtpd_tls_auth_only=yes smtpd_sasl_type=dovecot smtpd_sasl_path=private/auth smtpd_sasl_auth_enable=yes smtpd_sasl_security_options=noanonymous, noplaintext smtpd_sasl_tls_security_options=noanonymous smtpd_sender_login_maps=mysql:/etc/postfix/mysql-sender-login-maps.cf ##### SmartMachine Close. smtp_tls_CApath=/etc/ssl/certs smtp_tls_security_level=may smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache ##### SmartMachine Begin. smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_non_fqdn_helo_hostname smtpd_sender_restrictions = reject_sender_login_mismatch, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unknown_sender_domain smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unlisted_recipient, reject_unauth_destination, check_policy_service unix:private/policyd-spf, check_policy_service unix:private/quota-status ##### SmartMachine Close. smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination ##### SmartMachine Begin. #myhostname = 3df7015f65ea myhostname = %s ##### SmartMachine Close. alias_maps = hash:/etc/aliases alias_database = hash:/etc/aliases ##### SmartMachine Begin. mydomain = %s ##### SmartMachine Close. myorigin = $mydomain ##### SmartMachine Begin. #mydestination = , $myhostname, 3df7015f65ea, localhost.localdomain, localhost mydestination = localhost ##### SmartMachine Close. 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 ##### SmartMachine Begin. # Handing off local delivery to Dovecot's LMTP, and telling it where to store mail virtual_transport = lmtp:unix:private/dovecot-lmtp # Virtual domains, users, and aliases # Domains that are not aliases virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual-mailbox-domains.cf # Users virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-mailbox-maps.cf # Domains that are aliases of other domains virtual_alias_domains = mysql:/etc/postfix/mysql-virtual-alias-domains.cf # Alias mappings for domains, users and users to themselves. virtual_alias_maps = mysql:/etc/postfix/mysql-virtual-alias-maps-domains.cf, mysql:/etc/postfix/mysql-virtual-alias-maps-masters.cf, mysql:/etc/postfix/mysql-virtual-alias-maps-users.cf, mysql:/etc/postfix/mysql-virtual-alias-maps-userstothemselves.cf # Even more Restrictions and MTA params disable_vrfy_command = yes strict_rfc821_envelopes = yes #smtpd_etrn_restrictions = reject #smtpd_reject_unlisted_sender = yes #smtpd_reject_unlisted_recipient = yes smtpd_helo_required = yes smtpd_timeout = 30s smtp_helo_timeout = 15s smtp_rcpt_timeout = 15s smtpd_recipient_limit = 40 minimal_backoff_time = 180s maximal_backoff_time = 3h # Reply Rejection Codes invalid_hostname_reject_code = 550 non_fqdn_reject_code = 550 unknown_address_reject_code = 550 unknown_client_reject_code = 550 unknown_hostname_reject_code = 550 unverified_recipient_reject_code = 550 unverified_sender_reject_code = 550 # SPF # postfix-policyd-spf-python policyd-spf_time_limit = 3600 # OpenDKIM # Milter configuration milter_default_action = accept # Postfix >= 2.6 milter_protocol = 6, Postfix <= 2.5 milter_protocol = 2 milter_protocol = 6 smtpd_milters = local:opendkim/opendkim.sock non_smtpd_milters = local:opendkim/opendkim.sock ##### SmartMachine Close.