Emails sent from Coldfusion using the same SMTP/Exchange server works from one machine but fails for another

coldfusionexchangesmtpvirtual-machines

First, apologies if this question is too vague or has too little information to really be answerable. I am not normally working with these issues, and I don't have full access to the environment. However, the hosting provider seems to have a hard time tracking down the issue, so I am hoping that someone can at least provide me with some qualified guesses about the most likely problem.

Here goes: A client I work for has a hosted IT environment, based on virtual machines running Windows 2008 R2 Standard. Our website, based on Coldfusion 9 was recently migrated from one virtual machine to another, and though Coldfusion is configured in the exact same way, using the same SMTP server, i.e. the client's Exchange server hosted in the same environment and in the same AD as both web servers, sending emails to external recipients is no longer working. It is still working fine when testing from the old machine.

This is what I've learnt so far (all emails are sent using a valid from-address on the client's domain):

  1. Emails sent only to other recipients on the same domain are delivered without any problem.
  2. Emails sent only to external recipients on other domains are never delivered.
  3. When sending emails to a mix of internal and external recipients, no emails are delivered.
  4. When receiving one of these emails to an internal address, the sender is now indicated as "sender@clientsdomain.com", while when sent from the old machine, it used to say just "sender". This seems to me that it could hint that the Exchange machine "recognizes" the old web server while it is a stranger to the new.
  5. In Coldfusion's mail log, all messages appear to be successfully delivered to the SMTP server.

Any ideas what settings to look at, what log entries to search for or how to compare the old web server with the new one will be highly appreciated.

Best Answer

You may want to check the IP of the new coldfusion box, and maybe add it to exchange in the mail transport area to allow for mail relay. If your coldfusion code isnt using smtp with a username & password, then chances are its IP address was granted mail relay access, and since your now sending from a new IP, your external relay is being blocked. This would also explain why your local email is going through OK but not your external.

So basically, go onto your CF machine, find out its IP, possibly through looking at the network connection or dslreports.com/whois and then go to the exchange, mail transport... since I dont have an exchange server handy, you'll have to look up the rest.

OR

On your exchange server, setup regular user/mailbox account, and create a username/password. Set it so it doesnt expire. Then update your Code to authenticate through that account.