MailIgnore section can contains simple hostnames

it's no longer needed to put host.subdomain
This commit is contained in:
Gilles Grandou 2019-12-16 18:40:41 +01:00
parent 0616e22e0c
commit 11c20250b9

View File

@ -33,7 +33,8 @@ def load_conf():
zone_subdomain = conf['Zone']['subdomain'].lower() zone_subdomain = conf['Zone']['subdomain'].lower()
mail_from = conf['Mail']['from'] mail_from = conf['Mail']['from']
mail_to = conf['Mail']['to'] mail_to = conf['Mail']['to']
mail_ignore_list = [ host for host in conf['MailIgnore'] ] mail_ignore_list = [ host.lower() for host in conf['MailIgnore'] ]
mail_ignore_list = [ '.'.join([h, zone_subdomain]) if not h.endswith('.'+zone_subdomain) else h for h in mail_ignore_list ]
hosts_list = [ host.lower() for host in conf['Hosts'] ] hosts_list = [ host.lower() for host in conf['Hosts'] ]
hosts_ipv4_nat_list = [ host.lower() for host in conf['NatHosts'] ] hosts_ipv4_nat_list = [ host.lower() for host in conf['NatHosts'] ]