554 Relay Rejected for Policy Reasons Errors when Sending Mail from Confluence
Symptoms
When trying to send a test mail from Admin > Mail Server > Send Test mail
or when Confluence tries to send notifications, the following errors are thrown:
An error has occurred with sending the test email:
com.sun.mail.smtp.SMTPSendFailedException: 554 Mail from user@example.com rejected for policy reasons.
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:1275)
at com.sun.mail.smtp.SMTPTransport.mailFrom(SMTPTransport.java:895)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:524)
at javax.mail.Transport.send0(Transport.java:151)
at javax.mail.Transport.send(Transport.java:80)
at alt.javax.mail.TransportImpl.send(TransportImpl.java:18)
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:168)
at com.atlassian.confluence.admin.actions.mail.SendTestEmailAction.execute(SendTestEmailAction.java:52)
OR
2010-02-05 09:43:00,260 ERROR [DefaultQuartzScheduler_Worker-9|DefaultQuartzScheduler_Worker-9] [atlassian.core.task.AbstractErrorQueuedTaskQueue] handleException com.atlassian.mail.MailException: javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 554 Relay rejected for policy reasons.
com.atlassian.mail.MailException: javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 554 Relay rejected for policy reasons.
at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:191)
at com.atlassian.confluence.mail.template.AbstractMailNotificationQueueItem.send(AbstractMailNotificationQueueItem.java:120)
at com.atlassian.confluence.mail.template.PreRenderedMailNotificationQueueItem.send(PreRenderedMailNotificationQueueItem.java:88)
Cause
Confluence is attempting to send mail, and the mailserver is rejecting it. This is due to one of the following causes:
- The Confluence instance is configured to use a particular mail server for outgoing mail.
- Most mail servers, to prevent them being used as anonymous spam relays, are configured only to relay mail from certain hosts.
- The mail server is configured to reject mail from the machine on which Confluence is installed.
Resolution
Contact your mail server administrator, and have them set up relaying for the host on which Confluence is installed.
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.