How to Set Up SMTP Relay in Exchange 2007

There are a few known issues setting up a proper SMTP relay for our Exchange 2007 environment. The JIRA install was originally relaying off a different SMTP service before it was moved to Exchange 2007 server. This is occurring because SMTP Relaying not configured in Exchange 2007. The issue that has been encountered thus far are:

Depending on the configuration for the Receive Connector (i.e. SMTP relay) in Exchange 2007 will encounter one of the following problems:

  1. Emails would relay to outside domains but the user's name (that created or commented on the task) would be stripped off the From address in the email leaving only the "Jira-Replies" address.
  2. Email will not relay to outside domains but the user's name would stay intact in the From address of the email.

Neither solution is optimal. While it is possible to set up an anonymous SMTP relay in Exchange 2007, for it to work properly there is one step that needs to be completed outside of the MMC. That command is listed below after the step by step instructions below.

Step by step instructions for setting up an SMTP relay in Exchange 2007 for JIRA.
Open up the Exchange MMC and select Hub Transport under Server Configuration on the left side. Split into two horizontal windows, it makes it easier to see a list of configured servers with the Hub Transport role at the top, and Receive Connectors at the bottom. Select whichever Hub Transport server is needed want this relay for and select the "New Receive Connector" in the action area on the right of the MMC. This should open the "New SMTP Receive Connector" wizard.

Thanks to Michael Athey for writing, documenting and providing all content for this knowledge base article.

New SMTP Receive Connector wizard

Main windows

  1. Give the new relay a name (this example uses JiraTest as the name)
  2. Make sure the drop down selection is set to "Custom" for "Select the intended use for this Receive connector"
  3. Hit Next

Local Network settings window

  1. Select "Add", then choose "Specify an IP address"
  2. Enter the IP address of the Exchange Hub Transport server
  3. Keep the Port setting at 25
  4. Hit OK
  5. Delete the default "All available IPv4 addresses"
  6. Enter the FQDN for the Exchange Hub Transport server
  7. Hit Next

Remote Network settings window

  1. Select "Add"
  2. Enter the IP address of the JIRA server
  3. Hit OK
  4. Delete the default range
  5. Hit Next

New Connector window

  1. It should now be possible to see an overview of the connector being creating
  2. Hit New

Completion window

  1. Hopefully this shows the connector completed successfully
  2. Hit Finish

It should now be possible to should now see the connector listed on the bottom half of the screen with any others that may have created previously.
Double click the one that was just created to open its properties.

Verify the FQDN is correct in the General tab...

and that the IP addresses are also correct in the Network tab. 

The Authentication tab should only have Transport Layer Security (TLS) selected only.

  • Now go to the Permission Groups tab and select Anonymous Users, unselecting any other options, then hit OK.
  • Normally that should be it, but it's not. There is one more additional step that which needs to be done in PowerShell.
  • Open up the Exchange Management Shell and type the following, where "JiraTest" is the name of the connector that was just created.
Get-ReceiveConnector "JiraTest" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Recipient"

What this command does is grant the relay permission to the Anonymous group for that connector.  When simply selecting Anonymous Users through the GUI all that is assigned is the most common permissions, but it does not grant the relay permission. So now run the command through Management Shell.
After that is completed it is possible to start relaying JIRA's email through the Exchange 2007 setup.

Was this helpful?

Thanks for your feedback!

Why was this unhelpful?

Have a question about this article?

See questions about this article

Powered by Confluence and Scroll Viewport