Adding some notes about diagnosis items to be implemented

This commit is contained in:
Alexandre Aubin 2019-08-05 23:53:32 +02:00
parent 94f3557aeb
commit d113b6a53f
2 changed files with 30 additions and 0 deletions

View file

@ -31,6 +31,8 @@ class DNSRecordsDiagnoser(Diagnoser):
for report in self.check_domain(domain, domain == main_domain):
yield report
# FIXME : somewhere, should implement a check for reverse DNS ...
def check_domain(self, domain, is_main_domain):
expected_configuration = _build_dns_conf(domain)

View file

@ -0,0 +1,28 @@
#!/usr/bin/env python
import os
from yunohost.diagnosis import Diagnoser
class MailDiagnoser(Diagnoser):
id_ = os.path.splitext(os.path.basename(__file__))[0].split("-")[1]
cache_duration = 3600
dependencies = ["ip"]
def run(self):
return # TODO / FIXME TO BE IMPLEMETED in the future ...
# Mail blacklist using dig requests (c.f. ljf's code)
# Outgoing port 25 (c.f. code in monitor.py, a simple 'nc -zv yunohost.org 25' IIRC)
# SMTP reachability (c.f. check-smtp to be implemented on yunohost's remote diagnoser)
# ideally, SPF / DMARC / DKIM validation ... (c.f. https://github.com/alexAubin/yunoScripts/blob/master/yunoDKIM.py possibly though that looks horrible)
def main(args, env, loggers):
return MailDiagnoser(args, env, loggers).diagnose()