All pastes #759156 Raw Edit

Anonymous

public text v1 · immutable
·published 2007-11-02 21:59 UTC
rendered paste body
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail1.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = mail1.mydomain.com
mydestination = mail1.mydomain.com
relayhost = 
mynetworks =	127.0.0.0/8,
		10.20.30.0/24,
		172.28.201.0/24,
		172.28.200.0/30,
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

relay_domains = $mydestination, $mynetworks,
        mydomain.com,
        mr-roboto.mydomain.com,
        minime.mydomain.com,

# Set messages size limit
message_size_limit = 15360000

# TRANSPORT MAP
#
# Insert text from sample-transport.cf if you need explicit routing.
transport_maps = hash:/etc/postfix/transport

# Sender Address Restrictions
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access,

# Added for use with Amavisd-new
#content_filter = smtp-amavis:[127.0.0.1]:10024

smtpd_recipient_restrictions = 
                permit_mynetworks,
                reject_non_fqdn_sender,
                reject_non_fqdn_recipient,
                reject_unauth_pipelining,
                check_sender_access hash:/etc/postfix/sender_access,
		check_client_access hash:/etc/postfix/client_access,
                check_recipient_access hash:/etc/postfix/recipient_access,
                permit_sasl_authenticated,
                reject_unauth_destination,
                reject_non_fqdn_hostname,
                reject_rbl_client relays.ordb.org,
#               reject_rbl_client bl.spamcop.net,
#               reject_rbl_client blackholes.five-ten-sg.com,
#               reject_rbl_client dnsbl.sorbs.net,
#               reject_rbl_client sbl-xbl.spamhaus.org,
#               reject_rbl_client combined.njabl.org,
#               reject_rbl_client relays.visi.com,
#               reject_rbl_client spamguard.leadmon.net,
#               reject_rbl_client list.dsbl.org,
#               reject_rbl_client multihop.dsbl.org,
#               reject_rbl_client unconfirmed.dsbl.org,
		check_policy_service inet:127.0.0.1:60000
                permit_mx_backup,
		reject_invalid_hostname,
                reject_non_fqdn_sender,
                reject_non_fqdn_hostname,
                reject_non_fqdn_recipient,
                reject_unauth_pipelining,

# HELO restrictions
smtpd_helo_restrictions =       permit_mynetworks,
                                reject_invalid_hostname,
                                regexp:/etc/postfix/helo.regexp,
                                permit

# Sender Address Restrictions
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access,

### Checks to remove badly formed email
smtpd_helo_required     = yes
strict_rfc821_envelopes = yes
disable_vrfy_command = yes
unknown_address_reject_code  = 554
unknown_hostname_reject_code = 554
unknown_client_reject_code   = 554

# Sender Address Restrictions
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access,

# The  SMTP  client time limit for completing a TCP connection, or
# zero (use the operating system built-in time limit).
smtp_connect_timeout = 0

# Verbose logging for specific SMTP connections
# debug_peer_list = 127.0.0.1, 192.168.9.0/24, 192.168.1.0/24

# Feature: UCE restrictions are always delayed until RCPT
# TO, VRFY or ETRN. To change back to the default specify
# "smtpd_delay_reject = no"
smtpd_delay_reject = no

# DKIM, DK, Sender-ID
smtpd_milters =	unix:/var/run/dkim/dkim-filter.socket,
			unix:/var/run/dkim/sid-filter.socket,
			unix:/var/run/dkim/dk-filter.socket,
			
# DKIM, DK, Sender-ID
#non_smtpd_milters =	unix:/var/run/dkim/dkim-filter.socket,
#			unix:/var/run/dkim/dk-filter.socket,
#			unix:/var/run/dkim/sid-filter.socket,

# Send e-amil problem to postmaster
notify_classes = bounce, policy, protocol
			
# Number of days to keep queued mail (7 days)
maximal_queue_lifetime = 4d

# With Postfix version 2.1 and later: the SMTP server response delay after a client
# has made more than $smtpd_soft_error_limit errors, and fewer than
# $smtpd_hard_error_limit errors, without delivering mail.
smtpd_error_sleep_time = 0

# The default maximal number of Postfix child processes that provide a given service. 
# Default is 100
default_process_limit = 1500

# How often the queue manager scans the queue for deferred mail.
# queue_run_delay (default: 1000 seconds)
queue_run_delay = 2000

# The minimal amount of time a message won't be looked at, and the minimal amount of
# time to stay away from a "dead" destination. 
# minimal_backoff_time (default: 1000 seconds)
minimal_backoff_time = 3600

# The maximal amount of time a message won't be looked at after a delivery failure.
# maximal_backoff_time (default: 4000 seconds)
minimal_backoff_time = 7200

# Performance tuning options
smtpd_error_sleep_time = 0
# smtpd_soft_error_limit = 10
smtpd_soft_error_limit = 5
#smtpd_hard_error_limit = 20
smtpd_hard_error_limit = 10
smtpd_client_event_limit_exceptions = $mynetworks
# smtp_connect_timeout = 30
smtp_connect_timeout = 15
# smtp_helo_timeout = 300
smtp_helo_timeout = 15
# initial_destination_concurrency = 5
initial_destination_concurrency = 5
# default_destination_concurrency_limit = 20
default_destination_concurrency_limit = 50
# smtp_destination_concurrency_limit = 20
smtp_destination_concurrency_limit = 50
# qmgr_message_recipient_limit = 20000
qmgr_message_recipient_limit = 100000
# qmgr_message_recipient_minimum = 10
qmgr_message_recipient_minimum = 20