Article ID: 6007, created on Feb 3, 2009, last review on Oct 16, 2014

  • Applies to:
  • Automation


There are no logs of POP3/IMAP activity in /var/log/maillog on qmail service nodes.


CourierIMAP logging is not set up by default.


On every qmail service node, modify the file /etc/init.d/courier-imap. Add two arguments:
-stderrlogger=/usr/local/qmail/bin/splogger -stderrloggername=POP_SERVICE_NAME
after $TCPD in each line in function start() and
POP_SERVICE_NAME must be substituted with a single-word value you want to see in /var/log/maillog as the program name

For example, a modified start() function for courier-imap >= 4.4.1:

start() {
        echo "Starting $prog"

        $TCPD -stderrlogger=/usr/local/qmail/bin/splogger -stderrloggername=pop3d -maxperip=100 -maxprocs=100 -pid=$POP3D_PID_FILE 110 $POP3_ARGS

        TLS_CERTFILE=$CERT_ROOT/pop3d.pem \
            $TCPD -stderrlogger=/usr/local/qmail/bin/splogger -stderrloggername=pop3d -pid=$POP3D_SSL_PID_FILE 995 $COURIERTLS -server -tcpd $POP3_ARGS

        $TCPD -stderrlogger=/usr/local/qmail/bin/splogger -stderrloggername=imapd -maxperip=100 -maxprocs=100 -pid=$IMAPD_PID_FILE 143 $IMAP_ARGS

        TLS_CERTFILE=$CERT_ROOT/imapd.pem \
            $TCPD -stderrlogger=/usr/local/qmail/bin/splogger -stderrloggername=imapd -pid=$IMAPD_SSL_PID_FILE 993 $COURIERTLS -server -tcpd $IMAP_ARGS

After modifying /etc/init.d/courier-imap, restart the courier-imap service using this command:

service courier-imap restart

Additional information

This manual setting will be discarded upon upgrading to a newer package of "courier-imap."
This package had not been changed for several years until in Parallels Operations Automation (POA) 2.8, hotfixes (or until POA 2.9, if you skip hotfixes) for courier-imap were upgraded to v. 4.4.1.
Please pay attention to this.


Email subscription for changes to this article
Save as PDF