update provider database, add yggmail and mail2tor (#2608)

* allow dotless domains and hostnames

* update provider database

ran ./src/provider/update.py ../provider-db/_providers/ > src/provider/data.rs
to pull in recent changes from https://github.com/deltachat/provider-db
This commit is contained in:
bjoern
2021-08-20 10:48:27 +02:00
committed by GitHub
parent 5399c9151d
commit 339d46ecf0
2 changed files with 57 additions and 5 deletions

View File

@@ -63,7 +63,7 @@ def process_data(data, file):
raise TypeError("no domains found")
for domain in data["domains"]:
domain = cleanstr(domain)
if domain == "" or domain.count(".") < 1 or domain.lower() != domain:
if domain == "" or domain.lower() != domain:
raise TypeError("bad domain: " + domain)
global domains_set
@@ -84,7 +84,7 @@ def process_data(data, file):
for s in data["server"]:
hostname = cleanstr(s.get("hostname", ""))
port = int(s.get("port", ""))
if hostname == "" or hostname.count(".") < 1 or port <= 0:
if hostname == "" or hostname.lower() != hostname or port <= 0:
raise TypeError("bad hostname or port")
protocol = s.get("type", "").upper()