Skip to content

Commit

Permalink
[Test] MAGIC ROBOT
Browse files Browse the repository at this point in the history
  • Loading branch information
korgoth1 committed Sep 19, 2019
2 parents 01a0044 + 5bc4486 commit 28b48a6
Show file tree
Hide file tree
Showing 42 changed files with 1,024 additions and 272 deletions.
10 changes: 5 additions & 5 deletions centos/rspamd.spec
Expand Up @@ -195,13 +195,13 @@ fi
%config(noreplace) %{rspamd_confdir}/%{name}.conf
%config(noreplace) %{rspamd_confdir}/composites.conf
%config(noreplace) %{rspamd_confdir}/metrics.conf
%config(noreplace) %{rspamd_confdir}/mime_types.inc
%config(noreplace) %{rspamd_confdir}/maps.d/mime_types.inc
%config(noreplace) %{rspamd_confdir}/modules.conf
%config(noreplace) %{rspamd_confdir}/statistic.conf
%config(noreplace) %{rspamd_confdir}/common.conf
%config(noreplace) %{rspamd_confdir}/logging.inc
%config(noreplace) %{rspamd_confdir}/options.inc
%config(noreplace) %{rspamd_confdir}/redirectors.inc
%config(noreplace) %{rspamd_confdir}/maps.d/redirectors.inc
%config(noreplace) %{rspamd_confdir}/worker-controller.inc
%config(noreplace) %{rspamd_confdir}/worker-fuzzy.inc
%config(noreplace) %{rspamd_confdir}/worker-normal.inc
Expand All @@ -217,9 +217,9 @@ fi
%dir %{rspamd_pluginsdir}
%dir %{rspamd_wwwdir}
%dir %{_libdir}/rspamd
%config(noreplace) %{rspamd_confdir}/surbl-whitelist.inc
%config(noreplace) %{rspamd_confdir}/spf_dkim_whitelist.inc
%config(noreplace) %{rspamd_confdir}/dmarc_whitelist.inc
%config(noreplace) %{rspamd_confdir}/maps.d/surbl-whitelist.inc
%config(noreplace) %{rspamd_confdir}/maps.d/spf_dkim_whitelist.inc
%config(noreplace) %{rspamd_confdir}/maps.d/dmarc_whitelist.inc
%{rspamd_pluginsdir}/lib/*.lua
%{rspamd_pluginsdir}/lua/*.lua
%{rspamd_rulesdir}/regexp/*.lua
Expand Down
8 changes: 7 additions & 1 deletion conf/composites.conf
Expand Up @@ -148,7 +148,13 @@ composites {
score = 0.0;
policy = "remove_weight";
}

LEAKED_PASSWORD_SCAM {
description = "Contains BTC wallet address and scam patterns";
expression = "BITCOIN_ADDR & (LEAKED_PASSWORD_SCAM_RE | R_MIXED_CHARSET | R_EMPTY_IMAGE)";
policy = "leave";
score = 7.0;
group = "scams";
}

.include(try=true; priority=1; duplicate=merge) "$LOCAL_CONFDIR/local.d/composites.conf"
.include(try=true; priority=10) "$LOCAL_CONFDIR/override.d/composites.conf"
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 2 additions & 1 deletion conf/modules.d/mid.conf
Expand Up @@ -17,8 +17,9 @@ mid = {
source = {
url = [
"https://maps.rspamd.com/rspamd/mid.inc.zst",
"$LOCAL_CONFDIR/local.d/maps.d/mid.inc",
"$LOCAL_CONFDIR/local.d/mid.inc",
"fallback+file://${CONFDIR}/mid.inc"
"fallback+file://${CONFDIR}/maps.d/mid.inc"
];
}

Expand Down
3 changes: 2 additions & 1 deletion conf/modules.d/mime_types.conf
Expand Up @@ -16,8 +16,9 @@
mime_types {
file = [
"https://maps.rspamd.com/rspamd/mime_types.inc.zst",
"$LOCAL_CONFDIR/local.d/maps.d/mime_types.inc.local",
"${DBDIR}/mime_types.inc.local",
"fallback+file://${CONFDIR}/mime_types.inc"
"fallback+file://${CONFDIR}/maps.d/mime_types.inc"
]

# Match specific extensions to specific content types
Expand Down
2 changes: 1 addition & 1 deletion conf/modules.d/multimap.conf
Expand Up @@ -77,7 +77,7 @@ multimap {
disposable_envfrom {
type = "from";
filter = "email:domain";
map = "https://rspamd.com/freemail/disposable.txt.zst";
map = "https://maps.rspamd.com/freemail/disposable.txt.zst";
symbol = "DISPOSABLE_ENVFROM";
description = "Envelope From is a Disposable e-mail address";
score = 0.0;
Expand Down
46 changes: 46 additions & 0 deletions conf/modules.d/p0f.conf
@@ -0,0 +1,46 @@
# Please don't modify this file as your changes might be overwritten with
# the next update.
#
# You can modify '$LOCAL_CONFDIR/rspamd.conf.local.override' to redefine
# parameters defined on the top level
#
# You can modify '$LOCAL_CONFDIR/rspamd.conf.local' to add
# parameters defined on the top level
#
# For specific modules or configuration you can also modify
# '$LOCAL_CONFDIR/local.d/file.conf' - to add your options or rewrite defaults
# '$LOCAL_CONFDIR/override.d/file.conf' - to override the defaults
#
# See https://rspamd.com/doc/tutorials/writing_rules.html for details

p0f {
# Disable module by default
enabled = false;

# Path to the unix socket that p0f listens on
socket = '/var/run/p0f.sock';

# Connection timeout
timeout = 5s;

# If defined, insert symbol with lookup results
symbol = 'P0F';

# Patterns to match against results returned by p0f
# Symbol will be yielded on OS string, link type or distance matches
patterns = {
WINDOWS = '^Windows.*';
#DSL = '^DSL$';
#DISTANCE10 = '^distance:10$';
}

# Cache lifetime in seconds (default - 2 hours)
expire = 7200;

# Cache key prefix
prefix = 'p0f';

.include(try=true,priority=5) "${DBDIR}/dynamic/p0f.conf"
.include(try=true,priority=1,duplicate=merge) "$LOCAL_CONFDIR/local.d/p0f.conf"
.include(try=true,priority=10) "$LOCAL_CONFDIR/override.d/p0f.conf"
}
3 changes: 2 additions & 1 deletion conf/modules.d/phishing.conf
Expand Up @@ -25,8 +25,9 @@ phishing {
# Make exclusions for known redirectors
redirector_domains = [
"https://maps.rspamd.com/rspamd/redirectors.inc.zst:REDIRECTOR_FALSE",
"$LOCAL_CONFDIR/local.d/maps.d/redirectors.inc:LOCAL_REDIRECTOR_FALSE",
"$LOCAL_CONFDIR/local.d/redirectors.inc:LOCAL_REDIRECTOR_FALSE",
"fallback+file://${CONFDIR}/redirectors.inc:REDIRECTOR_FALSE"
"fallback+file://${CONFDIR}/maps.d/redirectors.inc:REDIRECTOR_FALSE"
];

.include(try=true,priority=5) "${DBDIR}/dynamic/phishing.conf"
Expand Down
3 changes: 2 additions & 1 deletion conf/modules.d/rbl.conf
Expand Up @@ -21,8 +21,9 @@ rbl {

url_whitelist = [
"https://maps.rspamd.com/rspamd/surbl-whitelist.inc.zst",
"$LOCAL_CONFDIR/local.d/maps.d/surbl-whitelist.inc.local",
"${DBDIR}/surbl-whitelist.inc.local",
"fallback+file://${CONFDIR}/surbl-whitelist.inc"
"fallback+file://${CONFDIR}/maps.d/surbl-whitelist.inc"
];

rbls {
Expand Down
12 changes: 8 additions & 4 deletions conf/modules.d/whitelist.conf
Expand Up @@ -18,8 +18,9 @@ whitelist {
"WHITELIST_SPF" = {
valid_spf = true;
domains = [
"$LOCAL_CONFDIR/local.d/maps.d/spf_whitelist.inc.local",
"${DBDIR}/spf_whitelist.inc.local",
"fallback+file://${CONFDIR}/spf_whitelist.inc"
"fallback+file://${CONFDIR}/maps.d/spf_whitelist.inc"
];
score = -1.0
inverse_symbol = "BLACKLIST_SPF";
Expand All @@ -28,8 +29,9 @@ whitelist {
"WHITELIST_DKIM" = {
valid_dkim = true;
domains = [
"$LOCAL_CONFDIR/local.d/maps.d/dkim_whitelist.inc.local",
"${DBDIR}/dkim_whitelist.inc.local",
"fallback+file://${CONFDIR}/dkim_whitelist.inc"
"fallback+file://${CONFDIR}/maps.d/dkim_whitelist.inc"
];
score = -1.0;
inverse_symbol = "BLACKLIST_DKIM";
Expand All @@ -39,8 +41,9 @@ whitelist {
valid_dkim = true;
domains = [
"https://maps.rspamd.com/rspamd/spf_dkim_whitelist.inc.zst",
"$LOCAL_CONFDIR/local.d/maps.d/spf_dkim_whitelist.inc.local",
"${DBDIR}/spf_dkim_whitelist.inc.local",
"fallback+file://${CONFDIR}/spf_dkim_whitelist.inc"
"fallback+file://${CONFDIR}/maps.d/spf_dkim_whitelist.inc"
];
score = -3.0;
inverse_symbol = "BLACKLIST_SPF_DKIM";
Expand All @@ -49,8 +52,9 @@ whitelist {
valid_dmarc = true;
domains = [
"https://maps.rspamd.com/rspamd/dmarc_whitelist_new.inc.zst",
"$LOCAL_CONFDIR/local.d/maps.d/dmarc_whitelist.inc.local",
"${DBDIR}/dmarc_whitelist.inc.local",
"fallback+file://${CONFDIR}/dmarc_whitelist.inc"
"fallback+file://${CONFDIR}/maps.d/dmarc_whitelist.inc"
];
score = -7.0;
inverse_symbol = "BLACKLIST_DMARC";
Expand Down

0 comments on commit 28b48a6

Please sign in to comment.