summaryrefslogtreecommitdiff
path: root/package/dnsmasq
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-03-23 11:19:58 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-03-23 11:19:58 +0000
commitc443f3d875147cc4dd7cc81712a405efb354691b (patch)
tree65610156a8ed510a49aec07dd5795f4ff4bbef28 /package/dnsmasq
parent37478505352048f07f408c3fabc174520fb5a238 (diff)
downloadmtk-20170518-c443f3d875147cc4dd7cc81712a405efb354691b.zip
mtk-20170518-c443f3d875147cc4dd7cc81712a405efb354691b.tar.gz
mtk-20170518-c443f3d875147cc4dd7cc81712a405efb354691b.tar.bz2
dnsmasq: add mx record support
Adding the following syntax support: config mxhost option domain mydomain.com option relay svr10.ironport.com option pref 50 and this will generate an MX record for mydomain.com pointing at the relay with a given preference. Redux: default the preference to 0 if absent. Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com> SVN-Revision: 31057
Diffstat (limited to 'package/dnsmasq')
-rw-r--r--package/dnsmasq/files/dnsmasq.init16
1 files changed, 16 insertions, 0 deletions
diff --git a/package/dnsmasq/files/dnsmasq.init b/package/dnsmasq/files/dnsmasq.init
index 13f1783..edd22ad 100644
--- a/package/dnsmasq/files/dnsmasq.init
+++ b/package/dnsmasq/files/dnsmasq.init
@@ -370,6 +370,21 @@ dhcp_srv_add() {
append args "-W $service"
}
+dhcp_mx_add() {
+ local cfg="$1"
+
+ [ -n "$domain" ] || return 0
+
+ config_get relay "$cfg" relay
+ [ -n "$relay" ] || return 0
+
+ config_get pref "$cfg" pref 0
+
+ local service="$domain,$relay,$pref"
+
+ append args "--mx-host=$service"
+}
+
dhcp_cname_add() {
local cfg="$1"
local cname target
@@ -404,6 +419,7 @@ start() {
config_foreach dhcp_subscrid_add subscrid
config_foreach dhcp_domain_add domain
config_foreach dhcp_srv_add srvhost
+ config_foreach dhcp_mx_add mxhost
config_foreach dhcp_add dhcp
config_foreach dhcp_cname_add cname