Created
August 27, 2012 11:49
-
-
Save vitalie/3487809 to your computer and use it in GitHub Desktop.
LuaDNS - Google Apps Configuration Example (Lua)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- File: example.com.lua | |
-- Variable _a is replaced with zone name | |
-- _a = example.com | |
--- ... | |
-- Call template with domain name as parameter | |
google_apps(_a) | |
-- ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function google_apps(domain) | |
-- Set record for mail.domain.com | |
-- it will allow us to access the mail using http://mail.domain.com | |
-- instead of http://www.google.com/a/domain.com | |
cname(concat("mail", domain), "ghs.google.com") | |
-- Records required to host mail on Google Apps platform | |
mx(domain, "aspmx.l.google.com", 1) | |
mx(domain, "alt1.aspmx.l.google.com", 5) | |
mx(domain, "alt2.aspmx.l.google.com", 5) | |
mx(domain, "aspmx2.googlemail.com", 10) | |
mx(domain, "aspmx3.googlemail.com", 10) | |
-- SPF record | |
-- include Google's SPF configuration | |
txt(domain, "v=spf1 a mx include:_spf.google.com ~all") | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment