SMTP server written in rust. Server receives emails via SMTP and publishes them to redis pubsub where they can then be processed by other services. Connections from SMTP clients are handled concurrently by spawning tokio green tasks for each new connection. After an SMTP task has completed a successful exchange with its client, the final email is sent to a mpsc channel for processing. A redis worker task consumes messages from the channel and publishes them. If redis is unreachable, the message will be dropped.
Compiled binary can be used in client or server mode:
$ rs-mailserver help
Starting SMTP client:
Usage:
rs-mailserver send <mail_from> <mail_to> <mail_content>
rs-mailserver send from@yourdomain.com to@yourdomain.com "email contents"
Starting SMTP server:
Usage:
rs-mailserver recv <server_domain> [redis_addr] [listen_address]
rs-mailserver recv yourdomain.com redis://localhost:6379 0.0.0.0:25
$ rs-mailserver recv yourdomain.com
SMTP Server started. Listening to 0.0.0.0:25 (yourdomain.com)
$ rs-mailserver send localhost:25 from@yourdomain.com to@yourdomain.com "email contents to send"
Ok