mirror of
https://github.com/mail-in-a-box/mailinabox.git
synced 2024-11-25 02:47:04 +00:00
use a better sort order for records in DNS zone files
This commit is contained in:
parent
14396e58f8
commit
dd15bf4384
@ -165,7 +165,7 @@ def build_zone(domain, zonefile, env, with_ns=True):
|
|||||||
records.append(("_dmarc", "TXT", '"v=DMARC1; p=quarantine"'))
|
records.append(("_dmarc", "TXT", '"v=DMARC1; p=quarantine"'))
|
||||||
|
|
||||||
# Sort the records. The None records *must* go first. Otherwise it doesn't matter.
|
# Sort the records. The None records *must* go first. Otherwise it doesn't matter.
|
||||||
records.sort(key = lambda rec : (rec[0] is not None, str(rec[0])))
|
records.sort(key = lambda rec : list(reversed(rec[0].split(".")) if rec[0] is not None else ""))
|
||||||
|
|
||||||
return records
|
return records
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user