I’d appreciate your help with a configuration issue on my Yunohost server:
My YunoHost server
Hardware: Old computer YunoHost version: 11.0.10.2 I have access to my server : Through SSH Are you in a special context or did you perform some particular tweaking on your YunoHost instance ? : no
Description of my issue
I get a diagnosis mail from Yunohost twice a day because my reverse DNS is not configured correctly for emails. However, since I don’t have a fixed IP, I can do little about this problem and would like to suppress the error message from the Yunohost command line API.
Warning: unable to retrieve string to translate with key 'mail test=mail_fcrdns is not a diagnosis category' for default locale 'locales/en.json' file (don't panic this is just a warning)
Error: mail test=mail_fcrdns is not a diagnosis category
Is it possible to disable one single test in the mail category? If yes, what is the correct command for that?
There is something very particular going on with the reverse DNS check…
First, I tried looking up the categorization values with the diagnosis get call:
# works (in the sense of returns the current status of the check to the console):
yunohost diagnosis get mail test=mail_outgoing_port_25
yunohost diagnosis get mail test=mail_blacklist
# does not work (i.e. nothing output to the consol):
yunohost diagnosis get mail test=mail_fcrdns
I’ve been looking at the yunohost source
but did not find an obvious error. Maybe you have a hunch on where to look?
I think I found the problem:
The difference between the described get lookups is that the meta entry for mail_fcrdns has more than one value in the dictionary.
If yunohost diagnosis get uses the diagnosis_getfunction, it will call Diagnoser.get_cached_report(category, item=item) with item being the arguments it received from yunohost diagnosis get transformed into a dictionary.
Line 545 in the get_cached_report static method requires equivalence (==) of the passed item to what the cached report has as the value for the “meta” key.
This explains why it works for single criteria filter: One criterion matches the whole dictionary in the cached report “meta” value. But as soon as I only specify one of the meta keys, the lookup returns an empty dictionary. Can you double-check? I don’t have a debugable yunohost instance setup :S