Installation on Exchange 2010 SP2 Edge Transport Server

Apr 14, 2012 at 9:10 PM

Hi,

Good job and I hope I can have this feature on asap.

I have tried to install the dll on my Hub Transport Server. However, I just can't get it work properly.
I tried to send test mails, it won't route as expected.
Maybe I should install this dll on my edge transport server. 
I did the exactly same procedures to install on my edge transport server but failed.
So I went to install it manually via register.exe on my edge server.

After I restart the transporter service on my edge server, it seemed crashing the server.
I got the following error messages:

Exchange can't connect to the Microsoft Exchange Transport service on compute "XXX.XXX.com". Verify that the service is started. It was running the command 'get-queue -ResultSize '1000' - ReturnPageInfo $true -SortOrder '+ NextHopDomain' -server 'XXX.XXX.com' -SearchForward $true -BookmarkObject $null -BookmarkIndex '-1' -includeBookmark $false'

I have checked the service and It's running. I have also checked my event logs and found the following error:

Log Name: Application
Source:   MSExchange Common
EventId: 4999
Level Error 

Watson report about to be sent for process id: 3664, with parameters: E12, c-RTL-AMD64, 14.02.0283.003, edgetransport, M.E.Data.Transport, M.E.D.T.R.RoutingAgentFactory.CreateAgent, S.Security.SecurityException, c11a, 14.02.0282.000.ErrorReportingEnabled: False

Any help would be deeply appreciated.

Sean.

Coordinator
Apr 14, 2012 at 9:27 PM

Sean,

The agent will work equally well on Hub or Edge role.  If your intention is to create the routing override Send Connectors on Hub, then I would install the DLL on the Hub.  If the Send Connectors should be on Edge, then installing the agent on Edge makes more sense, I believe.

As to why it didn't work, double check that you have:

  1. Successfully installed the agent and it is running after a service restart.  Get-TransportAgent is the cmdlet to use.
  2. Created a transport rule per the instructions.  Verify that you have spelled the header name correctly and specified a routing domain.
  3. Created a send connector with an address space that matches the routing domain you specified in #2.

After that, I recommend turning up event logging to 7 per the instructions.  Then you will be able to see if the agent is the issue or the rule or the connector.

As to the installation issue, it seems like it could be a permissions problem.  Verify that "Network Service" has Read/Execute permissions on the DLL and the registry at a minimum.

Hope this helps,

-Scott

Apr 15, 2012 at 9:06 AM
Edited Apr 15, 2012 at 9:12 AM

Hi Scott, 

Thanks for your promptly reply. SUPER!!

err.... sorry about this long post. I just want to be in detailed.

After modified the event logging to 7 and enabled the agent again. Below is the output of cmdlet Get-TransportAgent:

Identity                                           Enabled         Priority
--------                                           -------         --------
Connection Filtering Agent				True		1
Address Rewriting Inbound Agent				True		2
Edge Rule Agent						True		3
Content Filter Agent					False		4
Sender Id Agent						True		5
Sender Filter Agent					True		6
Recipient Filter Agent					True		7
Protocol Analysis Agent					True		8
Attachment Filtering Agent				True		9
Address Rewriting Outbound Agent			True		10
Routing Rule Agent					True		11

===========================================================

Restarting the Transport service and still got the error messages I mentioned above and found nothing related in Windows logs.

Finally, I changed the "Log on as" of transport service to "Local System account" (Will it lead to a security hole???) and seems the installation has been completed now.

I think I can do some more configurations.

The scenario is described as follow:

We have MTAs :
1) MSEX01
MS Exchange 2010 SP2 / Windows 2008 R2
Hub Transport Role / Mailbox database Role / Client Access OWA Role
2) MSEX02
MS Exchange 2010 SP2 / Windows 2008 R2
Edge Transport Role only
3) Smarthost01
Postfix 2.7.0 / ubuntu 10.04 x64
relay domain: domain1, domain2, domain3, domain4, domain5
domain has a MX record with reverse ip PTR record points to the ip with an A record = hostname = the servername in greeting.
4) Smarthost02
  Postfix 2.7.0 / ubuntu 10.04 x64
