How to monitor outgoing JIRA mail

Problem Background

Over the past few years, I have noticed that sometimes I do not receive an email notification from my (locally installed) JIRA.  Other users have reported the problem too, and I would estimate it happens maybe 1 in 50 times.

At this moment I am not sure whether the emails are being deleted by some spam filter (seems unlikely as most of the time they receive OK), or it is some SMTP/server setting problem, or some problem with JIRA.  I have tried looking in the mail logs, however the information recorded by my server (Win2003/IIS) is quite minimal.  JIRA log also contains no errors or useful info to track down the problem (JIRA offers no function to copy all outgoing mail to an admin address, or log all outgoing mail etc).

So I tried to find a way to fully log all outgoing JIRA mail, so next time it happens I can find the root of the problem.

Solution

I tried several software but the best solution for me was MailMonitor, it is quite reasonable at 50 EURO and it works great.

This software will log all outgoing mails to screen and to file.  So you can easily see an archive of all email contents including subject and body.  It operates at SMTP server level so it records all mail going from your server, not just from JIRA.  (incoming mail can also be logged).

The settings were a bit tricky to understand but with trial and error I managed to get it to record only outgoing mail, including body, to file.

I regularly restart my server, so it was necessary to force the problem to run and start monitoring at start – this can be done by using a Windows Scheduled Task to run “mailmonitor.exe -s”

Update (Jan 25 2010)

This mail problem has been reported to me again this morning.  I looked in the Mailmonitor log and sure enough there is no record of the email beign sent.  I am sure there is a problem with JIRA or my setup.  I am going to turn on mail debugging and see if this helps next time.