Unable to send SMTP email to internal addresses
I have a client with an Exchange 2007 server and for some reason I can sent SMTP email from SQL Server to external addresses, but I cannot sent to any internal addresses within the company. I don't normally do too much hands on stuff with Exchange, but the IT guy at my client does not seem to be able to resolve this issue. I don't get any errors, but If I put my email address in the "from" field I get the following message:
========
Your message did not reach some or all of the intended recipients.
Subject: Test Email 4 - 27 Jan 2009
Sent: 27/01/2009 10:43 PM
The following recipient(s) cannot be reached:
user@COMPANY.com on 27/01/2009 10:43 PM
The e-mail system was unable to deliver the message, but did not report a specific reason. Check the address and try again. If it still fails, contact your system administrator.
<COMPANY.com #5.0.0>
========
Does anyone have any idea what might be the problem here? Or are there any logs or anything that I can look at to help diagnose this issue?http://geekswithblogs.net/darrengosbell - please mark correct answers
January 28th, 2009 11:32pm
When you said I put my email address in the "from" field, do you mean that you put your mail address in To field? And the user@company.com is your mail address, the mail cannot send from SQL to your mailbox, so the NDR has generated
Please describe the exchange topology
Please check NDRs Internet header, see that NDR are first sent by which server, so we can know where the messages get blocked
Then go to that server, enable the SMTP Protocol logging on that server and reproduce the issue, then check the log file
Also, Connectivity Logging will help to troubleshoot the issue
When you try to send the test mail, please check which queue the mail stuck into via Queue Viewer, see what last error shows
Notes: Dont forget to disable all logging after the testing
Free Windows Admin Tool Kit Click here and download it now
January 30th, 2009 9:49am
James-Luo said:
When you said I put my email address in the "from" field, do you mean that you put your mail address in To field? And the user@company.com is your mail address, the mail cannot send from SQL to your mailbox, so the NDR has generated
No, I am sending from a server which does not have a mail box. When I send to my external account it works fine. When I send to an internal account the mail disappears. So I put an internal account in the "To" field and my external account in the "From" hoping to get some indication of the problem in the NDR.
James-Luo said:
Please describe the exchange topology
Please check NDRs Internet header, see that NDR are first sent by which server, so we can know where the messages get blocked
Then go to that server, enable the SMTP Protocol logging on that server and reproduce the issue, then check the log file
Also, Connectivity Logging will help to troubleshoot the issue
When you try to send the test mail, please check which queue the mail stuck into via Queue Viewer, see what last error shows
Notes: Dont forget to disable all logging after the testing
This is just a single Exchange 2007 Server.
I think thetwo logging options you suggested shouldhelp. I have been asking the IT administrator at my client to check the logs, but he said there was nothing in them so I don't think he has enabled the logging properly. I will pass on the links and seeif I can get any furtherwhen I next goout to this client.
Thanks for the reply.http://geekswithblogs.net/darrengosbell - please mark correct answers
January 30th, 2009 3:52pm
So the NDR was sent from external to internal, it may not relate to our current issue which SQL server cant send mail to internal user account, mails got disappeared
I suggest that you send test mail from SQL to internal user, and use Message Tracking on Hub to check where the test mail goes to
For example:
Get-Messagetrackinglog -Sender james.luo@domain.com -Start 1/31/2009 7:42:00PM -End 1/31/2009 7:52:00 PM
Reference:
Exchange 2007 Message Tracking
How to Search Message Tracking Logs
Free Windows Admin Tool Kit Click here and download it now
February 2nd, 2009 6:23am
The NDR was coming from the internal server, I was kind of spoofing the sender address in order to be able to see the NDR (as nothing appeared to be routing to any internal addresses)In the end it turned out to be really simple, the get-messagetrackinglog did not turn up any messages, but when I did a get-ExchangeServer I noticed that the IP address was different from the one that I had been given. Sending tothe correct IP address fixed everything. Thanks for your help James, putting me on the track of looking at the Powershell cmdlets help me solve the issue.http://geekswithblogs.net/darrengosbell - please mark correct answers
February 3rd, 2009 12:37am
J Glad to help, and thanks for sharing your resolution
Free Windows Admin Tool Kit Click here and download it now
February 3rd, 2009 4:23am