I would like to configure Postfix in out dev and stage environment to only save the emails like Papercut and Neptune?
It's very important that the actual emails are not sent but only saved, to be able to check them as part of the QA work.
Server Fault is a question and answer site for system and network administrators. It only takes a minute to sign up.
Sign up to join this communityI would like to configure Postfix in out dev and stage environment to only save the emails like Papercut and Neptune?
It's very important that the actual emails are not sent but only saved, to be able to check them as part of the QA work.
Use a regular expression map to rewrite all recipients. As long as your email is submitted via SMTP, this will suffice.
In main.cf
virtual_alias_maps = regexp:/etc/postfix/recipients
In /etc/postfix/recipients
\#user@example.com is a mailbox where QA will receive email
/.+/ user@example.com
Why setup a fully fledged mail server you could just use python to do that.
python -m smtpd -n -c DebuggingServer localhost:25 | tee emails.log