Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am looking to see if anything exists that would allow us to capture all outgoing email on a machine -- for example, in a staging environment -- and drop it in a single place, which ideally would be something we could check with a mail client.

Currently we're doing this on the software level (if environment is staging, rewrite address) which is a bit ugly and leads to errors.

The servers are currently on Debian Linux, using exim as the mail transport.

share|improve this question
up vote 1 down vote accepted

If you want to copy it, add an additional transport which writes the data where you want it. You have a choice of formats: mbox, Maildir, BSMTP, and other. Add this as a shadow transport to the appropriate transports. You may want to use a router to select a custom transport with the shadow transport defined.

If you just want to capture the mail use a router to select an new or existing transport to save the output as above.

Adding routers and transports may be easier to implement using a split configuration. This will be stable over upgrades.

share|improve this answer

I realize you are using exim, but you may want to consider a switch to postfix for this. Postfix has an always_bcc configuration setting that makes this super simple. Details in the postfix faq.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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