среда, 5 мая 2010 г.

Postfix config

My postfix config.

#---------------------------------------------#
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
#---------------------------------------------#                                        
mail_owner = postfix
default_privs = nobody
mail_name = domain.com

#---------------------------------------------#                      
myhostname = mx.domain.com
mydomain = domain.com
myorigin = $mydomain
#mydestination = $mydomain, $myhostname

#---------------------------------------------#
#------Tuning------#
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
smtpd_hard_error_limit = 8
smtpd_timeout = 60s
smtp_helo_timeout = 40s
smtp_mail_timeout = 40s
smtp_rcpt_timeout = 40s
hash_queue_depth = 2
hash_queue_names = incoming, active, deferred, bounce, defer, flush, hold, trace
maximal_backoff_time = 3h
smtpd_client_connection_count_limit = 40
smtpd_client_connection_rate_limit = 20
smtpd_client_message_rate_limit = 50

#-------------------------------------------------------------------------
inet_interfaces = all
unknown_local_recipient_reject_code = 450
show_user_unknown_table_name = no
mynetworks = 127.0.0.0/8
in_flow_delay = 1s

#------------------------------------------------------------------------
alias_maps = ldap:/etc/postfix/ldapalias.cf hash:/etc/postfix/aliases
home_mailbox = Maildir/
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10

#------------------------------------------------------------------------
debug_peer_level = 4

debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin
         ddd $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = no

#-------------------------------------------------------------------------
smtpd_banner = ESMTP READY!! All connections logged!!
smtp_always_send_ehlo = yes
smtpd_etrn_restrictions = reject
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtp_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
smtpd_tls_ask_ccert = yes
smtpd_tls_auth_only = no
smtpd_use_tls = yes
#smtp_tls_note_starttls_offer = yes
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.pem
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.pem
smtpd_tls_CAfile = /etc/postfix/ssl/smtpd.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
smtpd_sasl_path = smtpd
smtpd_sasl_type = cyrus

#---------------------------------------------#
smtpd_helo_required = yes

smtpd_helo_restrictions =
        reject_invalid_hostname,
        reject_non_fqdn_hostname,
        reject_unknown_hostname,
        permit

smtpd_sender_restrictions =
        permit_sasl_authenticated,
        reject_non_fqdn_sender,
        reject_unknown_sender_domain

smtpd_recipient_restrictions =
        hash:/etc/postfix/protect,
        reject_unauth_pipelining,
        reject_non_fqdn_recipient,
        reject_unknown_recipient_domain,
        permit_sasl_authenticated,
        reject_unauth_destination
smtpd_restriction_classes = allowed
allowed = check_sender_access hash:/etc/postfix/allowed, reject

#---------------------------------------------#                                               ###                          ###
#           LDAP               #
###                          ###
virtual_transport = virtual
virtual_mailbox_domains = domain.com
virtual_mailbox_base = /var/spool/mail
virtual_mailbox_maps = ldap:/etc/postfix/ldapvirtual.cf, hash:/etc/postfix/lalala
virtual_uid_maps = static:1984
virtual_gid_maps = static:1984
virtual_minimum_uid = 1000
virtual_mailbox_limit = 2048000000
local_recipient_maps =
virtual_alias_maps = ldap:/etc/postfix/ldapalias.cf
#hash:/etc/postfix/virtual
#transport_maps = hash:/etc/postfix/transport
#transport_maps = ldap:/etc/postfix/ldaptransport.cf


#---------------------------------------------#

#header_checks = regexp:/etc/postfix/header_checks

#body_checks = regexp:/etc/postfix/maps/body_checks

Комментариев нет: