• RSS
  • Twitter
  • FaceBook

Exchange Server Forums

Forums | Register | Login | My Profile | Inbox | RSS RSS icon | My Subscription | My Forums | Address Book | Member List | Search | FAQ | Ticket List | Log Out

Enable Relay for Internal IPs

Users viewing this topic: none

Logged in as: Guest
  Printable Version
All Forums >> [Microsoft Exchange 2007] >> Message Routing >> Enable Relay for Internal IPs Page: [1]
Login
Message << Older Topic   Newer Topic >>
Enable Relay for Internal IPs - 29.Jan.2008 9:33:09 AM   
sfarmer

 

Posts: 61
Joined: 6.Nov.2006
Status: offline
I am in the process of upgrading to 2007 and I am still at the low side of the learning curve.  We have some custom applications that need to send email to our members and on 2003 I just allowed those IPs to send through the SMTP Virtual Server.  Yesterday I found out that Exchange 2007 broke these apps so I assumed I needed to do something similar on Exh 2007.

I did as this artlicle suggested (which solved the Relay "sending" problem) but that then stopped ALL incoming email.

http://msexchangeteam.com/archive/2006/12/28/432013.aspx

Any suggestions on how to configure the receive connectors to accept a relay from specific servers/PC's on my network and at the same time NOT disable incoming mail?

Right now I have 2 receive connectors created automatically by the Exch 2007 install. They are Client & Default both allowing "receive mail" from 0.0.0.0 - 255.255.255.255.

I added a 3rd connector yesterday allowing "receive mail" from the internal IPs that host our app servers.  It was the addition of this 3rd connector that stopped mail from coming in (although it allowed the Relay out).

Tips/Suggestions?

Thanks

Post #: 1
RE: Enable Relay for Internal IPs - 29.Jan.2008 11:03:44 AM   
sfarmer

 

Posts: 61
Joined: 6.Nov.2006
Status: offline
Does this make sense to anyone?  I really need to get this working.

(in reply to sfarmer)
Post #: 2
RE: Enable Relay for Internal IPs - 29.Jan.2008 11:10:47 AM   
sfarmer

 

Posts: 61
Joined: 6.Nov.2006
Status: offline
I found this in the help file...

"When more than one connector is available on a destination computer, Exchange Server 2007 evaluates the connectors and chooses the most restrictive connector."

How can I get around this?  When adding the new connector to allow Relay from my Internal servers it in affect ONLY allows mail from these servers...not good.

(in reply to sfarmer)
Post #: 3
RE: Enable Relay for Internal IPs - 29.Jan.2008 11:43:52 AM   
sfarmer

 

Posts: 61
Joined: 6.Nov.2006
Status: offline
Has anyone seen this article?

http://support.microsoft.com/kb/944302/en-us

(in reply to sfarmer)
Post #: 4
RE: Enable Relay for Internal IPs - 29.Jan.2008 12:21:11 PM   
John Weber

 

Posts: 1236
Joined: 20.Apr.2005
From: Portland, Oregon
Status: offline
OK, here is what you do.

1.  The default receive connector needs to be open for anonymous, but no relay for 0.0.0.0

2.  Create a second ( or as many as you need ) receive connector for your services.  This connector needs to be created by following one of the methods outlined below.  Pay particular attention to the ordering of the permissions.  Do it wrong and you will start over.
Also, this connector get's only specific internal addresses or address ranges.

What Exchange will do is evaluate the incoming port 25 request.  When it finds this second connector that explicitly lists the source address (as opposed to 0.0.0.0) it will use this connector and its settings.

Set the default to be your internet, and double-check the settings on that one.
I prefer to disable the default receive, and set it to port 26 (gets it out of the way) but do NOT remove it - you will screw up your SPN's if you do that. 
Just create a new receive connector as an "internet" which will set the perms on it for you.

Clear as mud?

From time to time, you need to allow an application server to relay off of your Exchange server.  You might need to do this if you have a SharePoint, a CRM application like Dynamics, or a web site that sends emails to your employees or customers.
You might need to do this if you are getting the SMTP error message “550 5.7.1 Unable to relay
The top rule is that you want to keep relay restricted as tightly as possible, even on servers that are not connected to the Internet.  Usually this is done with authentication and/or restricting by IP address.  Exchange 2003 provides the following relay restrictions on the SMTP VS:

Here are the equivalent options for how to configure this in Exchange 2007.
Allow all computers which successfully authenticate to relay, regardless of the list above
Like its predecessor, Exchange 2007 is configured to accept and relay email from hosts that authenticate by default.  Both the “Default” and “Client” receive connectors are configured this way out of the box.  Authenticating is the simplest method to submit messages, and preferred in many cases.
The Permissions Group that allows authenticated users to submit and relay is the “ExchangeUsers” group.  The permissions that are granted with this permissions group are:
NT AUTHORITY\Authenticated Users        {ms-Exch-SMTP-Submit}
NT AUTHORITY\Authenticated Users        {ms-Exch-Accept-Headers-Routing}
NT AUTHORITY\Authenticated Users        {ms-Exch-Bypass-Anti-Spam}
NT AUTHORITY\Authenticated Users        {ms-Exch-SMTP-Accept-Any-Recipient}
The specific ACL that controls relay is the ms-Exch-SMTP-Accept-Any-Recipient.
Only the list below (specify IP address)
This option is for those who cannot authenticate with Exchange.  The most common example of this is an application server that needs to be able to relay messages through Exchange.
First, start with a new custom receive connector.  You can think of receive connectors as protocol listeners.  The closest equivalent to Exchange 2003 is an SMTP Virtual Server.  You must create a new one because you will want to scope the remote IP Address(es) that you will allow.

The next screen you must pay particular attention to is the “Remote Network settings”.  This is where you will specify the IP ranges of servers that will be allowed to submit mail.  You definitely want to restrict this range down as much as you can.  In this case, I want my two web servers, 192.168.2.55 & 192.168.2.56 to be allowed to relay.

The next step is to create the connector, and open the properties.  Now you have two options, which I will present.  The first option will probably be the most common.
Option 1: Make your new scoped connector an Externally Secured connector
This option is the most common option, and preferred in most situations where the application that is submitting will be submitting email to your internal users as well as relaying to the outside world.
Before you can perform this step, it is required that you enable the Exchange Servers permission group. Once in the properties, go to the Permissions Groups tab and select Exchange servers.


Next, continue to the authentication mechanisms page and add the “Externally secured” mechanism.  What this means is that you have complete trust that the previously designated IP addresses will be trusted by your organization. 

Caveat: If you do not perform these two steps in order, the GUI blocks you from continuing.
Do not use this setting lightly.  You will be granting several rights including the ability to send on behalf of users in your organization, the ability to ResolveP2 (that is, make it so that the messages appear to be sent from within the organization rather than anonymously), bypass anti-spam, and bypass size limits.  The default “Externally Secured” permissions are as follows:
MS Exchange\Externally Secured Servers  {ms-Exch-SMTP-Accept-Authoritative-Domain}
MS Exchange\Externally Secured Servers  {ms-Exch-Bypass-Anti-Spam}
MS Exchange\Externally Secured Servers  {ms-Exch-Bypass-Message-Size-Limit}
MS Exchange\Externally Secured Servers  {ms-Exch-SMTP-Accept-Exch50}
MS Exchange\Externally Secured Servers  {ms-Exch-Accept-Headers-Routing}
MS Exchange\Externally Secured Servers  {ms-Exch-SMTP-Submit}
MS Exchange\Externally Secured Servers  {ms-Exch-SMTP-Accept-Any-Recipient}
MS Exchange\Externally Secured Servers  {ms-Exch-SMTP-Accept-Authentication-Flag}
MS Exchange\Externally Secured Servers  {ms-Exch-SMTP-Accept-Any-Sender}
Basically you are telling Exchange to ignore internal security checks because you trust these servers.  The nice thing about this option is that it is simple and grants the common rights that most people probably want.
Option 2: Grant the relay permission to Anonymous on your new scoped connector
This option grants the minimum amount of required privileges to the submitting application.
Taking the new scoped connector that you created, you have another option.  You can simply grant the ms-Exch-SMTP-Accept-Any-Recipient permission to the anonymous account.  Do this by first adding the Anonymous Permissions Group to the connector.

This grants the most common permissions to the anonymous account, but it does not grant the relay permission.  This step must be done through the Exchange shell:
Get-ReceiveConnector "CRM Application" | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Recipient"
In addition to being more difficult to complete, this step does not allow the anonymous account to bypass anti-spam, or ResolveP2.
Although it is completely different from the Exchange 2003 way of doing things, hopefully you find the new SMTP permissions model to be sensible.
More information
See the following for more information:
·         Receive Connectors
·         Exchange 2007 Transport Permissions Model

(in reply to sfarmer)
Post #: 5
RE: Enable Relay for Internal IPs - 29.Jan.2008 12:32:56 PM   
sfarmer

 

Posts: 61
Joined: 6.Nov.2006
Status: offline
Thanks for responding....

When you say 'Do this wrong and you will start over" do you mean recreating the new connector or I'll have to reinstall Exhange?  Not sure what you mean by "Set the default to be your internet, and double-check the settings on that one."  How do I set it to be "Default"? 

Also, have you seen this article?

http://blogs.techrepublic.com.com/networking/?p=373

(in reply to John Weber)
Post #: 6
RE: Enable Relay for Internal IPs - 29.Jan.2008 4:15:40 PM   
sfarmer

 

Posts: 61
Joined: 6.Nov.2006
Status: offline
Thanks

Your suggestions have worked.  I wanted to wait an hour or so after I made the changes just to verify that things are working the way I want...and they are.

I'm not sure what mistake i made the last time I did it however the 2nd time was the charm.

(in reply to John Weber)
Post #: 7

Page:   [1] << Older Topic    Newer Topic >>
All Forums >> [Microsoft Exchange 2007] >> Message Routing >> Enable Relay for Internal IPs Page: [1]
Jump to:

New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts


Follow TechGenix on Twitter