Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am using sendmail in a farm of ~10 servers processing 200-500 messages a minute. I have found that after moving to a virtual environment, my largest bottleneck is disk write, and specifically the sendmail log output, and mailqueue.

I do not have control over the hardware to modify anything there.

I have two questions: 1) Is it possible to output sendmail logs compressed onto disk? This would not only reduce total disk writes but remove the need to compress during log rotation.

2) How might I set up sendmail to not write temp files to mailqueue when possible?

Edit: To provide more information: I do not have access to information on the hardware or hypervisor (it is my understanding that it is running on a VMWare Enterprise platform though). The filesystem is ext4. The purpose of the servers is to act as a gateway system providing light virus and spam filtering prior to the mailserver.

share|improve this question
what file system? – Chopper3 Mar 20 '13 at 17:26
what hypervisor? – Alex Mar 20 '13 at 17:31
Much of what sendmail does is to implement "no mail loss" integrity. It might seem there are places to speed it up, but even if you could, that exposes it to mail loss. Other mail server software has a lot of the same issue. Push the problem to whoever does have control over the hardware. – Skaperen Mar 20 '13 at 17:46
What kind of SMTP servers do you run? Incoming MX with local mailboxes / outgoing SMTP AUTH / Email gateways between Internet and internal email system. Some tuning tips are type of load dependent. – Andrzej A. Filip Mar 20 '13 at 18:01
You could also setup a log server and not log locally – adamo Mar 21 '13 at 6:34

Reducing sendmail log I/O load

1) Have you turned off fsync of log files after every every log entry?

In /etc/syslog.conf preped log file name with -

mail.* -/var/log/mail

2) You may consider using single/centralized log server foe email events [see adamo comment]

rsyslogd supports TCP based forwarding -

share|improve this answer
After reading up on this, it seems like a great solution. It had, unfortunately, already been implemented (seems one of my predecessors tried to track down the same issue). We are running rsyslog. – user165620 Mar 21 '13 at 16:41

Reducing I/O load on "Internet to internal" gateway

You may use "double interactive" delivery mode to reduce I/O operations. It would delay sending ACK to "the final dot" after performing delivery attempts. It is worth to consider with high availability of internal mail servers.


"Sendmail Performance Tuning" by Nick Christenson (section 3.2 "Synchronization") additionally suggests considering increasing XF and DF buffers when using "double interactive" delivery mode.

define(`confXF_BUFFER_SIZE',`16384')dnl   16KB; default=4KB
define(`confDF_BUFFER_SIZE',`102400')dnl 100KB; default=4KB

Most likely your milters I/O demand can be fine tuned too.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.