Skip to content
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

[BUG] Disabling greylisting fails if you've greylist action in local.d/actions.conf #3295

Closed
1 task done
whataboutpereira opened this issue Mar 10, 2020 · 13 comments
Closed
1 task done
Labels

Comments

@whataboutpereira
Copy link
Contributor

Prerequisites

Describe the bug
My attempts to disable greylisting failed when I added enabled = false; in local.d/greylist.conf - all mails over greylist limit were indefinitely greylisted.

Looking closer I noticed I had overwritten greylist threshold with greylist = 6 in local.d/actions.conf. A combination of overwritten greylist action and disabled greylisting causes all mails over the greylist limit to be indefinitely greylisted.

Steps to Reproduce

  1. Add greylist = n; in local.d/actions.conf to change the default greylist limit of 4.
  2. Disable greylisting by adding enabled = false; to local.d/greylist.conf

Expected behavior
Greylisting should be completely disabled, but instead all mails over greylist threshold defined in local.d/actions.conf will be indefinitely greylisted.

Versions

CentOS 7
Rspamd 2.4

Additional Information

Disabling greylisting works only if there is no greylist = n; in local.d/actions.conf or it is set to greylist = null;

@vstakhov
Copy link
Member

What is indefinitely greylisted? Soft reject on all messages? If yes, then it cannot be.

@whataboutpereira
Copy link
Contributor Author

Yes, they're all soft reject'ed until I remove the action from local.d/actions.conf or set it to null.

@vstakhov
Copy link
Member

Soft rejection is added by greylist module. If it is disabled then you won't see soft rejections. Can you confirm that this module is disabled (rspamadm configdump -m)?

@whataboutpereira
Copy link
Contributor Author

Modules disabled (explicitly): greylist

Actually IIRC the UI showed soft reject, but logs show:

default: T (greylist): [7.33/15.00]

@vstakhov
Copy link
Member

So everything works as expected. No issue here.

@whataboutpereira
Copy link
Contributor Author

Do I understand correct that the "greylist" action is just blindly added when actual greylisting is disabled (because it's defined in local.d/actions.conf)?

Should it be so?

Should I make a pull request for disable greylist documentation in the FAQ cautioning that you need to remove or nullify greylist in local.d/actions.conf if it's overwritten there?

@whataboutpereira
Copy link
Contributor Author

I ran into the problem because OpenSMTPD filter-rspamd responds to both 'soft reject' and 'greylist' actions with a temporary failure.

@vstakhov
Copy link
Member

In theory, greylist action is threshold only action. It should not be added as the resulting action. I will check that and think what should be done.

@vstakhov
Copy link
Member

So the issue should be like 'do not add threshold only actions as a result'.

@whataboutpereira
Copy link
Contributor Author

Thanks for thinking with me! :)

@whataboutpereira
Copy link
Contributor Author

Would this in local.d/actions.conf avoid the problem?

greylist = {
 score = 6.0,
 flags = ["no_action"],
}

@vstakhov
Copy link
Member

                else if (i == METRIC_ACTION_GREYLIST) {
			action->flags |= RSPAMD_ACTION_THRESHOLD_ONLY|RSPAMD_ACTION_HAM;
		}

So this is already applied to greylist action. But you can try to add these flags: ["threshold_only", "ham"] to this action.

@whataboutpereira
Copy link
Contributor Author

Does METRIC_ACTION_GREYLIST apply when actual greylisting is disabled?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants