How to get the message id of the email notification that is sent successfully from confluence, but not received in the mail box of the user
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
A user is not receiving email notifications from Confluence.
As Confluence admin, you don't see any errors in the logs. You were also able to successfully send a test email to the user; however, the user says that they have not received the email.
Environment
Confluence 8.5.0 and above
Diagnosis
In this case, you can track the message ID for the notification that is sent by Confluence so it can be used by the mail server team to track where the email is routed.
Please, follow the steps below to get the message ID required:
- Go to > General Configuration > Logging and Profiling.
- Select a cluster node.
- Locate "com.atlassian.confluence.mail", and change the logging level to DEBUG
- Save changes
Remember, your changes will not be written to thelog4j.properties
file and will be discarded when you next stop Confluence. - On the same cluster node, send a test email to the "user"
In
atlassian-confluence-outgoing-mail.log
, you would see logs such as the below if a successful mail was sent out of the Confluence application to the mail server... ... 2024-04-17 07:23:38,939 DEBUG [http-nio-8090-exec-27 url: /confluence/admin/mail/dosendtestemail.action; user: xxxx [atlassian.confluence.mail.ConfluenceMailServerManager] getSessionFromServerManager Getting session 2024-04-17 07:23:38,942 DEBUG [http-nio-8090-exec-27 url: /confluence/admin/mail/dosendtestemail.action; user: xxxx [atlassian.confluence.mail.ConfluenceMailServerManager] getMoreDebugInfoAboutCreatedSession Session providers: [[javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle], javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Oracle], javax.mail.Provider[STORE,imaps,com.sun.mail.imap.IMAPSSLStore,Oracle], javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Oracle], javax.mail.Provider[TRANSPORT,smtps,com.sun.mail.smtp.SMTPSSLTransport,Oracle], javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Oracle], javax.mail.Provider[STORE,pop3s,com.sun.mail.pop3.POP3SSLStore,Oracle]]] 2024-04-17 07:23:38,942 DEBUG [http-nio-8090-exec-27 url: /confluence/admin/mail/dosendtestemail.action; user: xxxx] [atlassian.confluence.mail.ConfluenceMailServerManager] getMoreDebugInfoAboutCreatedSession Session addressMap: [{rfc822=smtp}] 2024-04-17 07:23:38,944 DEBUG [http-nio-8090-exec-27 url: /confluence/admin/mail/dosendtestemail.action; user: xxxx] [atlassian.confluence.mail.ConfluenceMailServerManager] sendWithMessageId Getting transport for protocol [smtp] 2024-04-17 07:23:38,944 DEBUG [http-nio-8090-exec-27 url: /confluence/admin/mail/dosendtestemail.action; user: xxx] [atlassian.confluence.mail.ConfluenceMailServerManager] getTransport Obtaining transport object directly (no caching). 2024-04-17 07:23:38,944 DEBUG [http-nio-8090-exec-27 url: /confluence/admin/mail/dosendtestemail.action; user: xxxx] [atlassian.confluence.mail.ConfluenceMailServerManager] sendWithMessageId Got transport: [smtp://mailservername.com]. Connecting 2024-04-17 07:23:38,947 DEBUG [http-nio-8090-exec-27 url: /confluence/admin/mail/dosendtestemail.action; user: xxxx] [atlassian.confluence.mail.ConfluenceMailServerManager] sendWithMessageId Sending message 2024-04-17 07:23:42,164 DEBUG [http-nio-8090-exec-27 url: /confluence/admin/mail/dosendtestemail.action; user: xxxx] [atlassian.confluence.mail.ConfluenceMailServerManager] sendWithMessageId Message was sent with Message-Id <832303358.9340.1713363818950@mailservername.com> ... ...
- Collect the message id from the above log example "Message-Id <832303358.9340.1713363818950@mailservername.com>" and share it with mail server team to track why the mail is not delivered.
It is likely that there is some incorrect configuration with on SMTP server side. From previous customer experiences, Atlassian team encountered a situation where the SMTP server was configured to suppress emails that were meant for specific email addresses and not send them. If this was not enough to identify the underlying problem, please raise a new case with Atlassian Support and we will help you further.