E-mail protocol details are not written in JIRA 6.4+ even with Outgoing Mail Debug enabled

XMLWordPrintable

    • 6.04
    • 15
    • Severity 3 - Minor
    • 0

      Summary

      E-mail protocol details are not logged in JIRA 6.4+ when Outgoing Mail Debug is enabled

      Steps to Reproduce

      1. Install JIRA 6.4 or later.
      2. Configure an SMTP server and enable outgoing mail debug on Logging and Profiling.
      3. Trigger an event which will send a notification.
      4. Wait until the mail queue is flushed (or flush it manually).

      Expected Results

      All the e-mail protocol details, including the e-mail message itself should be included in the logs. This used to be the behaviour on JIRA 6.3.x and earlier versions.
      A sample e-mail debug log file from JIRA 6.3.15 has been attached and can be downloaded in the following link: atlassian-jira-outgoing-mail.log

      Actual Results

      The entries below are written to the atlassian-jira-outgoing-mail.log file:

      2015-07-22 15:17:39,553 DEBUG [] Sending mailitem To='user@email.com' Subject='(DEMO-1) What is an issue?' From='null' FromName='admin (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@5dbe3648' MessageId='null' admin 917x335x1 1d308w6 0:0:0:0:0:0:0:1 /secure/admin/MailQueueAdmin.jspa Getting session
      2015-07-22 15:17:39,557 DEBUG [] Sending mailitem To='user@email.com' Subject='(DEMO-1) What is an issue?' From='null' FromName='admin (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@5dbe3648' MessageId='null' admin 917x335x1 1d308w6 0:0:0:0:0:0:0:1 /secure/admin/MailQueueAdmin.jspa Session providers: [[javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun Microsystems, Inc], javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Sun Microsystems, Inc], javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun Microsystems, Inc], javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Sun Microsystems, Inc], javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun Microsystems, Inc], javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Sun Microsystems, Inc]]]
      2015-07-22 15:17:39,557 DEBUG [] Sending mailitem To='user@email.com' Subject='(DEMO-1) What is an issue?' From='null' FromName='admin (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@5dbe3648' MessageId='null' admin 917x335x1 1d308w6 0:0:0:0:0:0:0:1 /secure/admin/MailQueueAdmin.jspa Session addressMap: [{rfc822=smtp}]
      2015-07-22 15:17:39,559 DEBUG [] Sending mailitem To='user@email.com' Subject='(DEMO-1) What is an issue?' From='null' FromName='admin (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@5dbe3648' MessageId='null' admin 917x335x1 1d308w6 0:0:0:0:0:0:0:1 /secure/admin/MailQueueAdmin.jspa Getting transport for protocol [smtps]
      2015-07-22 15:17:39,559 DEBUG [] Sending mailitem To='user@email.com' Subject='(DEMO-1) What is an issue?' From='null' FromName='admin (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@5dbe3648' MessageId='null' admin 917x335x1 1d308w6 0:0:0:0:0:0:0:1 /secure/admin/MailQueueAdmin.jspa Got transport: [smtps:]. Connecting
      2015-07-22 15:17:41,352 DEBUG [] Sending mailitem To='user@email.com' Subject='(DEMO-1) What is an issue?' From='null' FromName='admin (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@5dbe3648' MessageId='null' admin 917x335x1 1d308w6 0:0:0:0:0:0:0:1 /secure/admin/MailQueueAdmin.jspa Sending message
      2015-07-22 15:17:43,323 DEBUG [] Sending mailitem To='user@email.com' Subject='(DEMO-1) What is an issue?' From='null' FromName='admin (JIRA)' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/html' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@5dbe3648' MessageId='null' admin 917x335x1 1d308w6 0:0:0:0:0:0:0:1 /secure/admin/MailQueueAdmin.jspa Message was sent with Message-Id <JIRA.10000.1437588011000.1.1437589059553@Atlassian.JIRA>
      

      Workaround

      1. Set the property -Dmail.debug=true and restart JIRA. See Setting properties and options on startup for details on how to do this.
      2. Enable Outgoing Mail debug on Logging and Profiling.
        Both parameters above must be configured to write the protocol details in the atlassian-jira-outgoing-mail.log file.

            Assignee:
            Unassigned
            Reporter:
            Danilo Conrad
            Votes:
            6 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated: