mirror of
https://github.com/YunoHost/yunohost.git
synced 2024-09-03 20:06:10 +02:00
[enh] Use named var in i18n
This commit is contained in:
parent
d8feb1b72a
commit
bb162662c6
2 changed files with 13 additions and 9 deletions
|
@ -62,17 +62,21 @@ class MailDiagnoser(Diagnoser):
|
|||
|
||||
# Are IPs blacklisted ?
|
||||
self.logger_debug("Running RBL detection")
|
||||
blacklisted_details = tuple(self.check_blacklisted(self.get_public_ip(4)))
|
||||
blacklisted_details += tuple(self.check_blacklisted(self.get_public_ip(6)))
|
||||
ipv4 = Diagnoser.get_cached_report_item("ip", {"test": "ipv4"})
|
||||
global_ipv4 = ipv4.get("data", {}).get("global", {})
|
||||
ipv6 = Diagnoser.get_cached_report_item("ip", {"test": "ipv6"})
|
||||
global_ipv6 = ipv6.get("data", {}).get("global", {})
|
||||
blacklisted_details = tuple(self.check_blacklisted(global_ipv4))
|
||||
blacklisted_details += tuple(self.check_blacklisted(global_ipv6))
|
||||
if blacklisted_details:
|
||||
yield dict(meta={},
|
||||
yield dict(meta={"test": "mail_blacklist"},
|
||||
status="ERROR",
|
||||
summary=("diagnosis_mail_blacklist_nok", {}),
|
||||
details=blacklisted_details)
|
||||
summary="diagnosis_mail_blacklist_nok",
|
||||
details=list(blacklisted_details))
|
||||
else:
|
||||
yield dict(meta={},
|
||||
yield dict(meta={"test": "mail_blacklist"},
|
||||
status="SUCCESS",
|
||||
summary=("diagnosis_mail_blacklist_ok", {}))
|
||||
summary="diagnosis_mail_blacklist_ok")
|
||||
|
||||
# SMTP reachability (c.f. check-smtp to be implemented on yunohost's remote diagnoser)
|
||||
|
||||
|
@ -110,7 +114,7 @@ class MailDiagnoser(Diagnoser):
|
|||
pass
|
||||
|
||||
yield ('diagnosis_mail_blacklisted_by',
|
||||
(ip, blacklist, reason))
|
||||
{'ip': ip, 'blacklist': blacklist, 'reason': reason})
|
||||
|
||||
def get_public_ip(self, protocol=4):
|
||||
# TODO we might call this function from another side
|
||||
|
|
|
@ -188,7 +188,7 @@
|
|||
"diagnosis_mail_ougoing_port_25_blocked": "Outgoing port 25 appears to be blocked. You should try to unblock it in your internet service provider (or hosting provider) configuration panel. Meanwhile, the server won't be able to send emails to other servers.",
|
||||
"diagnosis_mail_blacklist_ok": "Your server public IP are not listed on email blacklist.",
|
||||
"diagnosis_mail_blacklist_nok": "Your server public IPs are listed on email blacklist.",
|
||||
"diagnosis_mail_blacklisted_by": "{0} is listed on {1}. Reason: {2}",
|
||||
"diagnosis_mail_blacklisted_by": "{ip} is listed on {blacklist}. Reason: {reason}",
|
||||
"diagnosis_regenconf_allgood": "All configurations files are in line with the recommended configuration!",
|
||||
"diagnosis_regenconf_manually_modified": "Configuration file <code>{file}</code> appears to have been manually modified.",
|
||||
"diagnosis_regenconf_manually_modified_details": "This is probably OK if you know what you're doing! YunoHost will stop updating this file automatically... But beware that YunoHost upgrades could contain important recommended changes. If you want to, you can inspect the differences with <cmd>yunohost tools regen-conf {category} --dry-run --with-diff</cmd> and force the reset to the recommended configuration with <cmd>yunohost tools regen-conf {category} --force</cmd>",
|
||||
|
|
Loading…
Add table
Reference in a new issue