How to turn off ESMTP BDAT on Windows Server 2012

Although SMTP on Windows Server 2012 is deprecated, it still works fine, but support is not great. We had some complaints that e-mails where not delivered in some occasions. Looking in the SMTP log files we found it used a different protocol: BDAT:

SMTPSVC1 – 25 BDAT – 17830+LAST 0 0 4 0 610 SMTP

BDAT is part of ESMTP and is involved in sending binary data. You can check on your server if this option is turned on by using telnet: ‘telnet localhost 25’ and than typing ‘ehlo’. If you see BINARYMIME and CHUNKING in the list it’s turned on.

To turn ESMTP off you have to install the IIS Metabase Explorer. This is part of the IIS6 Resource Kit. NOTE: you only need the IIS Metabases Explorer to change some parameters.

Open the Metabase Explorer and go to: LM\SmtpSvc\1, there you see the SmtpInboundCommandSupportOptions default value is set to: 7697601. By using this table you can calculate the new value by subtracting 2097152 (BINARYMIME) and 1048576 (CHUNKING) from 797601-2097152-1048576 = 4551873

You can see CHUNKING and BINARYMIME is not listed any longer:


Last thing is to change the value of SmtpOutboundCommandSupportOptions in LM\SmtpSvc from 7 to 5 to disable the BDAT command.

You can read more on this page.