# ToDo: 
# - TSL
# - SMTP Auth 
# - LDAP
# - chroot von postfix
soft_bounce = no
queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
mail_owner = _postfix
setgid_group = _postdrop
myhostname = mxhub.uni-wh.de
mydomain = uni-wh.de
myorigin = $mydomain
hash_queue_names = active,bounce,defer,flush incoming deferred
smtpd_banner = $myhostname ESMTP

# our domains 
mydestination =	
   $myhostname
   localhost.$mydomain
   $mydomain
   dnsmail.dmz.uni-wh.de 

# virtual domains
virtual_alias_domains = hash:/etc/postfix/virtual_alias_donmains
virtual_alias_maps = hash:/etc/postfix/virtual_alias_maps

mynetworks = 62.206.172.0/24, 127.0.0.0/8

smtpd_client_restrictions = permit_mynetworks, hash:/etc/postfix/ok-ips

relay_domains = $mydestination

# RFC conform...
smtp_helo_required = yes

smtpd_recipient_restrictions =
   reject_non_fqdn_recipient,
   reject_non_fqdn_sender,
   reject_unknown_sender_domain,
   reject_unknown_recipient_domain,
   permit_mynetworks,
   #: check_policy_service inet:127.0.0.1:60000,
   reject_non_fqdn_hostname,
   reject_invalid_hostname,
   check_helo_access pcre:/etc/postfix/helo_checks,
   check_sender_my_access cidr:/etc/postfix/bogus_mx,
   reject_rbl_client relays.ordb.org
   reject_rbl_client dnsbl.sorbs.net
   #: reject_unverified_sender,
   check_sender_access hash:/etc/postfix/common_spam_senderdomains,
   check_sender_access regexp:/etc/postfix/common_spam_senderdomains_keywords,
   permit

smtpd_data_restrictions = reject_multi_recipient_bounce

# unverified sender config
#address_verify_sender = postmaster@uni-wh.de
#address_verify_map = btree:/var/spool/postfix/verified_senders
#address_verify_negative_cache = no
 
# aliases ...
alias_maps = hash:/etc/postfix/aliases 
alias_database = $alias_maps

# content filter....
content_filter = smtp:127.0.0.1:25000

# header_checks
header_checks = regexp:/etc/postfix/header_checks

# mime checks....
mime_header_checks = pcre:/etc/postfix/mime_header_checks

# body checks....
body_checks = regexp:/etc/postfix/body_checks

disable_vrfy_command = yes

# set some errors to permanent errors
unknown_client_reject_code = 550
unknown_local_recipient_reject_code = 550
unverified_sender_reject_code = 550

# some limitations...
message_size_limit=57428800
mailbox_size_limit=57428800

default_destination_concurrency_limit = 5 
smtpd_recipient_limit = 2048
maximal_queue_lifetime = 3d
