Skip to content

HOWTO: Optimize and Tune Debian OS for LARGE SENDING emails with postfix

March 22, 2012

..continue from debian install -> HOWTO: Install and Configure Postfix + DKIMProxy FOR LARGE SENDING on Debian

1. Stop loggin to syslog, log only to mail.log,mail.info,mail.warn and mail.err

# grep mail.none /etc/rsyslog.conf
*.*;auth,authpriv.none,mail.none -/var/log/syslog
news.none;mail.none -/var/log/debug

1.1 Lograte mail logs because big size and make logrotate logrotates mail.log and mail.info logs every hour for sizes checks.

root@smtp1:~/scripts/production# cat /etc/logrotate.d/mail.*
/var/log/mail.info {
size 100M
copytruncate
missingok
rotate 200
nocompress
notifempty
}
/var/log/mail.log {
size 100M
copytruncate
missingok
rotate 200
nocompress
notifempty
}

# Yes I dont wonna compress them because of reasons 🙂

1.2 Insert logrotate in cron.hourly

root@smtp1:~# cat /etc/cron.hourly/logrotate |grep .

#!/bin/sh
test -x /usr/sbin/logrotate || exit 0
/usr/sbin/logrotate /etc/logrotate.conf

Advertisements

From → Emailling, Linux

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: