is there a way to pipe the output from the Python smtpd debugging server
python -m smtpd -n -c DebuggingServer localhost:1025
in a database/file?
I want to show all traffic on this port on a simple webpage. If there is a better way please let me know!
Thanks for your help.
I was able to send the mail content to a file by using output redirection like this:
python -m smtpd -n -c DebuggingServer localhost:1025 >> mail.txt
I would prefer to use | tee mail.txt instead of >> mail.txt (to also print the mail content to the command line) but that didn't work.
To your question, if you want to see all traffic on a specific port, you are probably looking for something like tcpdump:
tcpdump -i any port 1025
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With