Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alt-Mailhost Query

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.

5 REPLIES
New Member

Re: Alt-Mailhost Query

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.

Re: Alt-Mailhost Query

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.

Re: Alt-Mailhost Query

Then dont use smtproutes?

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

New Member

Re: Alt-Mailhost Query

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.

Re: Alt-Mailhost Query

Thanks Kevin, it's all working as expected now.

Cheers!

284
Views
0
Helpful
5
Replies