Category Archives: Windows Server

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:

SMTP ESMTP BDAT

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.

 

 

IIS 8.5 status error 500 and sc-substatus 19

I’m running a website on IIS8.5, but it gives me only a blank page and the following error in the IIS logs: status error 500 and sc-substatus 19

There is not much documentation on this error, the Microsoft website has a list with errors, with only the description: “Configuration data is invalid”. There is more detailed information here, but I didn’t get any Hresult codes.

After searching for clues, I finally found the solution: in IIS Manager, under the Server nameFeature delegation the IP Address and Domain Restrictions was set to readonly. This must be set to read/write in order to be able to get it working in the web.config. The same holds for the Handler Mappings in the web.config.

 

Windows Server 2012 SMTP

On Windows Server 2012 the SMTP Server is deprecated, but you can still install it using the Add Roles and Features Wizard in the Server Manager.

Lately we received this error:

System.Net.Mail.SmtpException: Exceeded storage allocation. The server response was: 4.3.1 Session size exceeds fixed maximum session size
   at System.Net.Mail.DataStopCommand.CheckResponse(SmtpStatusCode statusCode, String serverResponse)
   at System.Net.Mail.DataStopCommand.Send(SmtpConnection conn)
   at System.Net.Mail.SmtpConnection.OnClose(Object sender, EventArgs args)
   at System.Net.ClosableStream.Close()
   at System.Net.Mail.MailWriter.Close()
   at System.Net.Mail.SmtpClient.Send(MailMessage message)

It turned out the attachment size was to big for the SMTP Server. You can change these settings the same way as in Windows Server 2012. Use the Windows Server 2012 Search charm to find the IIS 6.0 Manager. On the tab “messages” you can change the Limit message size.