Is there a command to flush email queue?

Working an email problem with Atlassian at this time (see JSP-129280). The problem basically is that JIRA has stopped sending emails according to the schedule and all emails must be manually flushed. To do this I must be logged into the Admin section of JIRA and continually monitor the Mail Queue. Is there a command I can run from the command line to flush the queue so I don't have to flush it from the GUI? Otherwise email is working just fine, just the scheduler has stopped working (I have a feeling a restart of JIRA is in order but waitin for Atlassian to finish their investigation first!).

I am running JIRA 4.2 on Solaris 10 and figured I could set a cron job to run every so often if there is a way from the command-line to flush the mail queue. I have looked through some of the Answers here as well as some Atlassian docs, but none of the fixes apply in this case, I have not seen any Out of Memory Errors or "IllegalArgumentException: Passed List had more than one value" problems.

Thanks in advance for the help!

3 answers

This widget could not be displayed.

No. There's no "command line" in Jira you could use.

Bob Swift's "Command line plugin" does allow us to pretend that there is (and it does an excellent job, especially if you're scripting), but I don't think it has a "flush mail queue" function.

The best dirty hack I can think of is to find a unix box and whack a cron job on it that uses curl or wget to hit the "flush mail queue" url regularly with an admin account's credentials. I'm uncomfortable with the security on that, but it'll work.

By the way, we non-Atlassian bods can't see JSP issues - they're private, between the Customer and Atlassian

I forgot this Issue was under lock-and-key, sorry about that.

I do not feel comforable with curl or wget as you described either, but heck of great idea! I think I will just have to not be lazy and just remember to hit the "Flush Queue" more often. I am going to look into the "Command line plugin" though, sounds interesting....

Thanks for the help!

Is there anyone manage to create a script to flush mail queue and schedule it as cron task? Thanks!

This widget could not be displayed.

I ran into this problem before. A restart of JIRA did resolve the issue.

Yeah, figured that would help, looks like Atlassian wants me to do a little more house-cleaning before restarting though, we just went through a mail migration so the fallout has not been completely sorted yet.

Thanks for the insight!

This widget could not be displayed.

JIRA was restarted this evening and this has cleared the problem, I am now seeing email again from JIRA without having to manually flush the queue.

Please forgive me for being the new guy but I like both the answers I got, Jo-Ann's was actually correct but Nic gave me great advice. How do I give both some credit? I will keep looking on the forums to see if I can find my own answer to this...

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Aug 06, 2018 in Jira Service Desk

A is for Activate: Share your top Jira Service Desk onboarding tips for new users!

Hi, everyone! Molly here from the Jira Service Desk Product Marketing Team :).  In the spirit of this month's  august-challenge, we're sourcing stories of Jira Service Desk activation fro...

565 views 25 15
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