Alt-Mailhost Query

Unanswered Question
Oct 20th, 2009

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.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.
kluu_ironport Tue, 10/20/2009 - 20:38

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 [email protected] is delivered to the mailhost at example.com with the Envelope To address [email protected]. 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.
mike.baxter_ironport Wed, 10/21/2009 - 09:07

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




Can this be overridden if to send to Server2 (192.168.0.2), for example, an envelope senders domain matches a specific string? E.g.

RedirectFilter:
If (envelope-sender==’(?i)@example.com$’)
{
Alt-mailhost('[192.168.0.2]');
}




If this doesn’t work then it seems a bit pointless having the alt-mailhost command, but I need to be certain – I can’t just test this since it would require a few firewall changes and at this company, that is a long winded paper trail and several days lead time.

Cheers

Mike.
mychrislo_ironport Wed, 10/21/2009 - 15:32

Then dont use smtproutes?

RedirectFilter:
If (envelope-sender==’(?i)@example.com$’)
{
Alt-mailhost('[192.168.0.2]');
} else
{
Alt-mailhost('[192.168.0.1]');
}

kluu_ironport Wed, 10/21/2009 - 15:52

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. [email protected]) and then verify that it routes to the IP address that you expect instead of the default one.

Actions

This Discussion