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.

7 thoughts on “How to monitor outgoing JIRA mail

  1. Couldn’t you just monitor the smtp relay? Or do you know if the Jira sender could be monitored with something like Zabbix, or Nagios?

    • Before Mailmonitor I was looking in the IIS SMTP server logs, but they didnt contain message subject or body and were difficult to read. I need to look back in time because normally mail issues are reported to me 3 or 4 days after the event.

      Zabbix looks interesting but a little overpowered for what I need at this moment.

  2. Hi,

    For what reason do you regularly restart your server? We are currently doing that with our JIRA instance, and are looking for reasons to stop doing so. (We increased memory and do not think that the nightly restarts are necessary any longer.)

    Thanks,
    Ken

    • We had the odd bug from time to time and we advised to restart it more often, we do it once a week now on Sundays. It seems Confluence doesn’t need to restart, but maybe that will change once we start to load it with more contents.

  3. I work as an Jira Specialist mainly pointed towards security issues and configurations regarding Jira installations.
    I had this problem to with one of my customers Jira installations ( 3.13.2 ). Atlassian could not help at that point and nothing could be found in the logs. I found that the problem was solved by setting the mail delay to 2 minutes instead of 1 minute. Have never had any problems with this again at any of my customers Jira installations.

Comments are closed.