
jms1 at jms1
Feb 18, 2009, 12:30 PM
Post #2 of 7
(2485 views)
Permalink
|
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 2009-02-18, at 1415, jim steele wrote: > > I have gotten mail flow working properly with qmail, but there is one > thing that I need that I cannot figure out. A few times per month, > there will be a customer who claims not to have received an email from > our system, and I go to the Microsoft SMTP service log file to > retrieve the log of the outgoing SMTP conversation that proves that we > sent the message, including what our server said, and what their > server said in response (less the DATA portion). I provide the log to > the customer so that they can determine the problem on their end. > > How do I make qmail log the outgoing SMTP conversation? qmail doesn't log the entire conversation. the qmail-send log contains a record of every delivery attempt, including the envelope sender and recipient, as well as the remote server's response after the end of the DATA transaction. the logs are not all one-line entries, and no one line contains all of the information you need. plus if the server happens to be sending more than one message at a time, the log lines for the various messages will be interspersed with each other. the "mtrack" script on my web site may prove helpful in reading the log- it reads the log file and prints the lines back out, grouped by the message they pertain to. i wrote it when i was running a busy ISP and needed to track my own log files. for example, here's a snippet of my own log file, as parsed through mtrack. i sent a message to this list earlier today, and when djb's "secretary" sent back the challenge message, i replied to it. while this was happening, there were two or three other messages being processed at the same time, and mtrack showed them as separate groups of lines. @40000000499bcc6333b4cf0c new msg 2982375 @40000000499bcc6333b4f234 info msg 2982375: bytes 3401 from <jms1 [at] jms1 > qp 27472 uid 162 @40000000499bcc6333b4fdec starting delivery 28713: msg 2982375 to remote qmail [at] list @40000000499bcc66048f1b4c delivery 28713: success: 131.193.36.27_accepted_message./ Remote_host_said:_250_ok_1234947623_qp_71040/ @40000000499bcc66048fafbc end msg 2982375 @40000000499bccb60b8d9694 new msg 2982375 @40000000499bccb60b8db5d4 info msg 2982375: bytes 7019 from <jms1 [at] jms1 > qp 27505 uid 162 @40000000499bccb60b8dc574 starting delivery 28715: msg 2982375 to remote list-qmail-notbulkmail-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx [at] list @40000000499bccb727bd06ec delivery 28715: success: 131.193.36.27_accepted_message./ Remote_host_said:_250_ok_1234947704_qp_75254/ @40000000499bccb727bd9b5c end msg 2982375 http://qmail.jms1.net/scripts/#mtrack if you're interested. it's certainly possible to generate more detailed logging if you need it, however this would involve patching (modifying the source code.) it's an interesting idea, and i may write something like this in the future (i'm working on other things at the moment) however if it's something you need now (i.e. if the information in the qmail-send logs isn't enough) then contact me off-list and we can talk about it. - ---------------------------------------------------------------- | John M. Simpson --- KG4ZOW --- Programmer At Large | | http://www.jms1.net/ <jms1 [at] jms1> | - ---------------------------------------------------------------- | http://video.google.com/videoplay?docid=-1656880303867390173 | - ---------------------------------------------------------------- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkmcb8kACgkQj42MmpAUrRopSACghqR8xXGnIe4EiU91Y67Swluv ezkAniUdEqqKfZfJV5bLQaDnpw8vZ3Hc =Ob0g -----END PGP SIGNATURE-----
|