Blog Post

Storage at Microsoft
3 MIN READ

The beginning of the end of Remote Mailslots as part of Windows Insider

NedPyle's avatar
NedPyle
Icon for Microsoft rankMicrosoft
Mar 08, 2023

Heya folks, Ned here again. With the release of Windows 11 Insider Preview Build 25314 and Windows Server Preview Build 25314, we have started disabling the Remote Mailslot protocol by default. This is a precursor to deprecation and eventual removal from Windows. You aren't using this extremely legacy protocol unless you're also using the deprecated and disabled-by-default SMB1 protocol, so 99.97% of you have nothing to worry about. For those who are, a bit more information:

 

Remote Mailslots

The Remote Mailslot protocol is a very old, simple, unreliable, insecure IPC method. A server creates a mailslot and a client writes messages to it using NetBIOS datagrams as a transport when operating over a network with Windows. The sender of the mailslot message formats the SMB_COM_TRANSACTION message and sends it as a NetBIOS datagram. The Proto-SMB1 Common Internet File System (CIFS) Browser Protocol uses "\MAILSLOT\LANMAN" and "\MAILSLOT\BROWSE", for instance.

 

Mailslots are older than Windows NT, dating back to LAN Manager DOS days. It goes without saying that this protocol is disgusting. If you've been an IT Pro for a few decades, you might recall people using the anonymous NET SEND command (MAILSLOT\Messngr) to broadcast important messages to all logged on users, or more likely, this kind of crap:

 

 

What changed 

Starting with Windows 11 Insider Preview Build 25314remote mailslot is disabled by default. If you have manually re-enabled SMB1 (which has been disabled by default since Windows 10) and some application is still using a Remote Mailslot, they will see one of the following errors:

 

3025

ERROR_REMOTE_MAILSLOTS_DEPRECATED

β€œThe requested operation failed. Remote mailslots have been deprecated.”

 

Contact your vendor about updating their software to join the 21st century, as it both requires SMB1 and Remote Mailslot. This protocol is not secure, was replaced decades ago by better technology, and should not be used under any circumstances. 

 

If you need to re-enable Remote Mailslots temporarily while you yell at your vendor or developer, use the following PowerShell command:

 

PS C:\> Set-SmbClientConfiguration -EnableMailslots $true

 

Remote Mailslots will get officially deprecated in the next release of Windows and Windows Server, meaning that it can eventually be removed altogether. That will take time and there will be plenty of public warning, just like SMB1 had.

 

Final notes

This is part of a campaign to improve the security of Windows and Windows Server for the modern landscape. You've read my posts on SMB security changes over the past year:

 

 

For more information on securing SMB on Windows in-market, check out:

 

 

Until next time, 

 

- Ned Pyle

Updated Jul 02, 2024
Version 6.0
  • Chopping away 'dead wood'. This can't happen often enoughπŸ‘πŸΌπŸ‘πŸΌπŸ‘πŸΌ

  • desert_lizard's avatar
    desert_lizard
    Copper Contributor

    I think that "net send" looks fun to use and way easier CLI than the clunky gui of teams.  Not joking either. 

  • Peter_Schueller's avatar
    Peter_Schueller
    Copper Contributor

    We use mailslots in our Windows software to send small amounts of data from a process running on one machine to a process on another machine.

    What would be the best replacement API for this?

    • axelr's avatar
      axelr
      Copper Contributor

      You cannot push work on people, especially if they don't necessarily control the app(s) depending on the features being removed. For all I know, Mailslots may be critical to some apps that have been working perfectly fine for decades but whose sources were lost or can no longer be built, or the risks/benefits ratio (high risks and zero benefits - to be clear) cannot justify modifying them today. These apps will stop functioning, and the users may either see this as an opportunity to move to another platform (fool me once...) or stick forever to a version of Windows that works for them, which, in both cases, are losses for Microsoft and a huge burden for the users. Don't confuse changes that benefit users with changes that only benefit you.

      • It's unlikely Ned will reply. 

        Do you have a business case of how many apps using Mailslot, how many affected users? What are the names of these apps and do they comply with data protection policies like GPDR or security frameworks? 

         

        Thanks for adding more details on your statement. 

  • Peter_Schueller's avatar
    Peter_Schueller
    Copper Contributor

    Thanks for the info.

    But why are Named Pipes less recommended? With Sockets you have the problem that you have to choose a port number and probably create proprietary firewall exceptions.

  • They are nearly as legacy as Mailslots, they've had historical security issues, and in some cases, we've blocked their use by default (such as when using SMB over QUIC).