2021-06-02 18:02:34 +00:00
|
|
|
compatibility_level = 2
|
2021-06-01 23:17:41 +00:00
|
|
|
|
2021-01-05 04:21:09 +00:00
|
|
|
# General
|
|
|
|
smtpd_banner = $myhostname ESMTP RedXen Mail. DO NOT MESS WITH US OR WE WILL CUT YOUR BALLS OFF!
|
2021-02-27 20:27:58 +00:00
|
|
|
mail_name = RedXen Mail Postfix
|
2021-01-05 04:21:09 +00:00
|
|
|
|
|
|
|
inet_interfaces = all
|
|
|
|
inet_protocols = all
|
|
|
|
|
2021-01-12 23:37:34 +00:00
|
|
|
myorigin = redxen.eu
|
2021-01-05 04:21:09 +00:00
|
|
|
myhostname = mail.$myorigin
|
|
|
|
mydomain = $myorigin
|
2021-02-27 20:27:58 +00:00
|
|
|
mydestination = $myorigin
|
2023-03-05 14:04:58 +00:00
|
|
|
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
|
2021-01-05 04:21:09 +00:00
|
|
|
|
|
|
|
relayhost =
|
|
|
|
relay_domains = $mydestination
|
|
|
|
|
2021-01-07 18:20:54 +00:00
|
|
|
local_transport = local
|
2021-06-01 23:17:41 +00:00
|
|
|
alias_maps = proxy:pgsql:/etc/redxen/postfix/pgsql-aliases.cf
|
|
|
|
smtpd_sender_login_maps = proxy:pgsql:/etc/redxen/postfix/pgsql-users.cf
|
2021-02-28 12:29:26 +00:00
|
|
|
local_recipient_maps = $smtpd_sender_login_maps $alias_maps
|
2021-01-07 17:13:22 +00:00
|
|
|
|
2021-01-05 04:21:09 +00:00
|
|
|
biff = no
|
|
|
|
append_dot_mydomain = no
|
|
|
|
delay_warning_time = 1h
|
|
|
|
readme_directory = no
|
|
|
|
mailbox_size_limit = 0
|
|
|
|
recipient_delimiter = +
|
|
|
|
notify_classes = resource, software, bounce
|
2021-02-28 12:29:26 +00:00
|
|
|
smtpd_helo_required = yes
|
|
|
|
smtpd_delay_reject = yes
|
2021-01-05 04:21:09 +00:00
|
|
|
|
|
|
|
# SMTP TLS
|
|
|
|
smtp_tls_CApath = /etc/ssl/certs
|
|
|
|
smtp_tls_security_level = may
|
2021-02-19 15:03:17 +00:00
|
|
|
smtp_tls_note_starttls_offer = yes
|
2021-01-05 04:21:09 +00:00
|
|
|
|
|
|
|
smtpd_use_tls = yes
|
2021-06-01 23:17:41 +00:00
|
|
|
smtpd_tls_cert_file = /etc/redxen/letsencrypt/chain.crt
|
|
|
|
smtpd_tls_key_file = /etc/redxen/letsencrypt/private.key
|
2021-01-07 17:13:22 +00:00
|
|
|
smtpd_tls_security_level = may
|
|
|
|
smtpd_tls_protocols = !SSLv2, !SSLv3
|
2021-01-05 04:21:09 +00:00
|
|
|
|
|
|
|
# Restrictions
|
2023-03-14 12:30:26 +00:00
|
|
|
smtpd_sender_restrictions = reject_known_sender_login_mismatch,
|
|
|
|
permit_sasl_authenticated,
|
2021-02-28 12:29:26 +00:00
|
|
|
check_sender_access inline:{{$myorigin=553 not logged in}},
|
2023-03-01 16:04:14 +00:00
|
|
|
reject_invalid_helo_hostname,
|
2021-03-09 09:48:40 +00:00
|
|
|
reject_unknown_sender_domain
|
2021-01-05 04:21:09 +00:00
|
|
|
smtpd_relay_restrictions = permit_sasl_authenticated,
|
|
|
|
reject_unauth_destination
|
|
|
|
smtpd_recipient_restrictions = permit_sasl_authenticated,
|
|
|
|
reject_non_fqdn_recipient,
|
|
|
|
reject_unknown_recipient_domain,
|
2021-02-28 12:29:26 +00:00
|
|
|
reject_unverified_recipient
|
2021-02-19 13:25:14 +00:00
|
|
|
smtpd_data_restrictions = reject_unauth_pipelining
|
2021-02-28 19:39:57 +00:00
|
|
|
smtpd_helo_restrictions = reject_invalid_helo_hostname
|
2021-01-05 04:21:09 +00:00
|
|
|
|
2021-01-07 18:20:54 +00:00
|
|
|
# Dovecot auth
|
2021-02-19 15:03:17 +00:00
|
|
|
smtpd_sasl_auth_enable = yes
|
2021-01-07 18:20:54 +00:00
|
|
|
smtpd_sasl_type = dovecot
|
|
|
|
smtpd_sasl_path = /run/dovecot/auth
|
|
|
|
smtpd_sasl_security_options = noanonymous
|
|
|
|
smtpd_sasl_local_domain = $myorigin
|
|
|
|
|
2021-01-05 04:21:09 +00:00
|
|
|
# Dovecot LMTP
|
|
|
|
mailbox_transport = lmtp:unix:/run/dovecot/lmtp
|
|
|
|
|
|
|
|
# OpenDKIM & RSpamD
|
2021-01-10 22:02:37 +00:00
|
|
|
milter_protocol = 6
|
2021-01-13 15:21:08 +00:00
|
|
|
milter_default_action = tempfail
|
2021-07-30 11:44:12 +00:00
|
|
|
internal_mail_filter_classes =
|
2021-01-13 15:21:08 +00:00
|
|
|
|
2021-07-30 11:44:12 +00:00
|
|
|
smtpd_milters = inet:rspamd.routinginfo.internal:7510 $non_smtpd_milters
|
|
|
|
non_smtpd_milters = inet:opendkim.routinginfo.internal:7514
|