a partial solution found for keeping a mail gateway and using google apps mail

Michael Torrie torriem at chem.byu.edu
Thu Jun 28 23:57:33 MDT 2007

So it turns out there is a fairly easy and google-recommended solution
for keeping control over the MX of the domain and delivering some but
not all mail to my own server, while letting google handle the rest.
The solution involves what google calls "domain aliases."  Basically a
domain alias is simply a pseudo-subdomain of the primary domain name
that just treats e-mail addresses at the subdomain as aliases for the
addresses of the main domain. 

Here's how it works.

- Enable google mail for your domain and set the MX record to only point
to google.  Otherwise google won't activate the mail portion of google
- Add a domain alias, such as "g.mydomain.com"
- Create MX records to point mail for g.mydomain.com at google's
servers.  You don't need to implement an official, authoritative
sub-domain for this to work.  You just need an mx record for the full
domain alias.  For example,a bind entry looks like this:

g.mydomain.com.      MX  1  aspmx.l.google.com.

- Remove google's servers from the MX for the primary domain, put your
own server back in
- Use any kind of alias or routing system you want to relay mail
intended for google to username at g.mydomain.com

The downside to this is that without writing some regular expression
postfix filters, you have to have an alias in postfix (or whatever
server) for every user and nickname (what google calls an alias) that
you want to go to google's system.

As I write this, I realize that this isn't really a solution to my
original problem, which was that of relaying unknown e-mail to google.
But it is a simple solution that fits my actual needs for now.  If I
find a better pure-relay solution that doesn't need me to enter in each
and every username I want to go to google, I'll post it.


More information about the PLUG mailing list