10-20-2009 10:10 AM
Hi, I need to re-route inbound messages from a certain domain to an alternative internal IP address. Looks easy enough to do with the alt-mailhost action, but there’s a line in the IronPort help file that confuses the issue slightly:
“Note that any additional routing information specified by the smtproutes command still affects the routing of the message”
I have 2 static inbound SMTP routes defined for our domain – what I need to do is override this for one specific sender domain. Will alt-mailhost do this or will it be overridden by the SMTP routing table?
Any advice appreciated.
10-20-2009 08:38 PM
The "smtproutes" will get the last say in routing.
With alt-maillhost(), you may want to try and send it directly to the internal IP address.
From our Advance User Guide:
Alter Delivery Host Action
The alt-mailhost action changes the IP address for all recipients of the selected message to the numeric IP address or hostname given. The following example filter redirects recipient addresses to the host example.com for all messages.
localRedirectFilter:
if(true)
{
alt-mailhost('example.com');
}
Thus, a message directed to joe@anywhere.com is delivered to the mailhost at example.com with the Envelope To address joe@anywhere.com. Note that any additional routing information specified by the smtproutes command still affects the routing of the message. (See “Routing Email for Local Domains” on page 38.)
local2Filter:
if(true)
{
alt-mailhost('192.168.12.5');
}
Hi, I need to re-route inbound messages from a certain domain to an alternative internal IP address. Looks easy enough to do with the alt-mailhost action, but there’s a line in the IronPort help file that confuses the issue slightly:
“Note that any additional routing information specified by the smtproutes command still affects the routing of the message”
I have 2 static inbound SMTP routes defined for our domain – what I need to do is override this for one specific sender domain. Will alt-mailhost do this or will it be overridden by the SMTP routing table?
Any advice appreciated.
10-21-2009 09:07 AM
Thanks for the reply Kevin.
That’s the section of the guide that alerted me to the potential problem.
Scenario:
If I have a SMTP route on Ironport that delivers all inbound mail for mydomain.com to an Exchange bridghead Server1 (192.168.0.1):
mydomain.com 192.168.0.1
RedirectFilter:
If (envelope-sender==’(?i)@example.com$’)
{
Alt-mailhost('[192.168.0.2]');
}
10-21-2009 03:32 PM
Then dont use smtproutes?
RedirectFilter:
If (envelope-sender==’(?i)@example.com$’)
{
Alt-mailhost('[192.168.0.2]');
} else
{
Alt-mailhost('[192.168.0.1]');
}
10-21-2009 03:52 PM
Your snippet,
RedirectFilter:
If (envelope-sender==’(?i)@example.com$’)
{
Alt-mailhost('[192.168.0.2]');
}
will override the smtproute and be the destination that this message goes to, 192.168.0.2.
And if you want, you should just create this rule and set it up to look for your own external test email address (e.g. testuser@gmail.com) and then verify that it routes to the IP address that you expect instead of the default one.
10-22-2009 12:51 PM
Thanks Kevin, it's all working as expected now.
Cheers!
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide