mirror of
https://github.com/craigerl/aprsd.git
synced 2024-12-19 08:05:56 -05:00
Disable MX record validation
This patch disables the MX record checking for email address shortcuts. verizon is a shit smtp host that won't let you check emails as existing/valid. Email validation still is checked against RFC based regex for email address as well as blacklist checking. TODO(hemna): make this optionally enabled by config file.
This commit is contained in:
parent
7423df6b25
commit
e6dee3a5b0
@ -88,15 +88,16 @@ def validate_shortcuts(config):
|
||||
)
|
||||
delete_keys = []
|
||||
for key in shortcuts:
|
||||
LOG.info("Validating {}:{}".format(key, shortcuts[key]))
|
||||
is_valid = validate_email(
|
||||
email_address=shortcuts[key],
|
||||
check_regex=True,
|
||||
check_mx=True,
|
||||
check_mx=False,
|
||||
from_address=config["smtp"]["login"],
|
||||
helo_host=config["smtp"]["host"],
|
||||
smtp_timeout=10,
|
||||
dns_timeout=10,
|
||||
use_blacklist=False,
|
||||
use_blacklist=True,
|
||||
debug=False,
|
||||
)
|
||||
if not is_valid:
|
||||
|
Loading…
Reference in New Issue
Block a user