A (work in progress!) simple Python implementation of an SMTP server, leaning heavily on protocol defined in RFC 5321.
Install the given requirements: pip install -r requirements.txt
Rename sample.env
to .env
, and reconfigure as desired.
Open two separate terminals. In both, navigate to the src
directory.
- In the first, launch the server:
python server.py
- In the second, launch the client:
python client.py
Note that the client is only for demonstration purposes. It's a very naive implementation and relies on user input for everything.
By default, the server will run on localhost:2525
(normally mailservers would
run on port 25, but that requires privileged access).
CLIENT:
HELO example.org
DATA
this is my email
woohoo!
\r\n.\r\n
QUIT