[Rspamd-Users] Multimap - Map content

Gerald Galster list+rspamd at gcore.biz
Fri Jun 7 18:41:13 UTC 2024


> First of all, I'd like to thank you for your valuable mails regarding multimaps; learned a lot!

You're welcome.

>> [...]
>> 3) You could set a symbol and a score
>> 
>>  /Armut\sim\sRuhestand/ BODY_SPAM:5.82
>>  /Trades/ BODY_SPAM:0.12
>> 
>>  This is very useful. You can set a higher score for terms found in
>>  spam only.
>> 
>> 1) and 2) use the score set in multimap.conf/metrics.conf (or default score).
> 
> [...]
> I had had to add (score):
> 
> MM_BL_BODY {
>>>> 	score = 1;
> 	type = "content";
> 	filter = "oneline";
> 	multi = true;
> 	regexp = true;
> 	map = "/usr/local/etc/rspamd/local.d/MM_BL_BODY.map";
> 	description = "blacklist specific key words in body"
> }

You probably need to set some sort of default score, which you do with
score = 1 in MM_BL_BODY.

I'm using an alternative approach, not setting the score in MM_BL_BODY
but in metrics.conf:

group "MM_BL" {
	
	max_score = 10.0;

	symbol "MM_BL_BODY" {
		
		weight = 1.0;
	}

	symbol "MM_BL_FROM" {
	 	...
	}

	...
}

I group my blacklist symbols/maps and while setting individual scores (= weight in this case)
I can set a max_score for all of them in case lots of maps match.

Beware metrics.conf is deprecated and you'd better use groups.conf:

https://rspamd.com/doc/configuration/#detail

"The metrics.conf file, formerly featured in this documentation, was deprecated in version 1.7.
 It was succeeded by actions.conf and groups.conf."

https://rspamd.com/doc/faq.html#how-to-change-score-for-some-symbol

Best regards,
Gerald



More information about the Users mailing list