Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

Open to any and all suggestions!

share|improve this question
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.