2019-09-02 18:39:08 +02:00
|
|
|
# --------------------------------------------------------------------------
|
|
|
|
# Please create a file "extra.cf" for persistent overrides to main.cf
|
|
|
|
# --------------------------------------------------------------------------
|
2016-12-09 20:39:02 +01:00
|
|
|
biff = no
|
|
|
|
append_dot_mydomain = no
|
2016-12-12 21:53:58 +01:00
|
|
|
smtpd_tls_cert_file = /etc/ssl/mail/cert.pem
|
|
|
|
smtpd_tls_key_file = /etc/ssl/mail/key.pem
|
2019-10-19 12:48:56 +02:00
|
|
|
tls_server_sni_maps = hash:/opt/postfix/conf/sni.map
|
2018-04-26 14:06:10 +02:00
|
|
|
smtpd_tls_received_header = yes
|
2016-12-09 20:39:02 +01:00
|
|
|
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
|
2019-09-02 09:31:26 +02:00
|
|
|
smtpd_relay_restrictions = permit_mynetworks,
|
|
|
|
permit_sasl_authenticated,
|
|
|
|
defer_unauth_destination
|
2023-12-29 20:19:26 +01:00
|
|
|
smtpd_forbid_bare_newline = yes
|
2019-09-02 09:31:26 +02:00
|
|
|
# alias maps are auto-generated in postfix.sh on startup
|
2016-12-09 20:39:02 +01:00
|
|
|
alias_maps = hash:/etc/aliases
|
|
|
|
alias_database = hash:/etc/aliases
|
|
|
|
relayhost =
|
2021-04-07 21:28:53 +02:00
|
|
|
mynetworks_style = subnet
|
2016-12-09 20:39:02 +01:00
|
|
|
mailbox_size_limit = 0
|
|
|
|
recipient_delimiter = +
|
|
|
|
inet_interfaces = all
|
|
|
|
inet_protocols = all
|
|
|
|
bounce_queue_lifetime = 1d
|
|
|
|
broken_sasl_auth_clients = yes
|
|
|
|
disable_vrfy_command = yes
|
|
|
|
maximal_backoff_time = 1800s
|
2019-06-08 15:10:46 +02:00
|
|
|
maximal_queue_lifetime = 5d
|
2019-06-09 07:39:36 +02:00
|
|
|
delay_warning_time = 4h
|
2018-10-01 22:06:20 +02:00
|
|
|
message_size_limit = 104857600
|
2021-09-16 21:31:46 +02:00
|
|
|
milter_default_action = tempfail
|
2016-12-09 20:39:02 +01:00
|
|
|
milter_protocol = 6
|
|
|
|
minimal_backoff_time = 300s
|
|
|
|
plaintext_reject_code = 550
|
2019-09-02 09:31:26 +02:00
|
|
|
postscreen_access_list = permit_mynetworks,
|
2020-02-06 08:28:05 +01:00
|
|
|
cidr:/opt/postfix/conf/custom_postscreen_whitelist.cidr,
|
2019-09-02 09:31:26 +02:00
|
|
|
cidr:/opt/postfix/conf/postscreen_access.cidr,
|
|
|
|
tcp:127.0.0.1:10027
|
2016-12-09 20:39:02 +01:00
|
|
|
postscreen_bare_newline_enable = no
|
|
|
|
postscreen_blacklist_action = drop
|
|
|
|
postscreen_cache_cleanup_interval = 24h
|
|
|
|
postscreen_cache_map = proxy:btree:$data_directory/postscreen_cache
|
|
|
|
postscreen_dnsbl_action = enforce
|
2019-09-18 07:58:54 +02:00
|
|
|
postscreen_dnsbl_threshold = 6
|
2016-12-09 20:39:02 +01:00
|
|
|
postscreen_dnsbl_ttl = 5m
|
|
|
|
postscreen_greet_action = enforce
|
|
|
|
postscreen_greet_banner = $smtpd_banner
|
|
|
|
postscreen_greet_ttl = 2d
|
|
|
|
postscreen_greet_wait = 3s
|
|
|
|
postscreen_non_smtp_command_enable = no
|
|
|
|
postscreen_pipelining_enable = no
|
2019-06-09 16:49:02 +02:00
|
|
|
proxy_read_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_transport_maps.cf,
|
2021-05-28 10:40:41 +02:00
|
|
|
proxy:mysql:/opt/postfix/conf/sql/mysql_mbr_access_maps.cf,
|
2017-11-19 15:13:43 +01:00
|
|
|
proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_in_policy.cf,
|
2019-06-09 16:49:02 +02:00
|
|
|
$sender_dependent_default_transport_maps,
|
|
|
|
$smtp_tls_policy_maps,
|
2017-11-19 15:13:43 +01:00
|
|
|
$local_recipient_maps,
|
|
|
|
$mydestination,
|
|
|
|
$virtual_alias_maps,
|
|
|
|
$virtual_alias_domains,
|
|
|
|
$virtual_mailbox_maps,
|
|
|
|
$virtual_mailbox_domains,
|
|
|
|
$relay_recipient_maps,
|
|
|
|
$relay_domains,
|
|
|
|
$canonical_maps,
|
|
|
|
$sender_canonical_maps,
|
2019-06-09 16:49:02 +02:00
|
|
|
$sender_bcc_maps,
|
|
|
|
$recipient_bcc_maps,
|
2017-11-19 15:13:43 +01:00
|
|
|
$recipient_canonical_maps,
|
|
|
|
$relocated_maps,
|
|
|
|
$transport_maps,
|
|
|
|
$mynetworks,
|
2019-06-09 16:49:02 +02:00
|
|
|
$smtpd_sender_login_maps,
|
|
|
|
$smtp_sasl_password_maps
|
2016-12-09 20:39:02 +01:00
|
|
|
queue_run_delay = 300s
|
2016-12-18 22:24:22 +01:00
|
|
|
relay_domains = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_relay_domain_maps.cf
|
2016-12-09 20:39:02 +01:00
|
|
|
relay_recipient_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_relay_recipient_maps.cf
|
2017-07-22 20:39:54 +02:00
|
|
|
sender_dependent_default_transport_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sender_dependent_default_transport_maps.cf
|
2016-12-09 20:39:02 +01:00
|
|
|
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
|
2016-12-12 21:53:58 +01:00
|
|
|
smtp_tls_cert_file = /etc/ssl/mail/cert.pem
|
|
|
|
smtp_tls_key_file = /etc/ssl/mail/key.pem
|
2016-12-09 20:39:02 +01:00
|
|
|
smtp_tls_loglevel = 1
|
2016-12-11 18:58:29 +01:00
|
|
|
smtp_dns_support_level = dnssec
|
|
|
|
smtp_tls_security_level = dane
|
2016-12-09 20:39:02 +01:00
|
|
|
smtpd_data_restrictions = reject_unauth_pipelining, permit
|
|
|
|
smtpd_delay_reject = yes
|
|
|
|
smtpd_error_sleep_time = 10s
|
2023-12-29 21:06:18 +01:00
|
|
|
smtpd_forbid_bare_newline = yes
|
2016-12-09 20:39:02 +01:00
|
|
|
smtpd_hard_error_limit = ${stress?1}${stress:5}
|
|
|
|
smtpd_helo_required = yes
|
|
|
|
smtpd_proxy_timeout = 600s
|
2021-06-08 13:13:49 +02:00
|
|
|
smtpd_recipient_restrictions = check_recipient_mx_access proxy:mysql:/opt/postfix/conf/sql/mysql_mbr_access_maps.cf,
|
2020-09-17 19:44:52 +02:00
|
|
|
permit_sasl_authenticated,
|
2019-09-02 09:31:26 +02:00
|
|
|
permit_mynetworks,
|
|
|
|
check_recipient_access proxy:mysql:/opt/postfix/conf/sql/mysql_tls_enforce_in_policy.cf,
|
|
|
|
reject_invalid_helo_hostname,
|
|
|
|
reject_unauth_destination
|
2016-12-09 20:39:02 +01:00
|
|
|
smtpd_sasl_auth_enable = yes
|
|
|
|
smtpd_sasl_authenticated_header = yes
|
|
|
|
smtpd_sasl_path = inet:dovecot:10001
|
|
|
|
smtpd_sasl_type = dovecot
|
|
|
|
smtpd_sender_login_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_sender_acl.cf
|
2019-09-02 09:31:26 +02:00
|
|
|
smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch,
|
|
|
|
permit_mynetworks,
|
|
|
|
permit_sasl_authenticated,
|
|
|
|
reject_unlisted_sender,
|
|
|
|
reject_unknown_sender_domain
|
2016-12-09 20:39:02 +01:00
|
|
|
smtpd_soft_error_limit = 3
|
|
|
|
smtpd_tls_auth_only = yes
|
|
|
|
smtpd_tls_dh1024_param_file = /etc/ssl/mail/dhparams.pem
|
2018-07-11 22:10:32 +02:00
|
|
|
smtpd_tls_eecdh_grade = auto
|
2018-06-25 22:31:23 +02:00
|
|
|
smtpd_tls_exclude_ciphers = ECDHE-RSA-RC4-SHA, RC4, aNULL, DES-CBC3-SHA, ECDHE-RSA-DES-CBC3-SHA, EDH-RSA-DES-CBC3-SHA
|
2016-12-09 20:39:02 +01:00
|
|
|
smtpd_tls_loglevel = 1
|
2019-03-03 12:11:39 +01:00
|
|
|
|
2019-08-16 22:17:28 +02:00
|
|
|
# Mandatory protocols and ciphers are used when a connections is enforced to use TLS
|
|
|
|
# Does _not_ apply to enforced incoming TLS settings per mailbox
|
2019-03-03 12:09:10 +01:00
|
|
|
smtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
|
|
|
|
lmtp_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
|
2019-03-03 12:11:39 +01:00
|
|
|
smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
|
2019-08-16 22:17:28 +02:00
|
|
|
smtpd_tls_mandatory_ciphers = high
|
|
|
|
|
|
|
|
smtp_tls_protocols = !SSLv2, !SSLv3
|
|
|
|
lmtp_tls_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
|
2016-12-09 20:39:02 +01:00
|
|
|
smtpd_tls_protocols = !SSLv2, !SSLv3
|
2019-03-03 12:11:39 +01:00
|
|
|
|
2016-12-09 20:39:02 +01:00
|
|
|
smtpd_tls_security_level = may
|
2018-10-25 23:37:25 +02:00
|
|
|
tls_preempt_cipherlist = yes
|
2019-09-22 17:38:03 +02:00
|
|
|
tls_ssl_options = NO_COMPRESSION, NO_RENEGOTIATION
|
2017-11-19 15:13:43 +01:00
|
|
|
virtual_alias_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_maps.cf,
|
2019-06-09 16:49:02 +02:00
|
|
|
proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_resource_maps.cf,
|
2017-11-19 15:13:43 +01:00
|
|
|
proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_spamalias_maps.cf,
|
2019-07-13 08:59:32 +02:00
|
|
|
proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_alias_domain_maps.cf
|
2016-12-09 20:39:02 +01:00
|
|
|
virtual_gid_maps = static:5000
|
|
|
|
virtual_mailbox_base = /var/vmail/
|
|
|
|
virtual_mailbox_domains = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_domains_maps.cf
|
2021-06-03 08:02:03 +02:00
|
|
|
# -- moved to rspamd on 2021-06-01
|
|
|
|
#recipient_bcc_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_recipient_bcc_maps.cf
|
|
|
|
#sender_bcc_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sender_bcc_maps.cf
|
2018-01-23 19:59:06 +01:00
|
|
|
recipient_canonical_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_recipient_canonical_maps.cf
|
|
|
|
recipient_canonical_classes = envelope_recipient
|
2017-03-01 17:59:46 +01:00
|
|
|
virtual_mailbox_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mailbox_maps.cf
|
2016-12-09 20:39:02 +01:00
|
|
|
virtual_minimum_uid = 104
|
|
|
|
virtual_transport = lmtp:inet:dovecot:24
|
|
|
|
virtual_uid_maps = static:5000
|
2017-06-06 21:59:44 +02:00
|
|
|
smtpd_milters = inet:rspamd:9900
|
|
|
|
non_smtpd_milters = inet:rspamd:9900
|
2016-12-09 20:39:02 +01:00
|
|
|
milter_mail_macros = i {mail_addr} {client_addr} {client_name} {auth_authen}
|
2017-01-23 08:23:59 +01:00
|
|
|
mydestination = localhost.localdomain, localhost
|
2020-05-21 19:28:35 +02:00
|
|
|
smtp_address_preference = any
|
2017-07-22 20:39:54 +02:00
|
|
|
smtp_sender_dependent_authentication = yes
|
|
|
|
smtp_sasl_auth_enable = yes
|
2018-12-19 09:39:35 +01:00
|
|
|
smtp_sasl_password_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_sasl_passwd_maps_sender_dependent.cf
|
2019-10-19 12:48:56 +02:00
|
|
|
smtp_sasl_security_options =
|
2017-07-22 20:39:54 +02:00
|
|
|
smtp_sasl_mechanism_filter = plain, login
|
2020-04-30 18:22:21 +02:00
|
|
|
smtp_tls_policy_maps = proxy:mysql:/opt/postfix/conf/sql/mysql_tls_policy_override_maps.cf
|
2018-10-23 22:57:38 +02:00
|
|
|
smtp_header_checks = pcre:/opt/postfix/conf/anonymize_headers.pcre
|
2018-10-16 10:26:41 +02:00
|
|
|
mail_name = Postcow
|
2019-09-02 09:31:26 +02:00
|
|
|
# local_transport map catches local destinations and prevents routing local dests when the next map would route "*"
|
2019-11-12 20:50:21 +01:00
|
|
|
# Use custom_transport.pcre for custom transports
|
2019-11-12 20:44:43 +01:00
|
|
|
transport_maps = pcre:/opt/postfix/conf/custom_transport.pcre,
|
|
|
|
pcre:/opt/postfix/conf/local_transport,
|
2020-04-03 20:39:53 +02:00
|
|
|
proxy:mysql:/opt/postfix/conf/sql/mysql_relay_ne.cf,
|
2019-09-02 09:31:26 +02:00
|
|
|
proxy:mysql:/opt/postfix/conf/sql/mysql_transport_maps.cf
|
2018-12-19 09:39:35 +01:00
|
|
|
smtp_sasl_auth_soft_bounce = no
|
2023-12-29 15:04:52 +01:00
|
|
|
postscreen_discard_ehlo_keywords = silent-discard, dsn, chunking
|
|
|
|
smtpd_discard_ehlo_keywords = chunking
|
2019-07-13 14:44:17 +02:00
|
|
|
compatibility_level = 2
|
2020-07-29 13:42:39 +02:00
|
|
|
smtputf8_enable = no
|
2019-11-24 14:18:27 +01:00
|
|
|
# Define protocols for SMTPS and submission service
|
2020-02-12 10:36:54 +01:00
|
|
|
submission_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
|
|
|
|
smtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1
|
2021-01-13 21:17:10 +01:00
|
|
|
parent_domain_matches_subdomains = debug_peer_list,fast_flush_domains,mynetworks,qmqpd_authorized_clients
|
2020-02-12 10:36:54 +01:00
|
|
|
|
2019-09-02 18:39:08 +02:00
|
|
|
# DO NOT EDIT ANYTHING BELOW #
|
2023-08-02 16:36:59 +02:00
|
|
|
# Overrides #
|