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

Authenticated relaying not working when "Allow upstream/relay hosts only" enabled

Hi,

I receive all inbound mail from the DynDNS MailHop forwarding service.  I was thinking I could prevent other upstream hosts from forwarding email to my ASG (v8.000) by checking the "Allow upstream/relay hosts only" box and that, if I did so, authenticated SMTP clients would still be able to relay too.  However, in practice my authenticated SMTP clients stop being able to send mail through the ASG proxy as soon as I restrict inbound email to my DynDNS host list.  I'm trying to figure out why this is.  The online help suggests that authenticated relays should still work:-

Upstream Host List 
An upstream host is a host that forwards e-mail to you, e.g., your ISPInternet Service Provider or external MX. If you get inbound e-mail from static upstream hosts, it is necessary that you enter the hosts here. Otherwise spam protection will not work properly.

To add an upstream host either click the plus icon or the folder icon for drag-and-drop from the Networks group tooltip. If you would like to only allow upstream hosts select the checkbox Allow Upstr[/LIST]eam/Relay Hosts Only. SMTP access will then be limited to the defined upstream hosts (and authenticated relays, see below). Click Apply to save your settings.


I'm assuming I've either not set up my SMTP clients correctly, or there's some interplay between these two settings that I don't understand.

Some more detail on my setup:-


  • DNAT/SNAT rules redirect inbound port 2525 traffic to port 25, so the SMTP proxy picks it up.
  • ASG SMTP proxy routes inbound email to an internal Exchange 2007 server.
  • Exchange 2007 is configured to use the ASG proxy as a smarthost when sending outbound email from hosts on my internal network.
  • For external SMTP clients, they authenticate to the ASG SMTP proxy directly when sending outbound mail.  I'm not 100% sure whether this still forwards the mail on to my internal Exchange server only to have it recognize it as outbound mail and send it back out via the ASG "smarthost" send connector, or if authenticating with the ASG SMTP proxy for outbound mail avoids Exchange altogether - an easy enough thing for me to test of course.  I'm wondering if this setup is part of my problem, and perhaps I'm just not understanding the best way to handle outbound SMTP mail for external hosts when both the ASG proxy and an internal Exchange 2007 server are in play.


I've hunted through the Astaro support site and the user forums but am still scratching my head.  Any help much appreciated.

Thanks,
Martin.


This thread was automatically locked due to age.
Parents
  • Martin, if you have an internal mailserver, why would you allow individual PCs to relay SMTP traffic off the Astaro?
    For external SMTP clients, they authenticate to the ASG SMTP proxy directly when sending outbound mail. I'm not 100% sure whether this still forwards the mail on to my internal Exchange server only to have it recognize it as outbound mail and send it back out via the ASG "smarthost" send connector, or if authenticating with the ASG SMTP proxy for outbound mail avoids Exchange altogether - an easy enough thing for me to test of course. I'm wondering if this setup is part of my problem, and perhaps I'm just not understanding the best way to handle outbound SMTP mail for external hosts when both the ASG proxy and an internal Exchange 2007 server are in play.

    Yes, this would appear to be a problem!  You do mean "external users" instead of "external host" - right?  It seems like you need to get the external clients connected to Exchange using RPC over HTTPS - is that possible?

    Cheers - Bob
    PS By the way, that's a perfect example of a clearly-asked and adequately-explained question.  Hopefully others will see that!
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Reply
  • Martin, if you have an internal mailserver, why would you allow individual PCs to relay SMTP traffic off the Astaro?
    For external SMTP clients, they authenticate to the ASG SMTP proxy directly when sending outbound mail. I'm not 100% sure whether this still forwards the mail on to my internal Exchange server only to have it recognize it as outbound mail and send it back out via the ASG "smarthost" send connector, or if authenticating with the ASG SMTP proxy for outbound mail avoids Exchange altogether - an easy enough thing for me to test of course. I'm wondering if this setup is part of my problem, and perhaps I'm just not understanding the best way to handle outbound SMTP mail for external hosts when both the ASG proxy and an internal Exchange 2007 server are in play.

    Yes, this would appear to be a problem!  You do mean "external users" instead of "external host" - right?  It seems like you need to get the external clients connected to Exchange using RPC over HTTPS - is that possible?

    Cheers - Bob
    PS By the way, that's a perfect example of a clearly-asked and adequately-explained question.  Hopefully others will see that!
     
    Sophos UTM Community Moderator
    Sophos Certified Architect - UTM
    Sophos Certified Engineer - XG
    Gold Solution Partner since 2005
    MediaSoft, Inc. USA
Children
  • Thanks Bob.  Hopefully this answers those questions, although I'm sure it may raise more - let me know.


    • As an example of my specific setup, I have an iPad that connects to my work Exchange account via ActiveSync/HTTPS.  Due to the iPad not being on iOS 4.x yet, I can only set up a single Exchange account.  In order to access my internal (home) Exchange 2007 server from the iPad, I am therefore having to use IMAP and SMTP.  The IMAP piece works fine and is clear to me; whether I'm internal or external to my home network, the iPad hits the ASG external interface which then DNATs that traffic to IMAP on my internal Exchange server.  The piece I'm struggling with is how best to set up the SMTP part of the equation.
    • All inbound mail to my server comes in through the ASG proxy, and that works very well.
    • My Exchange server is configured to use the ASG proxy as a smart host for outbound mail - I've got a send connector set up which the Exchange server uses to send mail via the ASG.  This obviously gives me the benefit of anti-virus checking for outbound mail.
    • My ASG proxy is also set up to send outbound mail via a smart host, in this case the DynDNS MailHop Outbound service.  This gets around my ISP restriction of outbound port 25 traffic, and also gives me an originating IP for outbound mail that is not likely to be rejected by other mail servers due to being on an IP block known to be assigned for residential users. 
    • When I want to send email from the iPad, it's connecting to the same interface and port (External interface, port 2525) whether internal or external to my network.  My thought was that this was the right thing to do; all mail goes through the proxy whether inbound or outbound.


    Maybe what I should be doing instead is opening up a port to connect directly to the Exchange SMTP server for outbound SMTP purposes such as that needed by my iPad.  In this case, the iPad would connect through the ASG via DNAT to the SMTP service on the Exchange server without going through the ASG SMTP proxy.  Then, the Exchange server would recognize the mail as outbound and send it out the door via the ASG proxy, which in turn would relay to DynDNS MailHop Outbound.  I guess this would still mean all outbound mail would go through the ASG proxy - maybe an flaw in my current approach is that any outbound mail actually never goes through Exchange at all; the ASG proxy may send it straight out to MailHop since it recognizes it as outbound mail.  This in turn would mean my Exchange server would never see that mail, so it would never show up in a user's Sent Items in their mailbox.  What I've been nervous about, however, is having the Exchange SMTP service directly accessible on the Internet for sending outbound mail.  I guess I could always configure my iPad so that it sends outbound mail directly to MailHop, but then I'd lose the centralized management of that service (i.e. if I changed my MailHop settings, I'd then have to update all the SMTP clients that use it rather than just updating the ASG).

    One other SMTP client I have is for a remote user on Outlook 2007.  Despite multiple attempts I've never been able to get that client (or any Outlook client) to connect to my Exchange 2007 server over RPC/HTTPS.  iPhones are what I'm generally using to connect to this server, and setting up ActiveSync is a snap with them - it's a shame Outlook isn't as easy.  If I were able to get Outlook to connect to my Exchange server via RPC/HTTPS, I'd be able to shut down all IMAP and outbound SMTP clients once Apple releases iOS 4.x for the iPad, and I can connect to both my work and home Exchange accounts from that device.

    Hope this fills in a few blanks - thanks again.

    Martin.