Wednesday, June 3, 2009

Postfix mail server main.cf example

#### main.cf #####
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
myhostname = mail.domain.com
mydomain = domain.com
myorigin = $myhostname
inet_interfaces = all
mydestination = $myhostname, localhost.$mydomain, localhost, /etc/postfix/hostnames
local_recipient_maps =
unknown_local_recipient_reject_code = 550
non_fqdn_reject_code = 554
mynetworks = 192.168.1.0/24, 127.0.0.0/8, 192.168.0.0/24
#mynetworks =
relay_domains = $mydestination
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail
header_checks = regexp:/etc/postfix/header_checks
smtpd_banner = **************
#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 20
debug_peer_level = 2
debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5
sendmail_path = /usr/sbin/sendmail.postfix
newaliases_path = /usr/bin/newaliases.postfix
mailq_path = /usr/bin/mailq.postfix
setgid_group = postdrop
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
bounce_queue_lifetime = 4h
maximal_queue_lifetime = 1d

sender_bcc_maps = hash:/etc/postfix/sender_copy

recipient_bcc_maps = hash:/etc/postfix/recipient_copy

smtpd_client_restrictions = reject_rbl_client bl.spamcop.net, permit

#smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_rbl_client list.dsbl.org, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client sbl.spamhaus.org, reject_rhsbl_sender nomail.rhsbl.sorbs.net, reject_rbl_client blackholes.easynet.nl, reject_rbl_client proxies.blackholes.wirehub.net, reject_rbl_client bl.spamcop.net, reject_rbl_client dnsbl.njabl.org, reject_rbl_client multihop.dsbl.org, reject_rhsbl_client blackhole.securitysage.com, reject_rhsbl_sender blackhole.securitysage.com, reject_rhsbl_sender dsn.rfc-ignorant.org, reject_rhsbl_sender rddb.dnsbl.net.au, reject_rhsbl_sender endn.dnsbl.net.au, reject_unauth_destination

#smtpd_recipient_restrictions = check_recipient_access hash:/etc/postfix/protected_destinations, permit_mynetworks, check_sender_access hash:/etc/postfix/sender_access, reject_rbl_client list.dsbl.org, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client sbl.spamhaus.org, reject_rhsbl_sender nomail.rhsbl.sorbs.net, reject_rbl_client blackholes.easynet.nl, reject_rbl_client proxies.blackholes.wirehub.net, reject_rbl_client bl.spamcop.net, reject_rbl_client dnsbl.njabl.org, reject_rbl_client multihop.dsbl.org, reject_rhsbl_client blackhole.securitysage.com, reject_rhsbl_sender blackhole.securitysage.com, reject_rhsbl_sender dsn.rfc-ignorant.org, reject_rhsbl_sender rddb.dnsbl.net.au, reject_rhsbl_sender endn.dnsbl.net.au, reject_unauth_destination


#To remove multihop.dsbl.org
#smtpd_recipient_restrictions = permit_mynetworks, reject_unauth_destination, reject_unknown_sender_domain, reject_unauth_pipelining, reject_non_fqdn_sender, check_recipient_access hash:/etc/postfix/protected_destinations, check_sender_access hash:/etc/postfix/sender_access, reject_rbl_client pbl.spamhaus.org, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client xbl.spamhaus.org, reject_rbl_client sbl.spamhaus.org, reject_rbl_client list.dsbl.org, reject_rbl_client rmst.dnsbl.net.au, reject_rbl_client xbl.spamhaus.org, reject_rbl_client pbl.spamhaus.org, reject_rhsbl_sender nomail.rhsbl.sorbs.net, reject_rbl_client ucepn.dnsbl.net.au, reject_rbl_client blackholes.easynet.nl, reject_rhsbl_sender blackhole.securitysage.com, reject_rbl_client sorbs.dnsbl.net.au, reject_rbl_client proxies.blackholes.wirehub.net, reject_rbl_client bl.spamcop.net, reject_rbl_client dnsbl.njabl.org, reject_rbl_client zen.spamhaus.org, reject_rhsbl_sender dsn.rfc-ignorant.org, reject_rbl_client psbl.surriel.com, reject_rbl_client t1.dnsbl.net.au, reject_rbl_client rddb.dnsbl.net.au, reject_rhsbl_client ucepn.dnsbl.net.au, reject_rbl_client endn.dnsbl.net.au, reject_unauth_destination


smtpd_recipient_restrictions = permit_mynetworks, reject_rbl_client xbl.spamhaus.org, check_sender_access hash:/etc/postfix/sender_access, check_recipient_access hash:/etc/postfix/protected_destinations, reject_rbl_client list.dsbl.org, reject_rbl_client sbl-xbl.spamhaus.org, reject_rbl_client cbl.abuseat.org, reject_rbl_client xbl.spamhaus.org, reject_rbl_client sbl.spamhaus.org, reject_rhsbl_sender nomail.rhsbl.sorbs.net, reject_rbl_client blackholes.easynet.nl, reject_rbl_client proxies.blackholes.wirehub.net, reject_rbl_client bl.spamcop.net, reject_rbl_client dnsbl.njabl.org, reject_rhsbl_client blackhole.securitysage.com, reject_rhsbl_sender blackhole.securitysage.com, reject_rhsbl_sender dsn.rfc-ignorant.org, reject_rhsbl_sender rddb.dnsbl.net.au, reject_rhsbl_sender endn.dnsbl.net.au, reject_unauth_destination



#smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, hash:/etc/postfix/access
smtpd_sender_restrictions = permit_mynetworks, check_sender_access hash:/etc/postfix/sender_access, hash:/etc/postfix/access

mailbox_size_limit = 2147483648

smtpd_restriction_classes = alias_allow
alias_allow = check_sender_access hash:/etc/postfix/connexios_allow, check_sender_access hash:/etc/postfix/access, reject
masquerade_domains = domain.com

No comments:

Post a Comment

tag ur valuable ideas below