mirror of
https://github.com/chatmail/relay.git
synced 2026-05-19 20:38:05 +00:00
Revert "DNS: fix _mta-sts TXT record on initial setup"
This reverts commit 6d4af3cf0c.
This commit is contained in:
@@ -10,7 +10,6 @@ All functions of this module
|
|||||||
- can freely call each other.
|
- can freely call each other.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import datetime
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
from .rshell import CalledProcessError, shell
|
from .rshell import CalledProcessError, shell
|
||||||
@@ -35,10 +34,7 @@ def perform_initial_checks(mail_domain):
|
|||||||
|
|
||||||
# parse out sts-id if exists, example: "v=STSv1; id=2090123"
|
# parse out sts-id if exists, example: "v=STSv1; id=2090123"
|
||||||
parts = query_dns("TXT", f"_mta-sts.{mail_domain}").split("id=")
|
parts = query_dns("TXT", f"_mta-sts.{mail_domain}").split("id=")
|
||||||
if len(parts) == 2 and len(parts[1]) > 1:
|
res["sts_id"] = parts[1].rstrip('"') if len(parts) == 2 else ""
|
||||||
res["sts_id"] = parts[1].rstrip('"')
|
|
||||||
else:
|
|
||||||
res["sts_id"] = datetime.datetime.now().strftime("%Y%m%d%H%M")
|
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user