Google has an amazing service that allows domain owners to basically use GMail's capabilities with a custom domain. For example, instead of having someuser@gmail.com, you can have someuser@yourdomain.com, while still reaping the benefits of GMail. Why do this? For a number of reasons:
- Less stress on your server
- Google requires TLS (SSL) for incoming and outgoing communications
- Full IMAP/SMTP support
- GMail's web interface for your domain
- Google is stable and provides excellent uptime
- Speed definitely isn't an issue
- Easier than maintaining your own incoming/outgoing mail servers. Let Google do the work!
Ok, so here's how to take advantage of all these benefits using TinyDNS (djbdns). First, if you haven't already, setup your Google Apps account by visiting: http://www.google.com/a/cpanel/domain/new. Once that's out of the away, verify domain ownership by adding some unique identifier to your CNAME records, or uploading a special HTML file (both methods are available inside the google apps admin interface). Once verified, ssh to your server and open /etc/tinydns/root/data with your favorite text editor. The path on your server might be different, so use some common sense.
/etc/tinydns/root# vim data
Now add the following:
# A Records +yourdomain.com:255.255.255.1:3600 # MX Records @yourdomain.com::aspmx.l.google.com.:1:3600 @yourdomain.com::alt1.aspmx.l.google.com.:5:3600 @yourdomain.com::alt2.aspmx.l.google.com.:5:3600 @yourdomain.com::aspmx2.googlemail.com.:10:3600 @yourdomain.com::aspmx3.googlemail.com.:10:3600 @yourdomain.com::aspmx4.googlemail.com.:10:3600 @yourdomain.com::aspmx5.googlemail.com.:10:3600 'yourdomain.com:v=spf1 a mx include\072google.com, include\072googlemail.com ~all:3600 # CNAME Records CgoogleVERIFICATION-CODE-NUMBER.yourdomain.com:google.com:9800 Cmail.yourdomain.com:ghs.google.com:9800
Make sure to change 255.255.255.1 to your server's IP and yourdomain.com to the domain you registered with Google when creating your Google Apps account. Save the changes and exit. Still in /etc/tinydns/root, rebuild dns entries by typing make.
/etc/tinydns/root# make
Assuming everything went as planned, and I didn't omit any pertinent steps, http://mail.yourdomain.com/ should load a GMail type interface within a few minutes. If I did forget anything, please comment or ask questions below.
Word Count: 420



5 (Comments|Trackbacks)
[ RSS feed | Trackback URI | Leave a Comment ]
Google Mail suggests a SPF record as follows:
v=spf1 include:aspmx.googlemail.com ~all
or for TinyDNS users
v=spf1 include72aspmx.googlemail.com ~all
Source:
http://www.google.com/support/a/bin/answer.py?hl=en&answer=33786
So it might be wise to include aspmx.googlemail.com and include72google.com, include72googlemail.com
Excellent suggestion, thanks for mentioning this. Not sure why I failed to include it in the example, but it's in my dns records? Haha, oh well, thanks again.
Hello,
1. You are missing a . (dot) at the end of the last line.
2. when you look at the code it is unclear where the line should end.
3. pretty messy to copy & paste the code from the page. Please allow us to be lazy until the end
Thank you for the good job and I'd suggest to update the page in order for other user to benefit from our suggestions.
Calin
Calin,
Thanks a lot for pointing out these issues. I've updated the post, so whenever you have a chance, take a look and let me know if there's anything else missing/wrong. May need to [shift|ctrl] + refresh to pull down the new (non-cached) copy.
A good sysadmin is also a lazy sysadmin
Regards,
Guy
Leave a Comment
Trackback Responses to This Post: