Troubleshooting 5.5.0 smtp; 503 Bad sequence of commands (Microsoft SMTP + Exchange 2003)

exchange-2003smtp

Note: this question has changed. Originally I believed it had something to do with BDAT.

An external party is trying to send us a message to a valid address and they're getting an NDR:

<sender.it #5.5.0 smtp;503 Bad sequence of commands>

Note that this message is coming from the sender's side.

I'm looking at my SMTP logs and am finding:

#Fields: date time c-ip cs-username cs-method cs-uri-stem cs-uri-query sc-status sc-win32-status sc-bytes cs-bytes
2009-11-24 19:38:26 85.88.193.3 sender.it RCPT - +TO:+<me@mydomain.com> 250 0 0 28
2009-11-24 19:38:26 85.88.193.3 sender.it BDAT - - 250 0 0 9
2009-11-24 19:38:26 85.88.193.3 sender.it BDAT - - 250 0 42 9
2009-11-24 19:38:26 85.88.193.3 sender.it BDAT - - 250 0 42 9
2009-11-24 19:38:26 85.88.193.3 sender.it QUIT - sender.it 240 11188 0 37

The message never reaches Exchange. No record of anything from the sender in the message tracking log. I'm also running GFI MailEssentials 14 and there is no record of this message in its logs. No Exchange-related errors or warning in the event logs. Queues are normal.

Where do I go from here? This user is not able to send mail to my domain. I'm not having any other reported incoming email issues at this time…everything seems to be flowing like normal.

Best Answer

If the server responds to the ehlo command and lists Chunking, then it supports BDAT. To test your server, telnet to it on port 25 and issue the ehlo command. It will then list which of the ESMTP commands that it supports. If Chunking is in the list then BDAT is not the problem. Because this is Exchange you should see that it supports the full ESMTP command set and Chunking because AFAIK, this is the default for Exchange.

Your log file doesn't have enought info to tell what the problem is. You need to modify the log file parameters to include status codes so that you can see what the status is for each command (log file entry) and determine what the problem is.