relay domain: domain2
domain has a MX record with reverse ip PTR record points to the ip with an A record = hostname = the servername in greeting.
5) Smarthost03
Postfix 2.7.0 / ubuntu 10.04 x64
relay domain: domain3
domain has a MX record with reverse ip PTR record points to the ip with an A record = hostname = the servername in greeting.
6) Smarthost04
Postfix 2.7.0 / ubuntu 10.04 x64
relay domain: domain4 
domain has a MX record with reverse ip PTR record points to the ip with an A record = hostname = the servername in greeting.
7) Smarthost05
Postfix 2.7.0 / ubuntu 10.04 x64
relay domain: domain5
 domain has a MX record with reverse ip PTR record points to the ip with an A record = hostname = the servername in greeting.

Domains:
1) domain1: default domain same with MS AD domain name
2) domain2: MS Exchange accepted domain
3) domain3: MS Exchange accepted domain
4) domain4: MS Exchange accepted domain
5) domain5: MS Exchange accepted domain 

Users:
1) userA:
AD domain user
email addresses: userA@domain1 ; userA@domain1 ; userA@domain2 ; userA@domain3 ; userA@domain4
2) userB:
AD domain user
email addresses: userB@domain1 ; userB@domain2 ; userB@domain5 

email1 header.from<userA@domain1> <--IMAP/SMTP--> MSEX01 <--> MSEX02 <--SMTP--> Smarthost01 <--SMTP--> Internet
email2 header.from<userA@domain2> <--IMAP/SMTP--> MSEX01 <--> MSEX02 <--SMTP--> Smarthost02 <--SMTP--> Internet
email3 header.from<userB@domain5> <--IMAP/SMTP--> MSEX01 <--> MSEX02 <--SMTP--> Smarthost05 <--SMTP--> Internet

Send Connectors associate MSEX02 (Edge Server):

Identity                       AddressSpaces
Enabled SmartHosts
--------                       -------------
------- ----------
EdgeSync - Default-First-Site-Name to Internet  {smtp:--;100} True 
{--}
EdgeSync - Inbound to Default-First-Site-Name {smtp:*;100}
True {[10.99.10.81]}
EdgeSync - domain1 to Internet  {SMTP:domain1;100}
True {[10.99.10.81]}
EdgeSync - domain2 to Internet  {SMTP:domain2;100}
True {[10.99.10.82]}
EdgeSync - domain3 to Internet  {SMTP:domain3;100}
True {[10.99.10.83]}
EdgeSync - domain4 to Internet  {SMTP:domain4;100}
True {[10.99.10.84]}
EdgeSync - domain5 to Internet  {SMTP:domain5;100}
True {[10.99.10.85]}

Dump of the transport rules MSEX02 (Edge Server). Properties with null values have been removed:

Priority                                     : 0
Comments                                     : using domain5 send connector to forwand those mail sent from %@domain5
ManuallyModified                             : False
Description                                  : If the message:
                                                   Includes these words in the sender's address: '@domain5'
                                               Take the following actions:
                                                   set message header 'X-MS-Exchange-Organization-RoutingRuleDomain' with the value 'domain5'
RuleVersion                                  : 14.0.0.0
Conditions                                   : {FromAddressContains}
Actions                                      : {SetHeader}
State                                        : Enabled
HasNoClassification                          : False
FromAddressContainsWords                     : {@domain5}
AttachmentIsUnsupported                      : False
ExceptIfHasNoClassification                  : False
ExceptIfAttachmentIsUnsupported              : False
SetHeaderName                                : X-MS-Exchange-Organization-RoutingRuleDomain
SetHeaderValue                               : domain5
ModerateMessageByManager                     : False
DeleteMessage                                : False
Disconnect                                   : False
Quarantine                                   : False
Identity                                     : domain5
DistinguishedName                            : CN=domain5,CN=Edge,CN=Rules,CN=Transport Settings,CN=First Organizati
                                               on,CN=Microsoft Exchange,CN=Services,CN=Configuration,CN={D2DC1E20-B599-
                                               4009-8518-1D9CA30ABDCC}
Guid                                         : 124a348a-727c-471f-b989-01b57c8ed240
Name                                         : domain5
IsValid                                      : True
WhenChanged                                  : 4/15/2012 3:13:52 PM
ExchangeVersion                              : 0.1 (8.0.535.0)

Priority                                     : 1
Comments                                     : using domain4 send connector to forwand those mail sent from %@domain4.
ManuallyModified                             : False
Description                                  : If the message:
                                                   Includes these words in the sender's address: '@domain4'
                                               Take the following actions:
                                                   set message header 'X-MS-Exchange-Organization-RoutingRuleDomain' with the value 'domain4'
RuleVersion                                  : 14.0.0.0
Conditions                                   : {FromAddressContains}
Actions                                      : {SetHeader}
State                                        : Enabled
HasNoClassification                          : False
FromAddressContainsWords                     : {@domain4}
AttachmentIsUnsupported                      : False
ExceptIfHasNoClassification                  : False
ExceptIfAttachmentIsUnsupported              : False
SetHeaderName                                : X-MS-Exchange-Organization-RoutingRuleDomain
SetHeaderValue                               : domain4
ModerateMessageByManager                     : False
DeleteMessage                                : False
Disconnect                                   : False
Quarantine                                   : False
Identity                                     : domain4
DistinguishedName                            : CN=domain4,CN=Edge,CN=Rules,CN=Transport Settings,CN=First Organizat
                                               ion,CN=Microsoft Exchange,CN=Services,CN=Configuration,CN={D2DC1E20-B599
                                               -4009-8518-1D9CA30ABDCC}
Guid                                         : ab0eff4b-194e-4f18-9e3f-fb8b15d2f0e4
Name                                         : domain4
IsValid                                      : True
WhenChanged                                  : 4/15/2012 3:14:03 PM
ExchangeVersion                              : 0.1 (8.0.535.0)

Priority                                     : 2
Comments                                     : using domain3 send connector to forwand those mail sent from %@domain3.
ManuallyModified                             : False
Description                                  : If the message:
                                                   Includes these words in the sender's address: '@domain3'
                                               Take the following actions:
                                                   set message header 'X-MS-Exchange-Organization-RoutingRuleDomain' with the value 'domain3'
RuleVersion                                  : 14.0.0.0
Conditions                                   : {FromAddressContains}
Actions                                      : {SetHeader}
State                                        : Enabled
HasNoClassification                          : False
FromAddressContainsWords                     : {@domain3}
AttachmentIsUnsupported                      : False
ExceptIfHasNoClassification                  : False
ExceptIfAttachmentIsUnsupported              : False
SetHeaderName                                : X-MS-Exchange-Organization-RoutingRuleDomain
SetHeaderValue                               : domain3
ModerateMessageByManager                     : False
DeleteMessage                                : False
Disconnect                                   : False
Quarantine                                   : False
Identity                                     : domain3
DistinguishedName                            : CN=domain3,CN=Edge,CN=Rules,CN=Transport Settings,CN=First Organizati
                                               on,CN=Microsoft Exchange,CN=Services,CN=Configuration,CN={D2DC1E20-B599-
                                               4009-8518-1D9CA30ABDCC}
Guid                                         : 11a8652c-a3d8-4d79-b9af-e1a487154c84
Name                                         : domain3
IsValid                                      : True
WhenChanged                                  : 4/15/2012 3:14:07 PM
ExchangeVersion                              : 0.1 (8.0.535.0)

Priority                                     : 3
Comments                                     : using domain2 send connector to forwand those mail sent from %@domain2.
ManuallyModified                             : False
Description                                  : If the message:
                                                   Includes these words in the sender's address: '@domain2'
                                               Take the following actions:
                                                   set message header 'X-MS-Exchange-Organization-RoutingRuleDomain' with the value 'domain2'
                                               
RuleVersion                                  : 14.0.0.0
Conditions                                   : {FromAddressContains}
Actions                                      : {SetHeader}
State                                        : Enabled
HasNoClassification                          : False
FromAddressContainsWords                     : {@domain2}
AttachmentIsUnsupported                      : False
ExceptIfHasNoClassification                  : False
ExceptIfAttachmentIsUnsupported              : False
SetHeaderName                                : X-MS-Exchange-Organization-RoutingRuleDomain
SetHeaderValue                               : domain2
ModerateMessageByManager                     : False
DeleteMessage                                : False
Disconnect                                   : False
Quarantine                                   : False
Identity                                     : domain2
DistinguishedName                            : CN=domain2,CN=Edge,CN=Rules,CN=Transport Settings,CN=First Organiz
                                               ation,CN=Microsoft Exchange,CN=Services,CN=Configuration,CN={D2DC1E20-B5
                                               99-4009-8518-1D9CA30ABDCC}
Guid                                         : ad54e0ff-4593-482f-9443-28a3e22c0ea0
Name                                         : domain2
IsValid                                      : True
WhenChanged                                  : 4/15/2012 3:11:42 PM
ExchangeVersion                              : 0.1 (8.0.535.0)

Priority                                     : 4
Comments                                     : using domain1 send connector to forwand those mail sent from %@domain1.
ManuallyModified                             : False
Description                                  : If the message:
                                                   Includes these words in the sender's address: '@domain1'
                                               Take the following actions:
                                                   set message header 'X-MS-Exchange-Organization-RoutingRuleDomain' with the value 'domain1'
RuleVersion                                  : 14.0.0.0
Conditions                                   : {FromAddressContains}
Actions                                      : {SetHeader}
State                                        : Enabled
HasNoClassification                          : False
FromAddressContainsWords                     : {@domain1}
AttachmentIsUnsupported                      : False
ExceptIfHasNoClassification                  : False
ExceptIfAttachmentIsUnsupported              : False
SetHeaderName                                : X-MS-Exchange-Organization-RoutingRuleDomain
SetHeaderValue                               : domain1
ModerateMessageByManager                     : False
DeleteMessage                                : False
Disconnect                                   : False
Quarantine                                   : False
Identity                                     : domain1
DistinguishedName                            : CN=domain1,CN=Edge,CN=Rules,CN=Transport Settings,CN=First
                                                Organization,CN=Microsoft Exchange,CN=Services,CN=Configuration,CN={D2D
                                               C1E20-B599-4009-8518-1D9CA30ABDCC}
Guid                                         : cd7465a0-bf32-4b39-ad73-59d9a23b97e1
OrganizationId                               : 
Name                                         : domain1
IsValid                                      : True
WhenChanged                                  : 4/15/2012 3:13:33 PM
ExchangeVersion                              : 0.1 (8.0.535.0)

 

====================================================================================================

I thought I have completed the configuration and try to send a mail via my second domain i.e. from<userA@domain2>. However I still found the mail was sent from smarthost01 instead of smarthost02 in the mail headers.

I have checked several times and couldn't found anything suspicious.

Any help would be deeply appreciated.

Sean. 

Apr 16, 2012 at 7:12 AM

Hi Scott,

After some more try and error tests, I finally move all my transport rules to my Hub server and everything seems to be great in sending out the mails.
The mails have been routed and using specified send connectors as expected. And I got SPF and extra DKIM pass both. What else can I ask for? I am so happy.

However, I got another problem with inbound messages. I can't get rid of "a local loop was detected" error.

I think I encountered the same problem with the following guys.

http://social.technet.microsoft.com/Forums/da-DK/exchangesvradmin/thread/2fadd357-e2ee-4b7e-bdd9-7e01021997f0

(I bypass edge server and route incoming messages to Hub server directly from smarthosts. I know its no good and is a temporary solution.)

How to resolve it? Any idea or suggestion would be appreciated.

Sean