This article explains how to use MPP along with Postfix (or qmail or anything) to archive your incoming, outgoing and internal Google Apps mail domains. Â There are many reasons to use MPP with your Google Apps email including our advanced reporting, economical price, avoidance of vendor lock-in and flexibility beyond what Google can offer. Â The MPP Virtual Appliance can be used for this application or you can build your own MPP/Postfix server. This article will not cover the Archival setup, but only additional information on how to setup Postfix gateway.
Google provides a nice article explaining how to setup Qmail as Email gateway for Google Apps mail which also applies to using MPP and Qmail to archive Google Apps Email:
Inbound Gateway
For Postfix we'll follow the instructions for Inbound Gateway referenced above except that domain relaying for mydomain.com will be set from MPP ManagerÂ
http://mpp_host:20001 -> System -> SMTP Relay -> Add new domain using Domain: mydomain.com Host: aspmx.l.google.com and Check MX record NOT checked.
Note: Please set MX record to MPP host (hostname, NOT IP) and also Inbound Gateway setting in Google Apps panel as described in article
http://www.google.com/support/a/bin/answer.py?hl=en&answer=60730.
 Outbound GatewayThe Outbound Gateway should allow relaying if mail from Google Apps would be sent through MPP/Postfix host. To identify IP's that should be allowed to relay please use from Command Line/Terminal:
dig txt _spf.google.com | grep spf;_spf.google.com.      IN   TXT
_spf.google.com.   300   IN   TXT   "v=spf1 ip4:216.239.32.0/19 ip4:64.233.160.0/19 ip4:66.249.80.0/20 ip4:72.14.192.0/18 ip4:209.85.128.0/17 ip4:66.102.0.0/20 ip4:74.125.0.0/16 ip4:64.18.0.0/20 ip4:207.126.144.0/20 ?all"
We'll obtain a list of network classes / IP's that should permitted to relay. Please compile a list without "ip4:" prefix: "216.239.32.0/19 64.233.160.0/19 .." and go to MPP Manager (http://mpp_host:20001) -> System -> SMTP Relay -> Advanced -> Show and add the list in IP Networks to Relay text field.
Note: Please set the Outbound Gateway setting in Google Apps panel as described in article
http://www.google.com/support/a/bin/answer.py?hl=en&answer=60730.