rspamd
rspamd copied to clipboard
`Deliver-To` header does not work
I'm using the HTTP protocol for interacting with Rspamd.
As a document write:
Defines actual delivery recipient of message. Can be used for personalized statistics and for user specific options.
https://rspamd.com/doc/architecture/protocol.html#http-headers
But when I tried it, it didn't work.
My scenario:
- Use HTTP request to
/checkV2
to check message A.
curl --location --request POST '/checkv2' \
--header 'Deliver-To: [email protected]' \
Score = 14.2
- Use HTTP request to
/learnspam
to learn message A.
curl --location --request POST '/learnspam' \
--header 'Deliver-To: [email protected]' \
// Message A has been learned
-
/checkV2
again, and score = 14.7 (changed) -
/checkV2
with headerDeliver-To: [email protected]
- Result: score = 14.7
- Expect: score = 14.2
What something I wrong?
My config
- statistic.conf
classifier "bayes" {
tokenizer {
name = "osb";
}
cache {
}
new_schema = true; # Always use new schema
store_tokens = true; # Redefine if storing of tokens is desired
signatures = true; # Store learn signatures
per_user = true; # Enable per user classifier
users_enabled = true;
min_tokens = 10;
backend = "redis";
min_learns = 0;
statfile {
symbol = "BAYES_HAM_USER";
spam = false;
}
statfile {
symbol = "BAYES_SPAM_USER";
spam = true;
}
learn_condition = 'return require("lua_bayes_learn").can_learn';
# Autolearn sample
# autolearn {
# spam_threshold = 6.0; # When to learn spam (score >= threshold)
# ham_threshold = -0.5; # When to learn ham (score <= threshold)
# check_balance = true; # Check spam and ham balance
# min_balance = 0.9; # Keep diff for spam/ham learns for at least this value
#}
.include(try=true; priority=1) "$LOCAL_CONFDIR/local.d/classifier-bayes.conf"
.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/classifier-bayes.conf"
}
Maybe we can add the context: Integrating Rspamd with Apache James
Our rspamd configdump: https://pastebin.com/xSrnwmKm
Can someone please have a look at this? Is there any possible issue with the per-user Bayes feature?
Hello,
Any feedback on this?
Hi, This is actually not an issue of Rspamd but rather our Rspamd Bayes configuration issue. rf: https://github.com/apache/james-project/pull/1269#discussion_r1003128895 Thanks for your support ^.^ Please close this issue.