#smtp #dump

app smtp-dump

Receive-only SMTP server which saves every email that is sent to it

1 unstable release

0.1.0 Oct 27, 2021

#332 in Email

Apache-2.0

13KB
199 lines

SMTP-dump

Listens for SMTP connections, accepts them, and writes any emails that come through them into an inbox on the filesystem.

There are 3 uses that I know of for this:

  • You are writing a small application that needs to receive some emails and it is inconvienient to run an SMTP server and much easier to just read emails from the filesystem
  • You are doing spam research
  • You want to see if your machine has a public IP without a firewall, because within 24 hours someone will send spam via you

Install:

cargo install smtp-dump

Run as daemon:

date >> logs; bash -c 'setsid smtp-dump </dev/null &>>logs & jobs -p %1'

Check daemon:

lsof logs
lsof -i tcp:25

Stop daemon:

killall smtp-dump

Restart:

killall smtp-dump; date >> logs; bash -c 'setsid smtp-dump </dev/null &>>logs & jobs -p %1'

Dependencies

~9–19MB
~266K SLoC