com.sun.mail.iap.BadCommandException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • h3. Summary POP mail servers that are set up in JIRA may experience duplicate issue creation as a result of the JIRA 7.1.0-OD-01 release on November 23rd. h3. Environment * JIRA 7.1.0-OD-01 * POP mail servers h3. Steps to Reproduce # Have emails in your POP mail server h3. Expected Results 1 issue is created or one comment is created per email. h3. Actual Results Two issues are created, and the following may appear in the logs {noformat} javax.mail.MessagingException: A14 BAD Command Argument Error. 11; nested exception is: com.sun.mail.iap.BadCommandException: A14 BAD Command Argument Error. 11 at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:905) at com.atlassian.jira.plugins.mail.internal.DefaultMailLoopDetectionService.isPotentialMessageLoop(DefaultMailLoopDetectionService.java:57) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.canHandleMessage(AbstractMessageHandler.java:437) at com.atlassian.jira.plugins.mail.handlers.AbstractCommentHandler.handleMessage(AbstractCommentHandler.java:108) at com.atlassian.jira.plugins.mail.handlers.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:98) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:435) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:301) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:423) {noformat} h3.Workaround Use IMAP for your mail server, this will prevent issue duplication. Follow [Configuring JIRA to Receive Email from a POP or IMAP Mail Server|https://confluence.atlassian.com/jiracloud/configuring-jira-to-receive-email-from-a-pop-or-imap-mail-server-735941059.html] for instructions.
    via by Matthew Hunter,
  • h3. Summary POP mail servers that are set up in JIRA may experience duplicate issue creation as a result of the JIRA 7.1.0-OD-01 release on November 23rd. h3. Environment * JIRA 7.1.0-OD-01 * POP mail servers h3. Steps to Reproduce # Have emails in your POP mail server h3. Expected Results 1 issue is created or one comment is created per email. h3. Actual Results Two issues are created, and the following may appear in the logs {noformat} javax.mail.MessagingException: A14 BAD Command Argument Error. 11; nested exception is: com.sun.mail.iap.BadCommandException: A14 BAD Command Argument Error. 11 at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:905) at com.atlassian.jira.plugins.mail.internal.DefaultMailLoopDetectionService.isPotentialMessageLoop(DefaultMailLoopDetectionService.java:57) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.canHandleMessage(AbstractMessageHandler.java:437) at com.atlassian.jira.plugins.mail.handlers.AbstractCommentHandler.handleMessage(AbstractCommentHandler.java:108) at com.atlassian.jira.plugins.mail.handlers.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:98) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:435) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:301) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:423) {noformat} h3.Workaround Use IMAP for your mail server, this will prevent issue duplication. Follow [Configuring JIRA to Receive Email from a POP or IMAP Mail Server|https://confluence.atlassian.com/jiracloud/configuring-jira-to-receive-email-from-a-pop-or-imap-mail-server-735941059.html] for instructions.
    via by Matthew Hunter,
  • The message threshold limit needs to be set to 0 in advance configuration (otherwise The BAD Command Argument Error will be thrown in the log: {code} 2015-03-16 14:28:33,076 atlassian-scheduler-quartz1.clustered_Worker-1 ERROR ServiceRunner XXXX-XXX [plugins.mail.internal.DefaultMailLoopDetectionService] Unable to set flags javax.mail.MessagingException: A14 BAD Command Argument Error. 11; nested exception is: com.sun.mail.iap.BadCommandException: A14 BAD Command Argument Error. 11 at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:905) at com.atlassian.jira.plugins.mail.internal.DefaultMailLoopDetectionService.isPotentialMessageLoop(DefaultMailLoopDetectionService.java:57) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.canHandleMessage(AbstractMessageHandler.java:437) at com.atlassian.jira.plugins.mail.handlers.AbstractCommentHandler.handleMessage(AbstractCommentHandler.java:108) at com.atlassian.jira.plugins.mail.handlers.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:98) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:438) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:304) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:426) at com.atlassian.jira.service.services.file.AbstractMessageHandlingService.run(AbstractMessageHandlingService.java:263) at com.atlassian.jira.service.JiraServiceContainerImpl.run(JiraServiceContainerImpl.java:66) at com.atlassian.jira.service.ServiceRunner.runService(ServiceRunner.java:75) at com.atlassian.jira.service.ServiceRunner.runServiceId(ServiceRunner.java:53) at com.atlassian.jira.service.ServiceRunner.runJob(ServiceRunner.java:36) at com.atlassian.scheduler.core.JobLauncher.runJob(JobLauncher.java:135) at com.atlassian.scheduler.core.JobLauncher.launchAndBuildResponse(JobLauncher.java:101) at com.atlassian.scheduler.core.JobLauncher.launch(JobLauncher.java:80) at com.atlassian.scheduler.quartz1.Quartz1Job.execute(Quartz1Job.java:32) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: com.sun.mail.iap.BadCommandException: A14 BAD Command Argument Error. 11 at com.sun.mail.iap.Protocol.handleResult(Protocol.java:353) at com.sun.mail.imap.protocol.IMAPProtocol.storeFlags(IMAPProtocol.java:1589) at com.sun.mail.imap.protocol.IMAPProtocol.storeFlags(IMAPProtocol.java:1574) at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:901) ... 18 more {code} This is related to [BAD Command Argument Error when creating issue via email with Microsoft Exchange|https://confluence.atlassian.com/display/JIRAKB/BAD+Command+Argument+Error+when+creating+issue+via+email+with+Microsoft+Exchange].
    via by Aqqiela Zuhra [Atlassian],
    • com.sun.mail.iap.BadCommandException: A14 BAD Command Argument Error. 11 at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:905) at com.atlassian.jira.plugins.mail.internal.DefaultMailLoopDetectionService.isPotentialMessageLoop(DefaultMailLoopDetectionService.java:57) at com.atlassian.jira.plugins.mail.handlers.AbstractMessageHandler.canHandleMessage(AbstractMessageHandler.java:437) at com.atlassian.jira.plugins.mail.handlers.AbstractCommentHandler.handleMessage(AbstractCommentHandler.java:108) at com.atlassian.jira.plugins.mail.handlers.CreateOrCommentHandler.handleMessage(CreateOrCommentHandler.java:98) at com.atlassian.jira.service.services.mail.MailFetcherService$1.process(MailFetcherService.java:435) at com.atlassian.jira.service.services.mail.MailFetcherService$MessageProviderImpl.getAndProcessMail(MailFetcherService.java:301) at com.atlassian.jira.service.services.mail.MailFetcherService.runImpl(MailFetcherService.java:423)
    No Bugmate found.