Tuning Postfix and Its Accessories

authdaemond

You can change the number of authdaemond processes in the file /etc/courier/authlib/authdaemonrc:

daemons=2

This line sets the number of authdaemond processes to 2.

saslauthd

To change the number of saslauthd processes, edit the file /etc/conf.d/saslauthd (in Gentoo):

# Specify the number of worker processes to create.
SASLAUTHD_OPTS="${SASLAUTHD_OPTS} -n 3"

This sets the number of processes to 3.

smtp-amavis

To change the number of smtp-amavis processes, edit the file /etc/postfix/master.cf:

smtp-amavis     unix -        -       n     -       2  smtp
  -o smtp_data_done_timeout=1200
  -o smtp_send_xforward_command=yes

The number "2" in the above code snippet sets the maximum number of smtp-amavis processes to 2. If you need a greater degree of concurrency tune this number to fit your needs. Remember that to match the number with $max_servers in amavisd.conf. Keep in mind that amavisd-new is quite memory-intensive and raising the amount of amavisd-new processes too high can easily lead to memory starvation and heavy swapping, which leads to drastically reduced performance.

Verbose logging

To see verbose logging or more debug message, you can adjust the log level in these files:

  • "smtpd_tls_loglevel" in /etc/postfix/main.cf
  • "debug_peer_level" in /etc/postfix/main.cf
  • log_level in /etc/amavisd.conf

References

  • man 8 master
    The file master.cf tells the postfix master program how to run each individual postfix process.
  • man 5 postconf
    Postfix has a lot of options set in main.cf. For further explanation of the file please consult man 5 postconf or the same online Postfix Configuration Parameters.