Map does not take effect

306 views
Skip to first unread message

Love is going on li

unread,
Sep 13, 2018, 11:17:24 PM9/13/18
to rspamd
Version 1.7.9

This is the configuration

[root@rspamd2 rspamd]# cat local.d/multimap.conf 
# local.d/multimap.conf
#
#
# Text sensitive word filter

#Content filters
#text - decoded and converted text parts (without HTML tags but with newlines)
CONTENT_BLACKLISTED {
  type = "content";
  filter = "text";
  map = "file:///etc/rspamd/local.d/map/content.map";
  action = "add header";
  regexp = true;
}

# matches any header specified (must have header = "Header-Name" configuration attribute)
# header = "Return-Path";
# filter = "email";email or email:addr - parse header value and extract email address from it (Somebody <us...@example.com> -> us...@example.com)
# black
USEREMAIL_BLACKLISTED {
  type = "header";
  header = "Return-Path";
  prefilter = true;
  filter = "email";
  map = "file:///etc/rspamd/local.d/map/black_useremail_list.map";
  action = "reject";
}
USEREMAIL_WHITELISTED {
  type = "header";
  header = "Return-Path";
  filter = "email";
  map = "file:///etc/rspamd/local.d/map/white_useremail_list.map";
  action = "accept";
}
# filter = "email:domain";parse header value as email address and extract domain part from it (Somebody <us...@example.com> -> example.com)
# black
FROM_BLACKLISTED {
  type = "header";
  header = "Return-Path";
  filter = "email:domain";
  map = "file:///etc/rspamd/local.d/map/black_domain_list.map";
  action = "reject";
}
# white
FROM_WHITELISTED {
  type = "header";
  header = "Return-Path";
  filter = "email:domain";
  map = "file:///etc/rspamd/local.d/map/white_domain_list.map";
  action = "accept";
}

# matches IP of the host that performed message handoff (against radix map)
# black
IP_BLACKLISTED {
  type = "ip";
  prefilter = true;
  map = "file:///etc/rspamd/local.d/map/ip_black_list.map";
  action = "add header";
}
# white
IP_WHITELISTED {
  type = "ip";
  prefilter = true;
  map = "file:///etc/rspamd/local.d/map/ip_white_list.map";
  action = "accept";
}


This is the content, Not take effect
[root@rspamd2 rspamd]# cat /etc/rspamd/local.d/map/content.map
# decoded and converted text parts (without HTML tags but with newlines)
#
# black body filters
郵件即將過期
郵箱已經滿了
威尼斯
提款无限次
提款随时到账
安心娱乐
邀您注
荷官
入款无上限
六合彩
注册領取

Only IP_WHITELISTED takes effect

QQ截图20180914104110.png



This is the webpage

QQ截图20180914104232.png


It was normal before, is it the reason for the upgrade?
Please help me, thank you

Love is going on li

unread,
Sep 13, 2018, 11:28:01 PM9/13/18
to rspamd
The pre-upgrade log

1.png


Marco Tomasi

unread,
Sep 21, 2018, 11:29:08 AM9/21/18
to rspamd
use

  type = "from";
  filter
= "email:domain";

that works and (as explained  https://rspamd.com/doc/modules/multimap.html#map-types )   # from - matches envelope from (or header From if envelope from is absent)

hth 
Reply all
Reply to author
Forward
0 new messages