Is there a way to clean up un-read messages from imap mail server

We have been successfully creating issues from emails sent through an imap server using 3 different mail handlers for different email addresses.

I've been asked by our IT folks if there is a way to configure an additional mail handler or change the configuration of the existing handlers to remove old emails that are on the imap server but aren't being picked by any of the various mail handlers for various reasons.

For example, if someone sends an email to one of the 3 email addresses but doesn't include a subject, the email comes in and sits on the imap server but isn't picked up by the mail handler because it has no subject.

Is this possible or should they just add a script to cleanup emails older than 5 days or something? Mail handlers are running every minute.

Any suggestions?

2 answers

1 accepted

Hi Richie,

As it turns out, I think that will help... now. In cleaning up and examining what was happening and what was building up on the server, we found that there were three types of messages that weren't being handled:

  1. A couple of bulk ones which we can configure with the Bulk setting in the mail handler.
  2. A couple of "no subject" ones which we can address with the Forward Email setting.
  3. A larger set of emails that were auto-forwarded a couple of times to an address that had a mail handler but due to the auto-forwarding, weren't being handled.

After discussion with some users, it turns out the third type don't actually need to have a mail handler so we can eliminate it

So we had multiple mail handlers to "catch" 4 different incoming email addresses. 3 of them were directed to 1 project and 1, associated with the thrid type mentioned above, was directed to another project.

Since we can now eliminate the mail handler associated with the third type of accruing emails mentioned above, we can probably collapse the other 3 into a single one with no catch email, set the Forward Email and Bulk field and this would keep the server clean, I think.

Thanks for the info. I think it lead me in the right direction.

Let me ask a slightly different but related question: Does anyone know if there is an order or precedence when there are multiple mail handlers?

One of the thoughts we had was to add a "catch-all" handler at the "end" but we weren't sure there was actually an order or precedence to the way they are run if there are multiple ones.

1 vote
Richie Gee Atlassian Team Apr 22, 2013

Hi Andrew,

You can try setting the forward mail, what it does is by quoted below

Forward Email

If specified, then if this mail service is unable to handle an email message it receives, an email message indicating this problem will be forwarded to the email address specified in this field.

Hope this helps :)

https://confluence.atlassian.com/display/JIRA/Creating+Issues+and+Comments+from+Email

Cheers

Suggest an answer

Log in or Join to answer
Community showcase
Sarah Schuster
Posted Jan 29, 2018 in Jira

What are common themes you've seen across successful & failed Jira Software implementations?

Hey everyone! My name is Sarah Schuster, and I'm a Customer Success Manager in Atlassian specializing in Jira Software Cloud. Over the next few weeks I will be posting discussion topics (8 total) to ...

3,264 views 14 20
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot