Trying to enable fuzzy hashes for rspamd
parent
50f2ea66c8
commit
12294a6e5a
@ -1,15 +1,12 @@
|
||||
FROM alpine:edge
|
||||
|
||||
RUN apk add --no-cache python py-jinja2 rspamd rspamd-controller rspamd-proxy ca-certificates
|
||||
RUN apk add --no-cache python py-jinja2 rspamd rspamd-controller rspamd-proxy rspamd-fuzzy ca-certificates
|
||||
|
||||
RUN mkdir /run/rspamd
|
||||
|
||||
COPY conf/ /conf
|
||||
COPY start.py /start.py
|
||||
|
||||
# Temporary fix to remove references to rspamd-fuzzy for now
|
||||
RUN sed -i '/fuzzy/,$d' /etc/rspamd/rspamd.conf
|
||||
|
||||
EXPOSE 11332/tcp 11334/tcp
|
||||
|
||||
CMD /start.py
|
||||
|
@ -0,0 +1,34 @@
|
||||
rule "local" {
|
||||
# Fuzzy storage server list
|
||||
servers = "localhost:11335";
|
||||
# Default symbol for unknown flags
|
||||
symbol = "LOCAL_FUZZY_UNKNOWN";
|
||||
# Additional mime types to store/check
|
||||
mime_types = ["application/*"];
|
||||
# Hash weight threshold for all maps
|
||||
max_score = 20.0;
|
||||
# Whether we can learn this storage
|
||||
read_only = no;
|
||||
# Ignore unknown flags
|
||||
skip_unknown = yes;
|
||||
# Hash generation algorithm
|
||||
algorithm = "mumhash";
|
||||
|
||||
# Map flags to symbols
|
||||
fuzzy_map = {
|
||||
LOCAL_FUZZY_DENIED {
|
||||
# Local threshold
|
||||
max_score = 20.0;
|
||||
# Flag to match
|
||||
flag = 11;
|
||||
}
|
||||
LOCAL_FUZZY_PROB {
|
||||
max_score = 10.0;
|
||||
flag = 12;
|
||||
}
|
||||
LOCAL_FUZZY_WHITE {
|
||||
max_score = 2.0;
|
||||
flag = 13;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
group "fuzzy" {
|
||||
max_score = 12.0;
|
||||
symbol "LOCAL_FUZZY_UNKNOWN" {
|
||||
weight = 5.0;
|
||||
description = "Generic fuzzy hash match";
|
||||
}
|
||||
symbol "LOCAL_FUZZY_DENIED" {
|
||||
weight = 12.0;
|
||||
description = "Denied fuzzy hash";
|
||||
}
|
||||
symbol "LOCAL_FUZZY_PROB" {
|
||||
weight = 5.0;
|
||||
description = "Probable fuzzy hash";
|
||||
}
|
||||
symbol "LOCAL_FUZZY_WHITE" {
|
||||
weight = -2.1;
|
||||
description = "Whitelisted fuzzy hash";
|
||||
}
|
||||
}
|
@ -1,3 +1,4 @@
|
||||
type = "controller";
|
||||
bind_socket = "*:11334";
|
||||
password = "mailu";
|
||||
secure_ip = "{{ FRONT_ADDRESS }}";
|
||||
|
@ -0,0 +1,5 @@
|
||||
type = "fuzzy";
|
||||
count = 1;
|
||||
backend = "redis";
|
||||
expire = 90d;
|
||||
allow_update = ["127.0.0.1"];
|
@ -1 +1,2 @@
|
||||
type = "normal";
|
||||
enabled = false;
|
||||
|
Loading…
Reference in New Issue