Email going to old exchange server even though MX records was changed to point to new server.

Posted on 2005-05-14
Last Modified: 2008-03-06
I have recently installed a new Exchange Server on a new Server PC at a different location. The old Exchange Server was on the same machine (and network and Windows domain) as an IIS 6.0 Web server. After moving to the new Exchange Server (I left the old one running to catch mail during the time it takes all DNS records to be updated), most mail went to the new Exchange Server, but mail that originated within the web server still went to the old Exchange Server. (After the change, I created a new A record at my ISP associated with "". I then created an MX record with the name "" pointing to the new Exchange Server site. My question: Is there some place where DNS names are cached (other than the obvious DNS cache on the local Web server/Exchange Server machine) that is not obvious? Or is there some shortcut optimization that IIS does with Exchange where it tries to outsmart me?
Question by:steve_webber
    LVL 3

    Expert Comment

    before we move on to exchange/dns config... lets talk about your web server and what it hosts just to remove iis from the equation.

    "mail originated within the webserver"  is this to say that this is a 3rd party app that can generate/send email to your internal recipients and outbound mail.

    if so is the exchange server netbios or fqdn hardcoded into the web app?
    I find this to be a common issue during migration and hardware replacement/decommission.


    Author Comment

    The web server uses a php script to send a simple mail message to users via a statement such as:

    mail("", $re, $msg);

    The Windows domain name in which IIS runs is "whatever" (internally, "whatever.local"). This method was working fine until I created a second Exchange Server instance (in another Windows domain on another LAN segment with a completely different IP address). I added another e-mail target ( to the have the script send the same message to a different place. This was working until I changed the Control Panel --> Mail E-mail account to use the name (the new Exchange Server). When I made this change, the MSN mail didn't even work (although it's only been about 10 minutes).
    LVL 3

    Accepted Solution


    your php script is either using the hardcoded (const) exchange server or the php script is using the server of the configured mail profile on this server -

    mail was probably going out your old server originally because the SMTP connector for outbound traffic was still configured on this server and to allow relay outbound as the iis and the exchange were on the same box - no relay restrictions.

    this has now broke as you have changed the mail profile on the box, essentially meaning that you are not using a hard coded constant.  so the php script is point to the new server from the updated profile to relay SMTP

    the new server whilst in the same routing group has its own SMTP VS, it isn't configured to allow relay (you have two separate servers now)- therefore please check the relay restrictions on your new exchange servers SMTP VS - add the iis6.0 servers IP address and try again.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Do You Know the 4 Main Threat Actor Types?

    Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

    Use email signature images to promote corporate certifications and industry awards.
    ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
    The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
    how to add IIS SMTP to handle application/Scanner relays into office 365.

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now