My company currently uses Google Apps for email. I can configure Google Apps to forward all outgoing email through a relay server. I can also point my MX records at this server and have it forward incoming mail onto Google. Therefore I can configure Postfix act as a proxy for all email that is both sent to and from our users. This part is done and works fine. However, I'm not sure how to retain a full copy of each message that passes through it.

I'm interested in doing this so that all email to/from customers can be dumped into our CRM system so they're searchable by everyone in our company who might talk to a customer. The most common way of doing this is to have a "always BCC" setting specified in Postfix. However, this would only archive email sent to customers, not email received from them. Does anyone have any suggestions? Thank you!

  • 3
    If all submitted mail passes through ppostfix, and all received mail is forwarded to postfix, WHY are you using Google Apps, again ?
    – adaptr
    Jul 13, 2012 at 12:09

1 Answer 1


You're mistaken - all mail is received, all mail is delivered.

As documented, always_bcc defines an address where copies of all mail handled by postfix are sent to.


For better control over this process, use sender_bcc_maps and recipient_bcc_maps; some judicious use of regex maps allows you to copy the messages to the same user on an archive domain - for both senders and recipients, like so:

sender_bcc_maps = regexp:/etc/postfix/archive_domain
recipient_bcc_maps = regexp:/etc/postfix/archive_domain

In /etc/postfix/archive_domain:

/^([^@]+)\@example\.com$/    $1@archive.example.com

You can now handle mail to @archive.example.com however you please.


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.