We are an ISP and have Postfix running on FreeBSD. Currently, we are
using postfix 2.4.10 on FreeBSD 4.7. Both are older versions because
several years ago we tried to upgrade FreeBSD to 6.0 and had some
bizarre results. We just tried the same thing last night to a much
newer version of FreeBSD (8.2) with postfix 2.4.14 and had the same
results. I can't find any info on this behavior on the web, so here goes.
Old server - Dual 2.8 GHz Xeon processors with 4 GB RAM
New server - Dual 2.8 quad-core processors with 8 GB RAM
Mail accounts - about 18,000
Things run fine on old server, but hardware is starting to fail. When
we start postfix on the new server and everything runs fine for about
5-10 minutes as mail starts flooding in. CPU idle time is almost 100%
and mail is being processed just fine. All of sudden, the CPU load
starts to rise quickly, the smptd active processes start consuming large
amounts of processor time, and the active queue starts to grow out of
control. It never recovers unless we stop postfix. If we restart
postfix, the same thing happens again.
I realize this is also a FreeBSD question so I'm posting in forums for
that, but because it is definitely caused by Postfix, I wanted to check
here just in case. Both times we tried this, last night and several
years ago, we tried to make sure everything was done correctly and that
the kernel was tuned the same as the old server.
Really, it would help to know what to look for. We moved back to the
old server by necessity so it's not really possible to get real-time
data. But we want to make a list for when we try again. Any help or
advice would be greatly appreciated. Last resort is to move to Linux.
This it the last version of main.cf (non-default parts). We tried lots
of changes trying to get it to work.
alias_database = hash:/usr/local/etc/postfix/aliases,
hash:/usr/local/etc/postfix/aliases.majordomo
alias_maps = hash:/usr/local/etc/postfix/aliases,
hash:/usr/local/etc/postfix/aliases.majordomo
#body_checks = pcre:/usr/local/etc/postfix/body_checks
bounce_queue_lifetime = 1d
default_process_limit = 500
#header_checks = pcre:/usr/local/etc/postfix/header_checks
local_recipient_maps = $alias_maps unix:passwd.byname
maximal_backoff_time = 4h
maximal_queue_lifetime = 2d
minimal_backoff_time = 30m
mydestination = $myhostname, localhost.$mydomain, $mydomain
mynetworks = 204.89.253.0/24, 66.244.64.0/18, 216.249.64.0/19, 127.0.0.1/32,
68.68.80.0/20, 173.243.176.0/20, 10.0.0.2/32
myorigin = $mydomain
relay_domains = hash:/usr/local/etc/postfix/relay
smtpd_banner = mail.bluemarble.net ESMTP
# sasl config
# ==================
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
# tls config
# ==================
smtpd_tls_security_level = may
smtpd_tls_cert_file = /usr/local/certs/smtpd.pem
smtpd_tls_key_file = $smtp_tls_cert_file
smtpd_tls_loglevel = 1
#smtpd_use_tls = 1
smtpd_tls_received_header = yes
smtpd_tls_mandatory_protocols = TLSv1
smtpd_client_restrictions =
check_client_access hash:/usr/local/etc/postfix/client_access
smtpd_recipient_restrictions =
reject_unknown_sender_domain,
check_sender_access hash:/usr/local/etc/postfix/sender_access,
check_recipient_access hash:/usr/local/etc/postfix/recipient_access,
permit_mynetworks,
# reject_rbl_client sbl-xbl.spamhaus.org,
permit_sasl_authenticated,
reject
syslog_facility = local1
virtual_maps = hash:/usr/local/etc/postfix/virtual
html_directory = /usr/local/share/doc/postfix
disable_vrfy_command = yes
smtpd_client_connection_rate_limit = 10
# 66.244.73.131 - CMS server : 66.244.73.54 - Main Office:
smtpd_client_event_limit_exceptions = 204.89.253.0/24, 66.244.73.131/32,
66.244.73.54/32, 127.0.0.1/32, 66.244.74.104/29, 10.0.0.2/32
anvil_rate_time_unit = 60s
anvil_status_update_time = 300s
smtp_bind_address = 204.89.253.18
transport_maps = hash:/usr/local/etc/postfix/transport
# About 2 Gigs
mailbox_size_limit = 2048576000
# About 50 Megs when including encapsulation
message_size_limit = 72428800
virtual_mailbox_limit = 0
recipient_delimiter = +
data_directory = /var/db/postfix
And master.cf
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - 100 smtpd
#submission inet n - n - - smtpd
# -o smtpd_tls_security_level=encrypt
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
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
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o smtp_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
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
#maildrop unix - n n - - pipe
# flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# ====================================================================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp unix - n n - - pipe
# flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail unix - n n - - pipe
# flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp unix - n n - - pipe
# flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient
#
#scalemail-backend unix - n n - 2 pipe
# flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
# ${nexthop} ${user} ${extension}
#
#mailman unix - n n - - pipe
# flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
# ${nexthop} ${user}
--
Dave Brodin
Network Operations Manager
Smithville Digital
This message may contain information that is confidential. If you are not an
intended recipient, use and disclosure of this message are prohibited. If you
received this transmission in error, please notify the sender by reply e-mail
and delete the message and any attachments.