Thursday 31 March 2011

Standard 5.7.17 Error when sending email from SMTP server

Some months ago we were struggling to get an Exchange Server working. We could send but not receive. In the end we walked away from it.
Today we have been recovering a server from a broadband change, a router reset and re-configuration but without changing anything on the server itself which had previously been running Exchange OK. We could not get mail through.
We did a Google search for 5.7.17 and found some posts which were not very useful but then we happened upon this thread
http://www.google.com/support/forum/p/Google%20Apps/thread?tid=14a3d1192c489e16&hl=en
from M1ke on Google Support Forum
I have followed this thread and can now successfully receive email
I think that I now understand it better than M1ke has described so I will offer some clues.

First, 5.7.17 is NOT an Exchange Server error so if you get it you have not got to the Exchange Server.
Second, the ability to send from servers such as hotmail and gmail are crucial to understanding what is going on.
Third, this content from M1ke is vital

My server and accounts are controlled by Plesk. All domain settings are in 123-Reg but Plesk has its own list of domain settings for each address. I assume it follows the 123-Reg settings because the MX and DNS lookups give those values, and Gmail/Hotmail/Yahoo addresses do not encounter the 5.7.17 error. If there are known Plesk issues please can you detail them so that I can investigate?

the important pieces here are 'My server ..... by Plesk' and by the way I do not think this is a Plesk issue.

Fourth, M1ke gives us the solution in his third post --- remove the mail boxes from Plesk and turn off the mail service for the domain in question. Playing with the MX records is a red herring.

Having done this our email gets correctly transported to Exchange without issue.

Now to the better understanding of the issue.
We were trying to send emails to an exchange server that is related to a domain which is hosted on our Plesk server. The public DNS records at the registrar correctly direct traffic to our server for http, ftp, etc and mail to the Exchange server - each server being found on different IP addresses. Thus hotmail and gmail find the public DNS record and the mail gets transported to the Exchange server.
Like M1ke, we were trying to test sending email from OUR server (running Plesk) to the Exchange server but our domain and the recipient domain are both virtual hosts on our Plesk server, hence Plesk tries to resolve the mail addresses itself, and will do one of two things. It will either drop the mail in a mail box which it knows about or give you a 5.7.17 error if it cannot find that mail box. Because Plesk can resolve the mail to a mail server which it knows about and mail never goes outside the local server and is never seen on the Public network and therefore cannot be received by Exchange.
Once you disable the mail server for that domain in Plesk the mail HAS to go to the public network and can be correctly transported to the correct host.
I hope this post will short cut a few problems for other people.
My thanks to M1ke and if anyone knows how to contact him please do so on our behalf.

No comments: