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] regexp_multi changed behavior in master #4981

Closed
1 task done
aduernberger opened this issue May 23, 2024 · 8 comments
Closed
1 task done

[BUG] regexp_multi changed behavior in master #4981

aduernberger opened this issue May 23, 2024 · 8 comments
Labels

Comments

@aduernberger
Copy link
Contributor

aduernberger commented May 23, 2024

Prerequisites

Describe the bug

Configuring a regexp_multi multimap does not set the correct result score. The Symbol score is shown correctly.

Steps to Reproduce

Configure multimap

bad_word {
    type = "content";
    filter = "text";
    description = "Bad Word filter";
    map = "regexp_multi;file:///etc/rspamd/local.d/bad_word.txt";
    score = 1.0;
    symbol = "BAD_WORD";
    regexp = true;
}

bad_word.txt
spam_body.txt

Call rspamc symbols spam_body.txt.

Score: 19.26 / 6.00
Symbol: BAD_WORD (4.00)
Symbol: BAYES_SPAM (0.86)[80.00%]
Symbol: BROKEN_HEADERS (8.00)
Symbol: HFILTER_HOSTNAME_UNKNOWN (2.50)
Symbol: MIME_GOOD (-0.10)[text/plain]
Symbol: MISSING_ESSENTIAL_HEADERS (7.00)

The Symbol BAD_WORD shows a score of 4.00. But the result score is 19.26 instead of 4.00 + 0.86 + 8.00 + 2.50 + -0.10 + 7.00 = 22,26

Expected behavior

Doing the same with 3.8.4 yields the correct score.

Score: 22.26 / 6.00
Symbol: BAD_WORD (4.00)
Symbol: BAYES_SPAM (0.86)[80.00%]
Symbol: BROKEN_HEADERS (8.00)
Symbol: HFILTER_HOSTNAME_UNKNOWN (2.50)
Symbol: MIME_GOOD (-0.10)[text/plain]
Symbol: MISSING_ESSENTIAL_HEADERS (7.00)

Versions

Broken: Rspamd daemon version 3.9.0 (current master built today, same problem with master built one month ago)
Working: Rspamd daemon version 3.8.4

Both tests were done on an updated Ubuntu 22.04 Server.

Additional Information

Maybe the same issue as #4978

@dragoangel
Copy link
Contributor

dragoangel commented May 26, 2024

Hi @aduernberger, yep, I assume issue is same that I faced. I closed my issue, to not create a duplicates.

@dragoangel
Copy link
Contributor

@vstakhov can you please help with this issue?

@dragoangel
Copy link
Contributor

Hi @fatalbanana thank you for a Autotests, do you have ideas whenever this big was introduced?

@fatalbanana
Copy link
Member

Hi @fatalbanana thank you for a Autotests, do you have ideas whenever this big was introduced?

ae10366

@vstakhov
Copy link
Member

I don't see how that could be related.

@vstakhov
Copy link
Member

Also, guys, I'm on a vacation now, please do not expect any significant attention from me these days.

@fatalbanana
Copy link
Member

fatalbanana commented May 30, 2024

I don't see how that could be related.

git bisect fingered this commit

test repo

I've tried to manually verify that it wasn't perhaps fixed again by related commits.

@dragoangel
Copy link
Contributor

dragoangel commented May 31, 2024

Hi @fatalbanana thank you for a Autotests, do you have ideas whenever this big was introduced?

ae10366

I build locally Rspamd with basic reverse commit and get things working again. So yes, this is the root case. Problem somewhere there.

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

Successfully merging a pull request may close this issue.

4 participants