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.


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
  • That's a neat solution for simple email debugging, but we need some other features such as: * Beeing able to clear the inbox * Beeing able to imap the mail to check html-mails and attachements – orjan Aug 19 '10 at 5:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.