Configure TinyDNS (djbdns) To Use Google Apps Email Service

Posted 1542 days ago - Debian, Free Stuff

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

Tags: , , , , , ,

Click Here to Submit a Comment

Permalink / Last Modified:

Support Nullamatix.com:

See Also:

  • 03/11/2008 -- A Shopping Cart Solution Worth Investing In
    Excerpt: "In an effort to increase my on-line earnings, I began researching Ecommerce store front solutions. After reviewing several options, my search came to an end as soon as I found Ashop's shopping cart software. The administration panel is powerful and feature ..."
  • 01/22/2008 -- How To Create A CNAME Record In TinyDNS
    Excerpt: "This article was inspired by Google Analytics. Several people manage to reach my site using the search term, "tinydns cname howto" so I decided to create a short video demonstrating how to do so."
  • 11/27/2007 -- Dell Diagnostic Beep Code Troubleshooting Chart
    Excerpt: "Those beeps your computer emits at startup, yea, they mean something. If you're having difficulty figuring out why your Dell desktop, tower, or mini tower won't boot, take a look at this chart. Dell also has a diagnostics utility and can provide excellent ..."
  • 10/08/2007 -- Microsoft Sharepoint Portal Server 2003 is not Customizable
    Excerpt: "The wonderful organization I'm employed with decided Microsoft's Office Sharepoint Portal Server 2003 was the ideal solution for a flexible, easy to maintain, secure, internal content management system. Oh how wrong they were. Last week I was asked to add a ..."

5 (Comments|Trackbacks)

[ RSS feed | Trackback URI | Leave a Comment ]

collapse John Doe # @ 2009-04-02 13:19:29

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

collapse Guy Patterson # @ 2009-04-23 06:57:41

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.

 
 
collapse Calin Damian # @ 2010-01-06 18:18:32 Subscribed Via Email

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

collapse Guy Patterson # @ 2010-01-06 18:37:44

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 :D

Regards,

Guy

 
 

Leave a Comment

Comments are moderated prior to showing up. If your comment does not show up immediately, please do not attempt to resubmit. If you're redirected to the original post after pressing "Add Comment", your comment was successfully entered into the moderation queue.

Trackback Responses to This Post: