# Postfix Configuration options
# Used by alternc.install with postconf
# WARNING: this script is not used directly by postfix! it is parse by alternc.install
home_mailbox = Maildir/
smtpd_banner = $myhostname ESMTP
header_checks = regexp:/etc/postfix/header_checks
body_checks = regexp:/etc/postfix/body_checks
local_destination_concurrency_limit = 8
# nb of parallel delivery to the same destination
default_destination_concurrency_limit = 3
# nb of recipients per delivery 
default_destination_recipient_limit = 6
# max number of recipients per message
smtpd_recipient_limit = 500
# limit connections to local server to 50 per 5m period
anvil_rate_time_unit = 5m
smtpd_client_connection_rate_limit=50
# do not fallback on the second mx when mail is greylisted
# (this solves a bug in postfix which fallback to
# alternate MX after receiving 4XX SMTP replies introduced
# in "[Incompat 20031223]")  
smtp_mx_session_limit = 1
#### TLS options
smtpd_use_tls = yes
smtpd_tls_dcert_file = /etc/alternc/apache.pem
smtpd_tls_dkey_file = $smtpd_tls_dcert_file
smtpd_tls_CApath = /etc/ssl/certs/
smtpd_tls_key_file =  $smtpd_tls_dcert_file
smtpd_tls_cert_file =  $smtpd_tls_dcert_file
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtp_tls_dcert_file = $smtpd_tls_dcert_file
smtp_tls_dkey_file = $smtpd_tls_dcert_file
smtp_tls_CApath = $smtpd_tls_CApath
smtpd_tls_auth_only = no
#SASL options
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = postfix
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type=dovecot
smtpd_sasl_path=private/auth
smtpd_sasl_auth_enable=yes
#### Virtual Mapping
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_maps = proxy:mysql:/etc/postfix/myalias.cf,proxy:mysql:/etc/postfix/mymail2mail.cf
virtual_alias_domains = 
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mydomain.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/myvirtual.cf
virtual_mailbox_base = %%ALTERNC_MAIL%%
virtual_minimum_uid = 2000
virtual_gid_maps = proxy:mysql:/etc/postfix/mygid.cf
virtual_uid_maps = proxy:mysql:/etc/postfix/mygid.cf
relay_recipient_maps = $virtual_alias_maps
relay_domains = proxy:mysql:/etc/postfix/myrelay-domain.cf
transport_maps = proxy:mysql:/etc/postfix/mytransport.cf
dovecot_destination_recipient_limit = 1
mailman_destination_recipient_limit = 1
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_rbl_client zen.spamhaus.org, reject_non_fqdn_recipient, reject_unknown_sender_domain, reject_unknown_recipient_domain, reject_unauth_pipelining, reject_unlisted_recipient, reject_unauth_destination
#### DKIM Filtering
milter_default_action = accept
milter_protocol = 6
smtpd_milters = inet:127.0.0.1:8891
non_smtpd_milters = inet:127.0.0.1:8891
message_size_limit = 100000000
virtual_mailbox_limit = 0
mailbox_size_limit = 0
enable_original_recipient = no
smtp_tls_dcert_file = $smtpd_tls_dcert_file
smtp_tls_dkey_file = $smtpd_tls_dcert_file
smtp_tls_CAfile = $smtpd_tls_CAfile
smtp_tls_key_file = $smtpd_tls_dcert_file
smtp_tls_cert_file = $smtpd_tls_dcert_file
smtp_use_tls = yes
smtp_tls_security_level = may
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_tls_protocols = TLSv1, TLSv1.1, TLSv1.2
smtp_tls_protocols = TLSv1, TLSv1.1, TLSv1.2
smtpd_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4
smtp_tls_exclude_ciphers = aNULL, DES, 3DES, MD5, DES+MD5, RC4                                                                                            
tls_preempt_cipherlist      = yes
smtpd_tls_mandatory_ciphers = high
smtp_tls_mandatory_ciphers = high
smtpd_tls_ciphers           = high
smtp_tls_ciphers           = high
