3 ms·
yeah but setting up postfix is not simple. Is there an easier thing to install that just listens on 25 and prints out the text of all incoming messages to stdou
by andrewfromx 3y ago
yeah but setting up postfix is not simple. Is there an easier thing to install that just listens on 25 and prints out the text of all incoming messages to stdout?
- pwg 3y agoSetting up postfix to be a receiver is actually quite straightforward. Most of the defaults can be left alone, and you'd just need to edit one config file (main.cf) and the comments provided in main.cf all but guide you through the process. What you'd need to edit relates to the aspects that are unique to your server (domain name, domains it should receive email for, etc.).
- mytailorisrich 3y agoYou could do as LinuxBender suggests but roll out a simple Python SMTP server (there's a standard module) instead of Postfix.
- LinuxBender 3y agoI agree with pwg that postfix is fairly straight forward but to answer your question there are debugging programs that capture email such as mailpit [1] but I don't know if you would consider that to be easier. I have not tried it out yet as I have always used smtp-sink for debugging part of postfix tools. Mailpit has a nifty web UI and claims to process 70 to 100 emails per second. The reason I suggested Postfix is due to the nature of it being on many internet facing servers and being battle-hardened over the decades and having started off very secure. Anything else should probably be confined behind bubblewrap and AppArmor or SELinux. Regardless of what tool you end up using consider adding firewall rules to explicitly block outbound SMTP in the event someone finds a way to relay through whatever tool you end up using as a bumper-guard against configuration mistakes and bugs. [1] - https://github.com/axllent/mailpit https://github.com/axllent/mailpit