[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

SMTP Service. NDR: 502 Command Unimplemented when sending only to certain domains

Posted on 2006-03-24
12
Medium Priority
?
1,962 Views
Last Modified: 2008-01-16
Below is an extract of my SMTP service's log (the names have been changed to protect the innocent!!). This was produced whilst I attempted to send an email using telnet.

xxx.xxx.xxx.xxx = My PCs IP Address
WIN2k_SMTP = Windows 2000 Machine with SMTP service running
yyy.yyy.yyy.yyy = The IP Address of WIN2k_SMTP
NT4SERVER_EXCH55 = NT4 Server running Exchange 5.5
All 3 of the above machines are on the same domain (MYDOMAIN)

my.email@my-company.com = My email address
recipient@theirdomain.co.uk = The person I am attempting to email!!

All domains in the SMTP service are set to send HELO instead of EHLO
The 8bitmime ESMTP verb has been disabled in the metabase.
Any ideas why I would get an NDR with a 502 Command Unimplemented?
Am I correct in thinking that it is the BDAT command which is failing?

#Software: Microsoft Internet Information Services 5.0
#Version: 1.0
#Date: 2006-03-24 12:42:59
#Fields: date time c-ip cs-username s-sitename s-computername s-ip s-port cs-method cs-uri-stem cs-uri-query sc-status sc-win32-status sc-bytes cs-bytes time-taken cs-version cs-host cs(User-Agent) cs(Cookie) cs(Referer)
2006-03-24 12:42:59 xxx.xxx.xxx.xxx - SMTPSVC1 WIN2k_SMTP yyy.yyy.yyy.yyy 0 HELO - - 250 0 35 4 0 SMTP - - - -
2006-03-24 12:43:18 xxx.xxx.xxx.xxx - SMTPSVC1 WIN2k_SMTP yyy.yyy.yyy.yyy 0 MAIL - +from:+my.email@my-company.com 250 0 57 43 0 SMTP - - - -
2006-03-24 12:43:30 xxx.xxx.xxx.xxx - SMTPSVC1 WIN2k_SMTP yyy.yyy.yyy.yyy 0 RCPT - +to:+recipient@theirdomain.co.uk 250 0 34 30 0 SMTP - - - -
2006-03-24 12:43:51 xxx.xxx.xxx.xxx - SMTPSVC1 WIN2k_SMTP yyy.yyy.yyy.yyy 0 DATA - <WIN2k_SMTPgl2kzZ0zPosx00000155@WIN2k_SMTP> 250 0 120 51 17640 SMTP - - - -
2006-03-24 12:44:10 - OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 220+theirdomain.co.uk+Microsoft+ESMTP+MAIL+Service,+Version:+6.0.3790.211+ready+at++Fri,+24+Mar+2006+13:05:41++0000+ 0 0 112 0 1265 SMTP - - - -
2006-03-24 12:44:10 theirdomain.co.uk OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 EHLO - WIN2k_SMTP 0 0 4 0 1265 SMTP - - - -
2006-03-24 12:44:10 theirdomain.co.uk OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250-theirdomain.co.uk+Hello+[195.147.101.202] 0 0 41 0 1312 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 MAIL - FROM:<my.email@my-company.com> 0 0 4 0 2422 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250+2.1.0+my.email@my-company.com....Sender+OK 0 0 55 0 2469 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 RCPT - TO:<recipient@theirdomain.co.uk> 0 0 4 0 2469 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250+2.1.5+recipient@theirdomain.co.uk+ 0 0 32 0 2500 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 BDAT - 430+LAST 0 0 4 0 2500 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 502+Command+unimplemented 0 0 25 0 2500 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 QUIT - - 0 0 4 0 2937 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 500+Syntax+error,+command+unrecognized 0 0 38 0 3312 SMTP - - - -
2006-03-24 12:44:11 - OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 220+NT4SERVER_EXCH55.MYDOMAIN+ESMTP+Server+(Microsoft+Exchange+Internet+Mail+Service+5.5.2655.55)+ready 0 0 93 0 31 SMTP - - - -
2006-03-24 12:44:11 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 HELO - WIN2k_SMTP 0 0 4 0 31 SMTP - - - -
2006-03-24 12:44:11 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250+OK 0 0 6 0 31 SMTP - - - -
2006-03-24 12:44:11 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 MAIL - FROM:<> 0 0 4 0 62 SMTP - - - -
2006-03-24 12:44:12 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250+OK+-+mail+from+<> 0 0 21 0 78 SMTP - - - -
2006-03-24 12:44:12 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 RCPT - TO:<my.email@my-company.com> 0 0 4 0 78 SMTP - - - -
2006-03-24 12:44:12 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250+OK+-+Recipient+<my.email@my-company.com> 0 0 53 0 78 SMTP - - - -
2006-03-24 12:44:12 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 DATA - - 0 0 4 0 78 SMTP - - - -
2006-03-24 12:44:12 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 354+Send+data.++End+with+CRLF.CRLF 0 0 34 0 78 SMTP - - - -
2006-03-24 12:44:12 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250+OK 0 0 6 0 93 SMTP - - - -
2006-03-24 12:44:12 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 QUIT - - 0 0 4 0 93 SMTP - - - -
2006-03-24 12:44:12 NT4SERVER_EXCH55.MYDOMAIN OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 221+closing+connection 0 0 22 0 93 SMTP - - - -
0
Comment
Question by:Willibob
  • 6
  • 5
12 Comments
 
LVL 5

Expert Comment

by:Draak
ID: 16280798
indeed. Seem sto me that the server theirdomain.co.uk does not understand the command BDAT

best regards, Draak
0
 
LVL 5

Accepted Solution

by:
Draak earned 1000 total points
ID: 16280926
Hi there again,

the most common reason why you get this error is caused by a firewall doing some kind of SMTP filtering between the two mail servers. By default ISA server(the MS firewall) has this filtering enabled and it filters the BDAT word in any SMTP converstation passing through it.

try looking in that direction

best regards,

Draak.
0
 
LVL 5

Author Comment

by:Willibob
ID: 16281098
Thanks Draak

I'll check the firewall policy and post any relevant info.

Bill
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
LVL 5

Author Comment

by:Willibob
ID: 16281128
By the way, my Exchange 5.5 server can send mail to theirdomain.co.uk without any problem. Its only when I relay outbound mail through the SMTP service or send directly by telnetting in to the SMTP service that it fails.

Bill
0
 
LVL 5

Expert Comment

by:Draak
ID: 16281131
Hi there,

did some more digging and found that the verb BDAT is not part of the standard SMTP commands as described in RFC821. Because ESMTP is disabled the SMTP server does not recognize the VERB BDAT.

2006-03-24 12:44:10 theirdomain.co.uk OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 EHLO - WIN2k_SMTP 0 0 4 0 1265 SMTP - - - -
2006-03-24 12:44:10 theirdomain.co.uk OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250-theirdomain.co.uk+Hello+[195.147.101.202] 0 0 41 0 1312 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 MAIL - FROM:<my.email@my-company.com> 0 0 4 0 2422 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250+2.1.0+my.email@my-company.com....Sender+OK 0 0 55 0 2469 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 RCPT - TO:<recipient@theirdomain.co.uk> 0 0 4 0 2469 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionResponse SMTPSVC1 WIN2k_SMTP - 25 - - 250+2.1.5+recipient@theirdomain.co.uk+ 0 0 32 0 2500 SMTP - - - -
2006-03-24 12:44:11 theirdomain.co.uk OutboundConnectionCommand SMTPSVC1 WIN2k_SMTP - 25 BDAT - 430+LAST 0 0 4 0 2500 SMTP - - - -

This shows that communication is using ESMTP instead of SMTP.

best regards,

Draak
0
 
LVL 1

Expert Comment

by:gam1002
ID: 16282824
Hi,

Just so you know, the line:

fixup smtp

on a Cisco PIX will also cause this. Just like the ISA filtering.

Cheers,
Andrew
0
 
LVL 5

Author Comment

by:Willibob
ID: 16300196
Draak

I made some changes to the firewall policy on Friday and fired off a couple of test messages through telnet.

Although I didn't get an instant NDR, I got a message delayed notification on Saturday:

                         Final-Recipient: rfc822;recipient@theirdomain.co.uk
                         Action: delayed
                         Status: 4.4.7
                         Will-Retry-Until: Sun, 26 Mar 2006 16:11:39 +0000

And then the following on Sunday:

                         Final-Recipient: rfc822;recipient@theirdomain.co.uk
                         Action: failed
                         Status: 4.4.7

I've sent some more to addresses I could previously get to so I'm waiting to see what happens with those.

Bill
0
 
LVL 5

Expert Comment

by:Draak
ID: 16300394
Hi Bill,

any additional SMTP logging available

best regards
0
 
LVL 5

Author Comment

by:Willibob
ID: 16300485
Hi Draak

The SMTP log has changed in the sense that it is no longer using EHLO & BDAT but is now using HELO and DATA.

There were no immediate errors as there was before (500 Syntax error) but the message was still not delivered. I tested the email address on dnsstuff.com and although the primary and secondary mailservers returned success, the 4 backup mail servers returned an Unknown Recipient error.

Given that my Exch5.5 has no difficulty sending to this domain, I don't think that this is the cause of the issue.

I'll keep you posted (pardon the pun!)

Bill
0
 
LVL 5

Expert Comment

by:Draak
ID: 16300797
Hi Bill,

the only thing left to check is the SMTP logs for the RCPT TO command and check that the syntax is correct. It should say
RCPT TO:<recipient@theirdomain.co.uk>

Although I think it will also accept
RCPT TO:recipient@theirdomain.co.uk

If this is OK, I am forced to tell you that there is indeed something wrong on the recipient side, especially if it returns "User unknown". Maybe its just a silly typo in the email address.

At least you got rid of the 500 error and got a 400 error instead (which is not a critical abort error, but a retry error)

best regards,
Draak
0
 
LVL 5

Author Comment

by:Willibob
ID: 16332145
Hi Draak

Just to let you know that I haven't abandoned this question!!

I'm still strying a few things but the problem is that I have to wait 2 days before the NDR comes back now.

All messages I send now, through the SMTP service using telnet ultimately fail. Even if I send to an address which was previously OK!!

They all fail with the same error 4.4.7

I'll keep at it and post some more SMTP logs in a couple of days (just waiting to see if the last batch of test messages made it!!)

Thanks for your help so far.

Bill
0
 
LVL 5

Author Comment

by:Willibob
ID: 16390707
Hi Draak

My problem still exists but I don't have time to resolve it at the moment and have a work around in place.

I accepted your answer as I cannot be sure that the firewall isn't contributing to the issue.

Thanks for your input.

Bill
0

Featured Post

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

How to effectively resolve the number one email related issue received by helpdesks.
Steps to fix error: “Couldn’t mount the database that you specified. Specified database: HU-DB; Error code: An Active Manager operation fail”
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Suggested Courses
Course of the Month18 days, 1 hour left to enroll

829 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question