I wrote my own smallish SMTP server. My goal was to create a simple program that would accept and store email without making a huge fuss about it.
I call it ghsmtp.
Implementation language is C++.
License is AGPLv3.
Some of my design goals:
Standards supported include…
SMTP Service Extensions for…Message Size Declaration (RFC 1870)
Other standards of interest are…
Sender Policy Framework (SPF)
DomainKeys Identified Mail (DKIM)
Domain-based Message Authentication, Reporting, and Conformance (DMARC)
Message Header Field for Indicating Message Authentication Status (Authentication-Results)
Authenticated Received Chain (ARC)