How to tune the postfix in your server?
The probably the best thing you could do is to write the logs to
another syslog server as is done in this syslog.conf snippet.
mail.* @xxx.xxx.xxx.xxx
or if you can’t spare a machine for that, put dash in front of the
filename. Default behavior of syslogd is to sync the logfile after every
change. Testing before and after, this dropped my load average by about
70% on a box that relays and buffers incoming email for about 10,000
mailboxes.
mail.* -/var/log/maillog
Syslogging to another machine would be the ideal solution.
For postfix, I also set these in /etc/postfix/main.cf
minimal_backoff_time = 2000s
maximal_backoff_time = 8000s
maximal_queue_lifetime = 2d
message_size_limit = 10240000
qmgr_message_active_limit = 20000
qmgr_message_recipient_limit = 20000
transport_retry_time = 120s
Basically just taming the queue to work not quite so hard to send all the
bounced spam back to the sender.
The last three were doubled. I am not 100% certain I understand the
qmgr_message ones, but my understanding is that it increases the amount of
ram the queue can use. More ram operation == less disk thrashing so that’s
my reason for that.

Leave a Reply