Mail fails to send with 550 5.7.1 Unable to relay error in Jira server
Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.
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
Problem
Outlook cannot handle outbound mail. One or more of the following appears in the atlassian-jira.log
:
javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
class com.sun.mail.smtp.SMTPAddressFailedException: 550 5.7.1 Unable to relay for jira@google.com
com.atlassian.mail.MailException: com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Command not allowed
com.atlassian.mail.MailException: javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 <user@mail.com>: Relay access denied
Caused by: com.sun.mail.smtp.SMTPSendFailedException: 550 5.7.1 Client does not have permissions to send as this sender
There is a known bug tracked in - JRA-31238Getting issue details... STATUS which has been verified to affect instances where the project level From address is configured to be different from the global SMTP From address in JIRA applications.
Cause
Your Exchange mail server is not configured to relay messages.
Resolution
Exchange 2003:
Open the Exchange System Manager
- Go in Administrative Groups -> Administrative group name -> Server -> Server name -> Protocols -> SMTP
- Right click on Default SMTP Virtual Server -> properties
- Access tab -> Relay button
- Select "only the list below" and add the domain and\or IPs of your server
Exchange 2007:
For Exchange 2007, create a second receive connector for external addresses as described in How to Set Up SMTP Relay in Exchange 2007.
Check Microsoft's Exchange Archive as well.
Office 365:
Take a look at Microsoft's documentation on how to set up permissions for relaying messages in Exchange.