Discussion:
Monitor the emails sent in testing environment
(too old to reply)
Tair Sabirgaliev
2017-05-03 02:12:23 UTC
Permalink
Hello dear Postfix experts!

I need to have ability to monitor all the mails going out of a set of software components during test/pilot runs.
I'm using Mailcatcher (mailcatcher.me). My problem is that Mailcatcher can't forward the mail to some upstream server. I hope Postfix can suggest me some way of both (1) forward messages to Mailcatcher and (2) forward messages to some upstream mail server.

I found that 'relayhost' is not designed for multiple host, and overall, the principle behind all relay logic is to route to single host rather that 'mirror'.

Is there some non-obvious way of solving my use case?

Thanks!
Bob Nichols
2017-05-07 19:26:19 UTC
Permalink
Post by Tair Sabirgaliev
Hello dear Postfix experts!
I need to have ability to monitor all the mails going out of a set of software components during test/pilot runs.
I'm using Mailcatcher (mailcatcher.me). My problem is that Mailcatcher can't forward the mail to some upstream server. I hope Postfix can suggest me some way of both (1) forward messages to Mailcatcher and (2) forward messages to some upstream mail server.
I found that 'relayhost' is not designed for multiple host, and overall, the principle behind all relay logic is to route to single host rather that 'mirror'.
Is there some non-obvious way of solving my use case?
Thanks!
You could use the 'sender_bcc_maps' parameter to tell Postfix to add the
Mailcatcher monitoring address as a BCC recipient to all mails with your
sender domain.
--
for e-mail remove .invalid
Loading...