smtpd_sender_restrictions = 
     permit_sasl_authenticated,
     reject_sender_login_mismatch,
     permit_mynetworks,
     reject_unknown_hostname, 
     reject_unknown_recipient_domain, 
     reject_unknown_sender_domain,

smtpd_recipient_restrictions = 
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_sender_login_mismatch,
    reject_non_fqdn_hostname,
    reject_non_fqdn_sender,
    reject_non_fqdn_recipient,
    reject_unauth_destination,
    reject_unauth_pipelining,
    reject_invalid_hostname,
    reject_rbl_client sbl-xbl.spamhaus.org,
    reject_rbl_client ix.dnsbl.manitu.net,
#   sqlgrey enable
#   check_policy_service inet:127.0.0.1:2501,
#   postgrey enable
#   check_policy_service inet:127.0.0.1:10023,

smtpd_client_restrictions = 
    permit_mynetworks,
    permit_sasl_authenticated,
    reject_unknown_client,

smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain = $myhostname
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth    

soft_bounce = yes

# Maximum size of Message in bytes (0 = unlimited)
message_size_limit = 0
mailbox_size_limit = 0

smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/ssl/<SERVERNAME>.key.unencrypted
smtpd_tls_cert_file = /etc/ssl/<SERVERNAME>.crt
# Just an example for CACert.org
smtpd_tls_CAfile = /etc/ssl/cacert.class3.crt
smtpd_tls_loglevel = 0
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_alias_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_alias_maps.cf
smtpd_sender_login_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_sender_permissions.cf
virtual_mailbox_base = <VIRTUAL_MAILBOX_BASE>
virtual_mailbox_domains = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_domains.cf
virtual_mailbox_limit = 0
virtual_mailbox_maps = proxy:mysql:/usr/local/etc/postfix/mysql-virtual_mailbox_maps.cf
virtual_uid_maps        = static:<VIRTUAL_UID_MAPS>
virtual_gid_maps        = static:<VIRTUAL_GID_MAPS>
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
proxy_read_maps = $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
    $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
    $smtpd_sender_login_maps
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, this user has overdrawn their diskspace quota. Please try again later.
virtual_overquota_bounce = yes
virtual_transport = virtual
## Dovecot Settings for deliver, SASL Auth and virtual transport
# uncomment those line to use Dovecot
#mailbox_command = /usr/local/libexec/dovecot/deliver
#virtual_transport = dovecot
#dovecot_destination_recipient_limit = 1
#alias_maps = $alias_database
#smtpd_sasl_path = private/auth

queue_directory = /var/spool/postfix
command_directory = /usr/local/sbin
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
mail_owner = postfix
myhostname = <SERVERNAME>
mydomain = <SERVERNAME>
myorigin = $mydomain

mydestination = $myhostname,
$mydomain,
localhost.$myhostname,
localhost.$mydomain,
localhost

inet_interfaces = all
unknown_local_recipient_reject_code = 550
mynetworks_style = host
debug_peer_level = 2
debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/local/sbin/sendmail
newaliases_path = /usr/local/bin/newaliases
mailq_path = /usr/local/bin/mailq
setgid_group = maildrop
html_directory = /usr/local/share/doc/postfix
manpage_directory = /usr/local/man
sample_directory = /usr/local/etc/postfix
readme_directory = /usr/local/share/doc/postfix

