November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

Categories

November 2024
M T W T F S S
 123
45678910
11121314151617
18192021222324
252627282930  

mtrack qmail

cd /downloads/scripts/
wget http://qmail.jms1.net/scripts/mtrack
wget http://qmail.jms1.net/scripts/strack
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 nospam@test.com
@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 thibs.com:XX.XX.XX.XX XXXXX.com:XX.XX.XX.XX::49391
@400000004e469ca5337c2b0c qmail-smtpd[14351]: MFCHECK pass [XX.XX.XX.XX] XXXXX.com
@400000004e469ca533ca1844 qmail-smtpd[14351]: Received-SPF: pass (YYYY.com: SPF record at XXXXX.com 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

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>