config/mail/postfix/main.cf

52 lines
1.4 KiB
CFEngine3

# System
biff = no
compatibility_level = 2
disable_vrfy_command = yes
mailbox_size_limit = 0
message_size_limit = 0
mynetworks_style = subnet
alias_maps = hash:/etc/aliases
# Custom
mydomain = local
recipient_delimiter = +
smtp_helo_name = mail.example.com
# TLS
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_key_file = /data/ssl/certs/mail.example.com/privkey.pem
smtpd_tls_cert_file = /data/ssl/certs/mail.example.com/fullchain.pem
tls_server_sni_maps = hash:/etc/postfix/sni.cf
# Setup
smtpd_tls_received_header = yes
relay_domains = sqlite:/etc/postfix/db-relay.cf
transport_maps = sqlite:/etc/postfix/db-transport.cf
virtual_mailbox_base = /data/mail/mail
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000
virtual_mailbox_domains = sqlite:/etc/postfix/db-domains.cf
virtual_mailbox_maps = sqlite:/etc/postfix/db-virtual.cf
virtual_alias_maps = sqlite:/etc/postfix/db-alias.cf
virtual_mailbox_limit = 0
smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sender_login_maps = sqlite:/etc/postfix/db-login.cf, $virtual_alias_maps
smtpd_hard_error_limit = 1
smtpd_client_restrictions = reject_unknown_reverse_client_hostname
smtpd_sender_restrictions = reject_sender_login_mismatch
smtpd_recipient_restrictions = check_recipient_access sqlite:/etc/postfix/db-access.cf
smtpd_milters = unix:private/opendkim
non_smtpd_milters = $smtpd_milters