« Previous Next »

Thread: SMTP Server - How can I set the outbound IP?

Last post 11-07-2006 3:43 AM by qbernard. 12 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (13 items)

Sort Posts:

  • 10-30-2006, 10:20 AM

    SMTP Server - How can I set the outbound IP?

    Hello,

    I have a two part question that seems like it should be common enough, but I'm having difficulty finding a clear answer (though Google, these Forums, and our hosting partners technical support).

    I need to know how I can control the outbound IP address the IIS SMTP service uses when sending mail.

    (This is to facilitate setting up reverse name lookups, and thus to prevent email bounces.)

    Some background to (hopefully) clarify what I want to do:

    • We are using Windows Server 2003 + IIS 6.0
    • We host web applications (primarily classic ASP) for clients through a dedicated server with a hosting partner.
    • Those applications can send out email (either outbound mailing lists or incoming feedback for clients) using CDO.
    • Our hosting partner doesn't want us to offer services on our primary IP. We have several virtual IPs which are externally accessible for services which we would like to bind the SMTP service(s) to (then setup reverse DNS entries to prevent some unnecessary bounces).
    • Even binding the default SMTP service to one of the virtual IPs, then restarting the SMTP service, and testing releases the primary (disallowed) IP.  [This is the recommended approach given by our hosting partner.]
    • We don't host mail services, only web services for our clients, though we often host their primary web presence (and their www domain).

    Furthermore, it's not that we can't send email (we've currently got "All Unassigned" set up, and relaying established for the virtual IPs); however, some of our clients are now experiencing bounces on mailing lists (AOL, greylisting, etc.) and on some incoming form feedback tendered by email.

    I seem to recall reading someplace that metabase editing may be required to prevent IIS from listening on all IPs, which may generate the desired behaviour.  Is this on the right track?

    Does anybody have any words of wisdom, or pointers to documentation?

    Best regards,

    Matthew

     

     

    Matthew
  • 10-30-2006, 5:17 PM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    I hate to reply to my own post; however, to provide some further detail:

    • Setting up CDO to point to a specific virtual smtp server (virtual IP) requires some configuration to permit email to go out - implying I'm hitting that IP (logs confirm the activity)

    However, the same behaviour occurs... (The IP coming in the email header, the only way I can see to diagnose the IP being released, is the main/primary IP.)

    I suppose it would help if I knew how the virtual IPs were being handled, but how are other people handling separate SMTP services on machines with more than one IP?

    Attached is a snippet from a message header illustrating the problem.

    NOTES:

    • I've tried to  set <servername> appropriately, but it seems to stick with the machine name
    • 123.345.567.789 (munged) is the wrong IP, but is the primary IP of the machine

    Sample Header Snippet ---

    Received: from mxin1.mailhop.org ([63.208.196.175])
        by mxout4.mailhop.org with esmtp (Exim 4.51)
        id 1GeYIJ-000Czd-I5
        for mhickson@xyz.com; Mon, 30 Oct 2006 09:40:03 -0500
    Received: from [123.345.567.789] (helo=<servername>)
        by mxin1.mailhop.org with esmtp (Exim 4.51)
        id 1GeYIJ-000IcN-H0
        for mhickson@xyz.com; Mon, 30 Oct 2006 09:39:19 -0500
    Received: from mail pickup service by <servername> with Microsoft SMTPSVC;
         Mon, 30 Oct 2006 09:39:07 -0500
    Thread-Topic: Test Message
    thread-index: Acb8MSeKbZKgh+M2REGhc8yaKuz+yw==
    From: <mhickson@xyz.com>
    To: <mhickson@xyz.com>
    Subject: Test Message
    Date: Mon, 30 Oct 2006 09:39:07 -0500
    Message-ID: <000001c6fc31$279d5fe0$9dc2a8c0@<servername>>


    As before, any help would be greatly appreciated.

    Thanks.
     

    Matthew
  • 10-31-2006, 1:41 AM In reply to

    • Bernard
    • Top 25 Contributor
    • Joined on 05-24-2006, 4:30 AM
    • Malaysia
    • Posts 291

    Re: SMTP Server - How can I set the outbound IP?

    Errr. I can't recall exactly. but it was something related to network NIC binding order if you have multiple nic, and you can change the order at my network places applet

     

    Cheers,
    Bernard Cheah
  • 10-31-2006, 3:55 PM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    Hello Bernard,

    Many thanks for taking the time to reply.

    I'm looking at the NIC binding order now... It's not exactly clear what can be done, and since we're on a dedicated server and working remotely, any hiccups would result in a call to tech support I'd rather not have to make.

    It does give me something to go on, and I'll certainly be following up.

    Hopefully I'll have something definitive to report back before long.
     

    Matthew
  • 10-31-2006, 10:46 PM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    How many network cards you have in the box? more than 1?
    I can't find the old thread as well :(  so let us know if you find out anything interesting.
    Cheers,
    Bernard Cheah
  • 11-01-2006, 2:49 PM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    Hello,

    Just a quick update...

    There are two network connections, one is internal (at the hosting site) -- the other is to the outside.

    (Based on what I read about the hardware, it's actually a dual port gigabit ethernet controller...)

    All the virtual IPs show up under the primary network interface.  Seems like binding order is not in play.

    The good news is, I had the IP address change by using the CDO configuration object to point to an alternate virtual SMTP server (pretty stock, but bound to a specific IP, and set to relay itself).

    Unfortunately, in testing the theory that not setting the server would result in the original IP being disclosed again, I'm back at square one.

    I've re-enabled the code to set the server, restarted the virtual SMTP server, the website, and the SMTP service without impact.  I'd try a full IIS reset; however, I've got to wait for a better time to do that.

    I wish I could pinpoint the trigger for the code rolling over, but so far, no luck.

    (Reviewing the event logs doesn't show anything interesting.) 

    The good news is, it can be done (which is the goal).

    I'll work to post a solution once I've got a firmer grasp of what's happening.

    (In the course of the day-to-day, this particular issue is a now and again effort...)

     

    Matthew
  • 11-01-2006, 9:33 PM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    So you are sure that the binding NIC is at the top of the list in the 'network connections' - advanced settings - Adapters and Bindings ?
    Cheers,
    Bernard Cheah
  • 11-02-2006, 2:39 PM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    Hello, and thanks for staying with me on this!

    It's not an option unfortunately.

    Only the two network connections show, and all the virtual IPs are bound to the Primary (which isn't bound first), but it also means those IPs are inaccessible.

    Since it's a HP device, there's a utility to configure things, and there might be an answer there, but it's tricky enough to need tech support from our provider for that.

     One other issue that I stumbled across again, that sounded reasonable the first time, is that metabase editing option.

    To clarify, it's to disable socket pooling.

    Any thoughts on the matter (this would mean only the specified virtual servers would be listening, with no cross-over, right?)?

    REF: http://support.microsoft.com/kb/281760

    Thanks again for all your help!

     

    Matthew
  • 11-02-2006, 10:10 PM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    Not really. socket pooling in this case is asking the services to bind on certain IP address rather than all unassigned. 0.0.0.0:25. After the configuration, it will only bound to certain IP address.
    Cheers,
    Bernard Cheah
  • 11-03-2006, 9:44 AM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    Hello Bernard,

    Many thanks (as always) for clarifying things.

    It looks as though things are coming to general resolution.  Our hosting partner is going to set up a some DNS settings for our primary IP.

    This makes sense to me, since the virtual IPs seem to hand off to the primary, and I don't see any way to effectively change that.

    This means I just set the FQDN as required and everything else should take care of itself.

    It certainly has been a learning experience, and our application mail setup is a great deal more sound than it started out.

    Thanks again and I look forward to participating in other discussions here at iis.net! 

    Matthew
  • 11-05-2006, 12:12 AM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    So it was the ptr record?
    Cheers,
    Bernard Cheah
  • 11-06-2006, 12:06 PM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    Hello Bernard,

    Basically yes.

    We knew that the issue came about from specifying a reverse lookup (and to cut down further issues, one that worked forwards too); however, our hosting provider requires the primary IP address not be used for hosting any services.  The primary is meant solely for remote administration.

    To that end, setting up DNS records was a little bit hit and miss.

    The virtual IPs (which we can do whatever we want with) forwarded to the primary though.

    So we had two options, force IIS/Server 2003 to pass out one of the virtual IPs, or to get DNS entries set up on the primary.  Eventually, we pulled off the latter.

    The logs are clean now (no preventable bounces due to reverse lookup).

    Really, it was the obvious solution, and thankfully it is configured now.

    If it had been multiple network interfaces, I'm positive the binding order would have been a surefire solution.

    In this case, it was just a somewhat odd configuration and usage policy that made things a little more complicated.

    Thanks again for all the help!
     

    Matthew
  • 11-07-2006, 3:43 AM In reply to

    Re: SMTP Server - How can I set the outbound IP?

    Lovely, so even it was the top ip in the ip list, you still need to configure proper PTR record. that's something I read in the past, but forgot about it :)
    Cheers,
    Bernard Cheah
Page 1 of 1 (13 items)
Microsoft Communities