Guide updated on 29th of February 2016

Install and use tracking scripts from John M. Simpson

cd /downloads/scripts/
chmod 751 mtrack strack
cp /downloads/scripts/mtrack /var/qmail/bin/
cp /downloads/scripts/strack /var/qmail/bin/

ln -s /var/qmail/bin/mtrack /usr/bin/
ln -s /var/qmail/bin/strack /usr/bin/

Use it

cat /var/log/qmail/qmail-send/current | mtrack
cat /var/log/qmail/qmail-smtpd/current | strack
cat /var/log/qmail/qmail-smtpdssl/current | strack

You should have such result

@400000004e46646a134478e4 starting delivery 27: msg 654065 to remote [email protected]
@400000004e46647f195ff2e4 delivery 27: deferral: Sorry,_I_wasn't_able_to_establish_an_SMTP_connection._(#4.4.1)/

@400000004e469ca431a49094 tcpserver: pid 14351 from XX.XX.XX.XX
@400000004e469ca433190c0c tcpserver: ok 14351
@400000004e469ca5337c2b0c qmail-smtpd[14351]: MFCHECK pass [XX.XX.XX.XX]
@400000004e469ca533ca1844 qmail-smtpd[14351]: Received-SPF: pass ( SPF record at designates XX.XX.XX.XX as permitted sender)
@400000004e469ca533ca339c qmail-smtpd[14351]: MAIL FROM:
@400000004e469ca533ca3784 qmail-smtpd[14351]: RCPT TO:
@400000004e469caa1ccb4104 tcpserver: end 14351 status 256

When you 've installed the daemontool, you have also installed the command tai64nlocal that converts the timestamp to local time in ISO format: YYYY-MM-DD HH:MM:SS.SSSSSSSSS

You can use it to have human readable timestamp :

cat /var/log/qmail/qmail-send/current | mtrack | tai64nlocal
cat /var/log/qmail/qmail-smtpd/current | strack | tai64nlocal
cat /var/log/qmail/qmail-smtpdssl/current | strack | tai64nlocal

You should have such result

2012-02-27 06:54:46.820260500 new msg 5540369
2012-02-27 06:54:46.820261500 info msg 5540369: bytes 2653 from qp 21154 uid 168
2012-02-27 06:54:46.820261500 starting delivery 22298: msg 5540369 to remote [email protected]
2012-02-27 06:54:47.003348500 delivery 22298: success: XX.XX.XX.XX_accepted_message./Remote_host_said:_250_OK/
2012-02-27 06:54:47.003349500 end msg 5540369

2012-02-27 06:55:17.125452500 new msg 5540687
2012-02-27 06:55:17.125453500 info msg 5540687: bytes 3924 from qp 21230 uid 168
2012-02-27 06:55:17.125454500 starting delivery 22299: msg 5540687 to local [email protected]
2012-02-27 06:55:17.131165500 delivery 22299: success: did_0+0+1/
2012-02-27 06:55:17.131166500 end msg 5540687

List of optional features

Users comments

Error connecting to Database!

Color Coded Qmail Installation Key
  Regular Black Text     Qmail installation notes and summaries by the author.
  Bold Black Text     Commands to be run by you, the installer.
  Bold/Regular Red Text    Vital and/or critical information.
  Regular Blue text     Denotes helpful tips and hints or hyperlinks.
  Regular Orange Text     Command line output.
  Bold/Regular green text     Denotes the contents of a file or script.