-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diagnosis incorrectly report IP blacklist on Hostkarma #1873
Comments
I’m concerned too by this issue, what is strange is that sometimes it disappear and come back 2-3 days after. |
On our side, we always have this warning. The Yunohost reason is the one sent by Hostkarma, but it should not reach this step.
|
ContextThe part of the code with the bug is here: https://github.com/YunoHost/yunohost/blob/d14c4820868d11fe3b9894de7a7e6e16f0b62d21/data/hooks/diagnosis/24-mail.py#L208 Currently, we make a dig request on the DNSBL and if we have no return we consider we are not blacklisted. Hostkarma seems in certain case return a code like 127.0.0.5 or 127.0.0.1 to indicate it's not blacklisted: http://wiki.junkemailfilter.com/index.php/Spam_DNS_Lists#How_to_use_the_Lists So here 127.0.0.5 means "maybe whitelisted", so we shouldn't indicate the tested IP is blacklisted. EDIT: SpamRats is concerned to, some time it return 127.0.0.50 but it doesn't mean listed, only 127.0.0.36, 127.0.0.37, 127.0.0.38 means you are listed on spamrats. How to fixEnvironmentThis issue is small enough to be fixed on a simple yunohost test instance. However you can use ynh-dev if you want. Adapt the DNSBL list to put info about non blacklisted return codeTo fix this, you have to add non blacklist return code in this file. Those return code can be different for each DNSBL: You can add for example a key Change the if condition to go to the next DNSBL and not trigger the alertNext, it's needed to adapt the code to get the return code (currently we ignore it with the specific And the condition to Test your changeAfter that you can test your change to be sure it brokes anything by adding your reverse public ip concatenate with the hostkarma server in the /etc/hosts file.
In this case put in /etc/hosts
Don't forget to restart yunohost-api if you test by web admin (however it seems easier to test by command line. Next, feel free to git commit and make your PR. |
I sent a fix proposal! |
Closing, should be fixed by YunoHost/yunohost#1375 |
EDIT from ljf: This is a good first issue for a new contributor. You can find some instructions to fix this issue if you have some basic skills in python.
Describe the bug
According to the Yunohost diagnosis, our IPv4 is blacklisted on Hostkarma.
However, either manually run the DNS check or asking Hostkarma for removal says the IP is not blacklisted.
Context
Steps to reproduce
Expected behavior
The diagnosis should not report our IP.
Running the DNS lookup manually says everything is OK :
The text was updated successfully, but these errors were encountered: