This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Infinite mail loop issue

Good Morning & thanks for taking a minute of your day to help me.

I'm (we) are currently setting up a new ASG at work. We host our own exchange mail server on our protected network and have SMARTHOST on our DMZ.

Incoming mail flow is working correctly. 
Outgoing mail flow from the exchange server to the SMARTHOST is working.

However

Mail from the SMARTHOST seems to be getting sent back to itself once it flows out causing an infinite loop.

Example Flow:

[MAIL Server] --> [ASG] --> [SMARTHOST] --> [ASG] --> [SMARTHOST] --infinite loop-->

I'm thinking this is due to the smarthost switch (configuration) inside the SMTP / Advanced tab. 

Thoughts? Ideas? Opinions? Or detailed plans on building large trebuchet capable of sending 2x3 orange and grey box in to space... =P

As always thanks in advance for your help / time...

-Jayson


This thread was automatically locked due to age.
  • I haven't seen that before... have you tried contacting Astaro Support (sounds like you have a commercial license)?  Only thing I can think of is the Smarthost is misconfigured.

    CTO, Convergent Information Security Solutions, LLC

    https://www.convergesecurity.com

    Advice given as posted on this forum does not construe a support relationship or other relationship with Convergent Information Security Solutions, LLC or its subsidiaries.  Use the advice given at your own risk.

  • I haven't seen that before... have you tried contacting Astaro Support (sounds like you have a commercial license)?  Only thing I can think of is the Smarthost is misconfigured.


    We called and made an appointment this morning, support is supposed to be calling us back soon. I was just hoping to get some more insight before that time.

    As for the configuration of the smarthost. Do you mean the physical smarthost or the smarthost settings in the ASG? I believe BOTH are correct but I've never setup an ASG in this fashion before. We have another ASG that we were using in bridge mode with the same smarthost settings and it worked flawlessly. In that configuration we had a CISCO PIX as our firewall and used the ASG for mail / web filtering.

    The traffic flow looked like this:

    [EXCHANGE] --> [ASG] --> [PIX] --> [SMARTHOST] --> [PIX] --> [INTERNET]

    I was thinking that the SMARTHOST settings within the ASG might be the problem because of how the discription reads. It says that if the smarthost settings are used then NO smtp (port 25) traffic will be "sent" from the ASG itself. It will instead send all that traffic BACK at the smarthost. Which to me seems to mean that if the ASG sends the traffic to the smarthost and the smarthost sends traffic back to the ASG thinking its going to be NAT'd out to the world, but maybe the ASG is saying wait this is port 25 taffic sent it to the smarthost on record (even though the traffic is coming from the smarthost to being with)

    To be honest I have no idea if thats what is happening at all. It just appears thats the case.

    Is there a way to force the traffic from my mail server to go to the smarthost on my dmz WITHOUT using the smarthost feature within the SMTP advanced tab?

    -Jayson
  • Hi Jayson,

    My understanding is the smarthost is only used for outgoing email so turning it off shouldn't affect any incoming routing. You'd have set your internal smarthost in the routing tab already.

    Disabling the smarthost feature should just cause the ASG itself to handle the outgoing SMTP. Try disabling it and see what happens. Worst case I could see is some spam filters on the other side reject the email if your IP has been flagged.
  • Hi Jayson,

    My understanding is the smarthost is only used for outgoing email so turning it off shouldn't affect any incoming routing. You'd have set your internal smarthost in the routing tab already.

    Disabling the smarthost feature should just cause the ASG itself to handle the outgoing SMTP. Try disabling it and see what happens. Worst case I could see is some spam filters on the other side reject the email if your IP has been flagged.


    Our smarthost has to be our last smtp hop. It does encryption and compliance regulation. Mail must go from the server to the smarthost and from there out to the rest of the world.
  • This is resolved.

    I found that if I put the SMARTHOST (Host) in the transparent skip list the loop goes away and mail starts flowing.

    Thanks for the help.
  • I still suspect a misconfiguration.  You should not need to have the SMTP Proxy in transparent mode if you have an Exchange server.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • I still suspect a misconfiguration.  You should not need to have the SMTP Proxy in transparent mode if you have an Exchange server.

    Cheers - Bob


    The exchange server has always worked fine. The problem was the upstream SMARTHOST. The SMARTHOST is supposed to be OUTSIDE of the ASG, but ours is INSIDE. The problem was this; the ASG was set to send ALL port 25 traffic to our SMARTHOST no matter where it came from. The SMARTHOST box was sending the mail back to the ASG so it could go out to the web, BUT the ASG was saying WAIT A MINUTE, THIS IS PORT 25 TRAFFIC! Send it to the SMARTHOST even though that traffic just came from the SMARTHOST. To over come this we simply added the SMARTHOST to the TRANSPARENT SKIP LIST so any traffic coming FROM the SMARTHOST was ignored by the proxy.

    Now that we have it figured out it makes 100% complete sense, but before that we were completely lost lol... I'm considering this issue resolved at the moment.

    As always thanks for the help.
  • Jayson, I'm still a bit confused.  This is how I understand the Astaro:

    Your solution is the right one if you need transparent mode, but what I was trying to say is that I don't understand why you would need transparent mode, so you wouldn't need to use the skiplist.

    Since your Exchange server is the only thing that should be initiating sends, it should be in 'Allowed hosts/networks' on the 'Relaying' tab by itself.  The in-house smarthost should reach the internet via a packet filter (firewall) rule, not via the SMTP Proxy.

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
  • Jayson, I'm still a bit confused.  This is how I understand the Astaro:

    Your solution is the right one if you need transparent mode, but what I was trying to say is that I don't understand why you would need transparent mode, so you wouldn't need to use the skiplist.

    Since your Exchange server is the only thing that should be initiating sends, it should be in 'Allowed hosts/networks' on the 'Relaying' tab by itself.  The in-house smarthost should reach the internet via a packet filter (firewall) rule, not via the SMTP Proxy.

    Cheers - Bob


    Well, its only mostly true that our exchange server is the only server sending smtp traffic. We have a large number of servers and many of those are sending out information via smtp (emails). With that all of those servers are listed in the allowed relay section. 

    The ONLY server that should be sending email OUTSIDE of our network is our SMARTHOST. Our setup is exactly what you outlined above, however without adding the smarthost to the skip list we get the loop. I'm guessing we are doing it correctly (but I don't know for sure) due to the fact that the ASG help doc says that all port 25 traffic without exception will be forwarded to the smarthost if the smarthost feature is used. To me that statement alone makes all of this now make sense.
  • Understood, but with all of the mail servers in the 'Allowed hosts/networks', you don't need the transparent mode, so it should be easy for you to achieve:

    {mail servers} -> SMTP -> [Astaro SMTP Proxy] -> SmartHost -> SMTP -> [outside servers via firewall rule]



    To put a host in the transparent mode skiplist is the same as excluding it from the proxy and adding a firewall rule like '{host} -> SMTP -> Any : Allow'. If transparent mode is not active and the host is not in the 'Allowed' list, then this is the same as simply creating the packet filter rule manually.

    I try to avoid having transparent mode enabled because it means that any PC that becomes infected can begin broadcasting emails through the Astaro.

    At least, that's how I understand it...

    Cheers - Bob
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA