adding gmail MX automatically?

Lem0nHead

Verified User
Joined
Nov 28, 2004
Messages
265
hello

there's a growing demand for users wanting to set their domains MX records to gmail's ones
any ideas on how to make it easy for users and compatible with DA updates?

maybe on the mail management adding a link to an external script that would do that?

thanks
 
If admin turns on DNS Control for the domain it's easy; the user just uses the MX Records facility.

If you mean complete automation where the user just checks gmail that would turn into a nightmare if gmail ever changed anything; it would put the onus on DA staff to be responsible for what DA does.

Jeff
 
hello Jeff

in fact I mean complete automation, but I don't mean DA should do it (in fact it shouldn't, unless it's suppored and many other famous mails get this feature too, what's not simple)... my idea is to do it myself, but I don't know the easiest way...
maybe a DA Plugin to do that? could that plugin get called on mail management section?
 
Hello,

If you want all users to have this MX record, you can put it in /usr/local/directadmin/data/templates/dns_mx.conf (change the default value). This only applies to new domains, but will apply to *all*new domains.

The guide for plugins is here:
http://www.directadmin.com/features.php?id=370
Install the hello_world.tar.gz plugin to learn how they work (they're very simple). Plugins give the user access to so things... with that you can use the API (assuming they have dns control) to use this:
http://www.directadmin.com/features.php?id=626
where CMD_API_DNS_CONTROL is the user level access for it. You can make any dns changes to their domain with this tool.
www.directadmin.com/api.html for more info. Use the php communication class for this, as the hard work is already done for you.

John
 
I'd love to see a simple activate/de-activate gmail mx settings plugin.

That MIGHT be challenging - tho it'd be a welcome feature. The problem, as I see it, is that the DNS zones are owned by root - so the DA admin probably wouldn't be able to change them.

The example above could be handled easily enough I guess - just a quick bash script run as root to make the changes on an individual basis.

Code:
perl -pi -e "s#10 mail#10 gmailsetting1.com.#g" /var/named/DOMAIN.com.db
echo "mxrecord2"        >>/var/named/DOMAIN.com.db
echo "mxrecord3"        >>/var/named/DOMAIN.com.db
echo "mxrecord4"        >>/var/named/DOMAIN.com.db
 
That MIGHT be challenging - tho it'd be a welcome feature. The problem, as I see it, is that the DNS zones are owned by root - so the DA admin probably wouldn't be able to change them.

The API is really underestimated.

Use a combination of the following:
http://www.directadmin.com/features.php?id=699
http://www.directadmin.com/features.php?id=504

We have implemented a similar solution in our customer portal; though specific towards certain IP addresses. Don't forget to turn of the MX setting. In order to do so, you would need to use the API under the users login information. I believe you could use admin|user for that in the API as well.
 
Back
Top