sapes is a multi-threaded, SMTP and POP, mail server written entirely in C++. From the start it was designed to run on Windows and Linux. sapes requires Windows 2000 Professional or later because of a DNS routine used to lookup MX records. If you replace that routine then it will compile and run on older versions of Windows as well.
I used a BSD style license, which means you can pretty much do whatever you want with the code.
sapes Project Page