# maitred Lightweight embeddable SMTP [RFC5321](https://www.rfc-editor.org/rfc/rfc5321.html) server for use in applications that need to receive e-mail. ## Use Case The original goal of this library is to have a usable SMTP server that can be embedded in mailing list software, particularly for use in [Ayllu](https://ayllu-forge.org) and [Mailpot](https://git.meli-email.org/meli/mailpot). After considering all of the existing SMTP servers there was no Rust library that could be easily embedded in an application and general purpose SMTP servers like Postfix are too complex to be reasonably packaged. ## Security ### Relaying Due to the common abuse of the SMTP protocol by nefarious internet actors the default behavior of this package must _never_ allow open relaying without explicit and conscious configuration from the user. Additionally the SMTP server must never expose the e-mail addresses or other user data contained within. ### TLS This library does not implement any TLS termination nor does it allow for STARTTLS upgrades. The recommended production setting is to use an SMTP proxy server like Nginx to terminate TLS there. ## Alpha Status NOTE: This library is at best in an "alpha" state currently and should be used for _absolutely nothing_ that is important. ## Protocol Status ### SMTP Base server and Commands [RFC5321](rfcs/rfc5321.txt) | Name | Status | Notes | |-----------|--------|-------------------------------------------------------| | HELO | ✅ | | | EHLO | ✅ | | | MAIL | ✅ | | | RCPT | ✅ | | | BDAT | ✅ | | | DATA | ✅ | | | AUTH | ✅ | SASL PLAIN only | | VRFY | ✅ | | | EXPN | ✅ | | | STARTTLS | ❌ | For the moment there is no plan to implement STARTTLS | ### ESMTP Extensions | Name | Status | RFC | |-----------------------|----------|-------------------------------| | SIZE | ✅ | [RFC1870](rfcs/rfc1870.txt) | | PIPELINING | ✅ | [RFC2920](rfcs/rfc2920.txt) | | 8BITMIME | ✅ | [RFC6152](rfcs/rfc6152.txt) | | ENHANCED STATUS CODES | ⚠️ | [RFC2920](rfcs/rfc3463.txt) | | SMTPUTF8 | TODO | [RFC6531](rfcs/rfc6531.txt) | | CHUNKING | TODO | [RFC3030](rfcs/rfc3030.txt) | | DSN | TODO | [RFC3461](rfcs/rfc3461.txt) | | ETRN | ❌ | [RFC1985](rfcs/rfc1985.txt) | | ATRN | ❌ | RFC2645 | | BURL | ❌ | RFC4468 | ### Authentication Extensions All authentication extensions are implemented with the [mail-auth](https://crates.io/crates/mail-auth) package from Stalwart. |name | status | |---------------------------|--------| | DKIM Verification | ✅ | | ARC Chain Verification | TODO | | SPF Policy Evaluation | TODO | | DMARC Policy Evaluation | TODO | ## Attributions Several of the free software libraries released by [stalwart](https://github.com/stalwartlabs/mail-server) are in use here.