Ignore:
Timestamp:
2012-03-23T12:19:58+01:00 (4 years ago)
Author:
jow
Message:

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@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/package/dnsmasq/files/dnsmasq.init

    r31056 r31057  
    371371} 
    372372 
     373dhcp_mx_add() { 
     374        local cfg="$1" 
     375 
     376        [ -n "$domain" ] || return 0 
     377 
     378        config_get relay "$cfg" relay 
     379        [ -n "$relay" ] || return 0 
     380 
     381        config_get pref "$cfg" pref 0 
     382 
     383        local service="$domain,$relay,$pref" 
     384 
     385        append args "--mx-host=$service" 
     386} 
     387 
    373388dhcp_cname_add() { 
    374389        local cfg="$1" 
     
    405420        config_foreach dhcp_domain_add domain 
    406421        config_foreach dhcp_srv_add srvhost 
     422        config_foreach dhcp_mx_add mxhost 
    407423        config_foreach dhcp_add dhcp 
    408424        config_foreach dhcp_cname_add cname 
Note: See TracChangeset for help on using the changeset viewer.