How to prevent Mail Loops

Mail Loops

Mail Loops occur when JEMH notifies an email address that is also used as an incoming mailbox.  JEMH will not process such messages as they are detected and filtered, resulting in a Forward message.  This is a configuration issue.

Non-JIRA users enabled

If you have non-jira users involved, this will happen if the JIRA inbound email address is not listed in either the JEMH "Catch Email Address" field (eg support@domain.com) or "JEMH Addressee regexps" field (eg .*@domain.com). Matching addresses are excluded from being stored by JEMH in custom fields, therefore preventing notifications from being sent back to them.

The Default Reporter

If you do not have your inbound address appearing in the custom field, good!  But another source is that the Default Reporter can sometimes be given the 'inbound' mail address, this is not a good idea, its another source of a mail loop.  The Default Reporter should not ever receive emails, change the email address to be something like 'support@disabled.com' and then add the same address to the JEMH Event Listener Disabled Domains to cause that address to be filtered from notifications at all (saves build up somewhere else).

Other causes

Less likely, but also possible is that a mail loop has been set up outside JEMH through default JIRA notifications, something similar to the Default Reporter, but for another automation user.  Check the related issue for users with addresses matching any of your inboxes.

Stopping an ongoing Mail Loop

If you are experiencing a mail loop, the quickest way to stop it is to disable the JEMH Event Listener by going to JEMH > Notifications, Click the pencil Icon on the right side of ‘Issue Events’ and uncheck ‘Listener Enabled’.

Related Articles