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.
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.
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.