You've already forked Mailu
mirror of
https://github.com/Mailu/Mailu.git
synced 2025-11-23 22:04:47 +02:00
strip not necessary anymore
This commit is contained in:
@@ -312,7 +312,7 @@ class Domain(Base):
|
|||||||
def check_mx(self):
|
def check_mx(self):
|
||||||
""" checks if MX record for domain points to mailu host """
|
""" checks if MX record for domain points to mailu host """
|
||||||
try:
|
try:
|
||||||
hostnames = set(fqdn.strip() for fqdn in app.config['HOSTNAMES'].split(','))
|
hostnames = set(app.config['HOSTNAMES'].split(','))
|
||||||
return any(
|
return any(
|
||||||
rset.exchange.to_text().rstrip('.') in hostnames
|
rset.exchange.to_text().rstrip('.') in hostnames
|
||||||
for rset in dns.resolver.query(self.name, 'MX')
|
for rset in dns.resolver.query(self.name, 'MX')
|
||||||
|
|||||||
Reference in New Issue
Block a user