I've been trying to run down a bunch of SMTP Auth, SPF, and 451 System Error issues for several months now. The fact that the Message Tracker has been pretty well broken for all this time is not particularly helpful. :-( This generally requires me to plow through the SMTP log files manually to accumulate and organize the data I need...
After struggling for so long to find and extricate the needed info, it became obvious that it would simply be more efficient to create a tool to assist in this process. I wrote similar scripts and executables (under linux) to process and parse the old GWAVA logs (inc sending alerts in real time), so I had a pretty good idea of what I needed to do and how to go about it.
Anyway, as I expect many folks know, there can be log messages from multiple concurrent threads intermingled in the SMG log files. So, part of the task at hand it to actually isolate/parse/extract the associated log entries for an individual qualifying conversation. ...and the string you are looking for likely requires you to back up in the log file to find the point of first contact if you want the whole conversation (inc Date, Time, and source IP).
- The little utility I have attached to this posting will search a specified SMG SMTP Log file (downloaded) for a particular string (case insensitive). It can be an email address, part of an email address, an IP Address, a system error, or pretty much ANYTHING which might appear in the file. It only contains a minimum amount of error checking, but it seems to get the job done nicely (at least for me)
- It will work to isolate, extricate, and dump any/all qualifying SMTP conversations which have that string somewhere in them. It is designed to work efficiently such that if a matching string appears in an individual conversation more than once, it will not try to dump the same conversation over and over.
- Each "Qualifying" conversation will be isolated and dumped to an individual text file which has the same name as the logfile (YYYYMMDD) followed by the start time of the conversation (_HHMMSS). This should make it fairly simple to open an individual "qualifying conversation" in a text editor to examine the entries.
- As the tool searches for qualifying conversations, it will display a brief summary of each match it finds in a running dialog (ThreadID, Date, Time, Source IP, Sender, and Recipient). This summary can make it fairly simple to see, for example, which senders and domains are causing SMG to generate a "451 System Error"... (As is my current task)
I have previously written other scripts and tools to generate a nightly report of all conversations processed by GWAVA the day before. Essentially a chronological list of each conversation (with similar data as above), and then a summary listing of the number of SPF, IPREP, SURBL, or RBL a particular domain generates (to help identify those that need to be whitelisted), how many messages were being sent/received by each of our users (to help identify if any account was compromised by spammers), and few other salient statistics. However, I'm not to that point yet with SMG as I'm way to busy trying to identify and resolve a myriad of delivery issues... :-(
Anyway, if you find the attached tool useful, please let me know. Suggestions are usually appreciated (even if never actually implemented). :-)