All pastes #907580 Raw Edit

Stuff

public text v1 · immutable
·published 2008-02-17 19:10 UTC
rendered paste body
[root@mail log]# cat /etc/postfix/master.cf 

#=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  = 
# service type private unpriv chroot wakeup  maxproc command + args
#  name        (yes)   (yes)  (yes)  (never)  (100)
#=  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  =  = 

smtp      inet  n       -       n       -       150     smtpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
        -o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
dovecot   unix  -       n       n       -       -       pipe
        flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -d ${recipient}
dropoff	  unix	-	n	n	-	-	pipe
	flags=DRhu user=postdrop:postdrop argv=/usr/sbin/sendmail -f ${sender} ${recipient}
smtp-amavis unix -      -       n       -       2       smtp
    -o smtp_data_done_timeout=1200
    -o smtp_send_xforward_command=yes
    -o disable_dns_lookups=yes
    -o max_use=20
127.0.0.1:10025 inet n  -       n       -       -       smtpd
    -o content_filter=
    -o local_recipient_maps=
    -o relay_recipient_maps=
    -o smtpd_restriction_classes=
    -o smtpd_delay_reject=no
    -o smtpd_client_restrictions=permit_mynetworks,reject
    -o smtpd_helo_restrictions=
    -o smtpd_sender_restrictions=
    -o smtpd_recipient_restrictions=permit_mynetworks,reject
    -o smtpd_data_restrictions=reject_unauth_pipelining
    -o smtpd_end_of_data_restrictions=
    -o mynetworks=69.16.124.192/28,127.0.0.0/8
    -o smtpd_error_sleep_time=0
    -o smtpd_soft_error_limit=1001
    -o smtpd_hard_error_limit=1000
    -o smtpd_client_connection_count_limit=0
    -o smtpd_client_connection_rate_limit=0
    -o receive_override_options=no_header_body_checks,no_unknown_recipient_checks
    -o local_header_rewrite_clients=

proxywrite unix -       -       n       -       1       proxymap

[root@mail log]# cat /etc/postfix/main.cf
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
default_privs = nobody
setgid_group = postdrop

message_size_limit = 20480000
myhostname = mail.domain.com
mydomain = domain.com
myorigin = $myhostname
inet_interfaces = all
mydestination = $myhostname localhost.$mydomain 
# mydestination = $myhostname.$mydomain, localhost
mynetworks_style = subnet
mynetworks = 69.16.124.192/28, 172.16.0.0/16, 127.0.0.0/8, 
masquerade_domains = !mailer.$mydomain, $mydomain

# this is a regex map basically used to make postfix write the message's subject line to the maillog.
#header_checks = regexp:/etc/postfix/header_checks


unknown_local_recipient_reject_code = 550
in_flow_delay = 1s
smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)
debug_peer_level = 2
debugger_command =
         PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
debug_peer_list = 38.100.211.72, 69.16.124.200

data_directory = /var/lib/postfix
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
html_directory = no
manpage_directory = /usr/local/man
sample_directory = /etc/postfix
readme_directory = /root/mailsystem_install-docs/postfix/readmes

alias_maps = hash:/etc/postfix/aliases
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mysql-virtual-mailbox-domains.cf
virtual_uid_maps = static:503
virtual_gid_maps = static:503
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mysql-virtual-mailbox-maps.cf
virtual_alias_maps = mysql:/etc/postfix/mysql/mysql-virtual-alias-maps.cf,mysql:/etc/postfix/mysql/mysql-email2email.cf
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

# SASL authentication handled by dovecot
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes

#recipient/sender/client checks:
disable_vrfy_command = yes
smtpd_recipient_restrictions = 
	check_recipient_access hash:/etc/postfix/spam_lovers_map
	permit_mynetworks,
        permit_sasl_authenticated, 
	check_client_access hash:/etc/postfix/whitelisted_senders_map
	reject_unauth_destination,
	#reject_invalid_hostname,
	#reject_non_fqdn_hostname,
	#reject_non_fqdn_sender,
	#reject_non_fqdn_recipient,
	#reject_unknown_sender_domain,
	#reject_unknown_recipient_domain,
	#reject_unauth_pipelining,
	reject_rbl_client zombie.dnsbl.sorbs.net,
	reject_rbl_client list.dsbl.org,
	reject_rbl_client sbl.spamhaus.org,
	permit
smtpd_sender_restrictions =
	reject_rhsbl_sender dsn.rfc-ignorant.org,
	reject_non_fqdn_sender
smtpd_client_restrictions =
	check_client_access hash:/etc/postfix/access
	permit

#if the message is accepted for delivery, run it through amavis for virus/spam filtration(it will come back on port 10025):
content_filter = smtp-amavis:[127.0.0.1]:10024

# TLS (SSL) section:
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/ssl/certs/dovecot.pem
smtpd_tls_key_file = /etc/ssl/private/dovecot.pem
smtpd_tls_security_level = may
smtpd_tls_received_header = no
smtpd_tls_loglevel = 0
smtpd_tls_auth_only = no
tls_random_source = dev:/dev/urandom

[root@mail log]# cat /etc/my.cnf 
[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
old_passwords=1
key_buffer=384M
table_cache=512
max_connections=500
wait_timeout=300
     
[mysql.server]
user=mysql
basedir=/var/lib

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
[root@mail log]# mysqladmin proc|wc 
     42     591    3822

[root@mail log]# cat /etc/postfix/mysql/mysql-virtual-alias-maps.cf 
user = mailuser
password = -
socket = /var/lib/mysql/mysql.sock
dbname = postfix
query = SELECT goto FROM alias WHERE address='%s' AND active='1'