Suppress [EMAIL: Reverse DNS] diagnosis error

Hi everyone!

I’d appreciate your help with a configuration issue on my Yunohost server:

My YunoHost server

Hardware: Old computer
YunoHost version:
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.

My attempts included things like

yunohost diagnosis ignore --filter 'mail summary=diagnosis_mail_fcrdns_dns_missing'
# or
yunohost diagnosis ignore --filter 'mail test=mail_fcrdns'

but I’d always get an error along the lines of

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?

Thanks in advance!

Cant you go in the webadmin > Diagnosis, and click the ignore button ? :neutral_face:

I’ve disabled the YunoHost API and with it the webadmin panel. But if it’s doable through the webadmin, it should also be possible from the CLI, no?

Yes but the syntax is not trivial, hence the error you’re getting because your filter is incorrect and i’m not sure what’s the appropriate syntax …


yunohost diagnosis ignore mail --filter 'test=mail_fcrdns'

or just

yunohost diagnosis ignore --filter 'test=mail_fcrdns'

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_get function, 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

My suspicion grew stronger after I could add the desired ignore filter with

yunohost diagnosis ignore --filter mail test=mail_fcrdns ipversion=4

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.