• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 676
  • Last Modified:

Exchange 2007 and Coldfusion 8

I am having trouble sending mail from coldfusion 8 through an exchange 2007 server.  I have two exchange servers one on Server 2003 and one on Server 2008.  I am in the process of removing the 2003 box but when I point coldfusion to the 2008 box outside mail (mail sent to external addresses) stops working.  I get "invalid address" in the mail log.  The send connector on Exchange 2007 appears to be universal to all hub transport servers the receive connectors are set-up the same on both boxes.
0
4mrhodes
Asked:
4mrhodes
  • 7
  • 4
1 Solution
 
duncancummingCommented:
You're sure you can send external mail through the Server 2008 machine normally (i.e. not using Coldfusion)?  

It's more likely to be a problem with your Exchange configuration than Coldfusion.  Check your settings in CF Administrator.  Have you tried Verify Mail Server Connection successfully?  

The message could indicate a problem with how you're specifying email addresses in the cfmail tag.  Can you give us an example of your code you're trying to use for sending emails?  It may be that the second mailserver is stricter about the address format.  e.g. I moved from one mailserver to another that then prevented things like <cfmail from="Joe Bloggs"...>, it had to be a properly formatted email address.
0
 
4mrhodesAuthor Commented:
The 2008 box isn't having any trouble sending external mail accept mail from CF.  (note: Mail addressed to an internal user does go through from CF.)  'Verify' reports success.  below is the an email that was spooled in the "undelivered' folder on the CF server - should give you a good idea of what cfmail is creating..

type:  text/plain; charset=UTF-8
server:  10.169.101.2:25
from:  mrhodes@highmeadows.org
to:  carolynfish@comcast.net
subject:  HMS Form Portal Userinformation
X-Mailer:  ColdFusion 8 Application Server
body:  
body:  To access your household's account at the High Meadows School parent forms portal use the following credentials.
body:  
body:  Username:
body:  Password:
body:  
body:  https://hmsnet.org/hms
body:  

0
 
4mrhodesAuthor Commented:
here is the actual cfmail tag.  I don't think this is it - my guess is it is something in exchange 2007 - but I figure out what is different on the settings in exchange 2007 on srv. 2003 and the exchange 2007 on 2008.

<cfmail to="#FORM.emailaddress#" from="mrhodes@highmeadows.org" subject="HMS Form Portal Userinformation">
To access your household's account at the High Meadows School parent forms portal use the following credentials.

Username: #Userinfo.UserName#
Password: #Userinfo.Password#

https://hmsnet.org/hms

</cfmail>
0
Simplify Active Directory Administration

Administration of Active Directory does not have to be hard.  Too often what should be a simple task is made more difficult than it needs to be.The solution?  Hyena from SystemTools Software.  With ease-of-use as well as powerful importing and bulk updating capabilities.

 
duncancummingCommented:
Another thing I've seen is where the mailserver will fail to deliver an email if you specify a from address that isn't in its address book.

e.g. in the example above, if your mailserver is acting for the highmeadows.org domain name, but mrhodes@highmeadows.org isn't an actual valid email address.  maybe it should be spelled mr.rhodes@highmeadows.org (let's pretend).  then the mailserver fails to send the email, despite it being technically correct.  

Also make sure things like spaces etc aren't present in your cfmail tags, e.g.
<cfmail from=" example@example.com "> would be better as
<cfmail from="example@example.com">
0
 
duncancummingCommented:
This is failing for all external mail?  You've tried testing it with say your own hotmail/gmail addresses?  Try trimming the #form.emailaddress#
0
 
4mrhodesAuthor Commented:
mrhodes@highmeadows.org is my email address and is working.
0
 
4mrhodesAuthor Commented:
I tried multiple external mail addresses.  I'll try trimming it, but it seems strange that it works when pointed at one exchange server but not the other exchange server.  To me that says 'exchange server setting'

In the mail log I get "invalid addresses" as the error - no matter what external address i try this happens and i am able to verify it didn't go through in a matter of seconds.
0
 
4mrhodesAuthor Commented:
Still getting error.
Nov 17, 2008           5:27 PM           Error           scheduler-2             
Invalid Addresses

CODE:
<cfmail to="#trim(FORM.emailaddress)#" from="mrhodes@highmeadows.org" subject="HMS Form Portal Userinformation">
To access your household's account at the High Meadows School parent forms portal use the following credentials.

Username: #Userinfo.UserName#
Password: #Userinfo.Password#

https://hmsnet.org/hms

</cfmail>
0
 
duncancummingCommented:
Some kind of filtering in Exchange that's blocking all external addresses?
http://www.msexchange.org/tutorials/Sender-Recipient-Filtering.html
0
 
4mrhodesAuthor Commented:
I'm running Exchange 2007 - looked at the filtering - most of it is set at the organizational level so both servers share the settings.
0
 
4mrhodesAuthor Commented:
Problem solved - I had forgot a step i had to do when setting up the receive connector on the original box - to allow relays you have to get the connector the proper permissions.  (i.e. i was authenicating as anonymous but for that to work you have to bind the anonomous group to the exchange group for that receive connector

CODE for Exchange shell:

Get-ReceiveConnector RelayConnector | Add-ADPermission -User "NT AUTHORITY\ANONYMOUS LOGON" -ExtendedRights "ms-Exch-SMTP-Accept-Any-Recipient"

see
http://exchangepedia.com/blog/2007/01/exchange-server-2007-how-to-allow.html

after doing the binding it works.


0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Problems using Powershell and Active Directory?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

  • 7
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now