Skip to content
Snippets Groups Projects
Commit c443f3d8 authored by Jo-Philipp Wich's avatar Jo-Philipp Wich
Browse files

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: default avatarPhilip Prindeville <philipp@redfish-solutions.com>

SVN-Revision: 31057
parent 37478505
No related branches found
No related tags found
No related merge requests found
...@@ -370,6 +370,21 @@ dhcp_srv_add() { ...@@ -370,6 +370,21 @@ dhcp_srv_add() {
append args "-W $service" 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() { dhcp_cname_add() {
local cfg="$1" local cfg="$1"
local cname target local cname target
...@@ -404,6 +419,7 @@ start() { ...@@ -404,6 +419,7 @@ start() {
config_foreach dhcp_subscrid_add subscrid config_foreach dhcp_subscrid_add subscrid
config_foreach dhcp_domain_add domain config_foreach dhcp_domain_add domain
config_foreach dhcp_srv_add srvhost config_foreach dhcp_srv_add srvhost
config_foreach dhcp_mx_add mxhost
config_foreach dhcp_add dhcp config_foreach dhcp_add dhcp
config_foreach dhcp_cname_add cname config_foreach dhcp_cname_add cname
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment