NOTE: This was tested solely against a small test domain. It has never been tested in a production environment. If you choose to use it in a production environment, you assume any and all liability for problems or errors that occur. I explicitly disclaim all liability, I offer no warranties, expressed or implied. This is provided on an "as-is" basis.

I have no reason to believe that it won't work, but in today's lawsuit-happy social environment, that doesn't mean much. And, if you choose to sue me, well, I'm not worth anything, so you won't get anything anyway.

This is a sample of how to use XMail's external authentication feature to authenticate against a Windows NT domain.

Included files:
NTAuth.txtThis file
NTAuth.dspVisual C++ project file
NTAuth.dswVisual C++ project workspace
NTAuth.cppC++ file with actual authentication code
NTAuth.exeCompiled version of NTAuth.cpp
StdAfx.cppCPP file for Standard header file
StdAfx.hStandard header file
schmoo.foo.tabSample .tab file for external authentication

You will need to open the schmoo.foo.tab file, and edit the last item on the line therein. That last item needs to be your Windows NT domain name. Note that this is not the DNS name for you domain, but the name that Windows shows you if you open My Network Places (formerly Network Neighborhood), choose "Entire Network", then "Microsoft Windows Network".

The schmoo.foo.tab file needs to be renamed for the mail domain you are handling (if your mail domain is microsoft.com, then the tab file should be named microsoft.com.tab). This file should be placed in the \userauth\pop3 folder to handle external authentication for POP3 users. You can also place this file in the \userauth\smtp file to handle external authentication for SMTP users.

Also note that you still have to add the users for this domain to the mailusers.tab (preferably using CtrlClnt.exe or other administration software), although it does not matter what password is stored in the mailusers.tab for the user.

Place the NTAuth.exe file in your \bin folder.

That should be it. When your users connect and attempt to authenticate, XMail will find the .tab file in \userauth\pop3 (or smtp), and it will call NTAuth with the user name, password that was supplied by the user, and your domain name. NTAuth will attempt to authenticate that against your domain.

Added to this code is basic logging of all authentication attempts (success and failure). At some point in the future, I'll modify the code to make logging optional - but for the moment...:)