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.

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!

share|improve this question
1  
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 '12 at 12:09

1 Answer 1

up vote 8 down vote accepted

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.

Everything.

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.

share|improve this answer
    
Thank you for the explanation. –  jamieb Jul 16 '12 at 18:03

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.