[Rspamd-Users] header checks with regexp to add +score via multimap

G.W. Haywood rspamd at jubileegroup.co.uk
Tue Apr 22 13:29:31 UTC 2025


Hi there,

On Tue, 22 Apr 2025, Florian Piekert via Users wrote:

> I am sick of those google groups spam messages and want to give all messages 
> that have the
>
> X-Google-Group-Id:
>
> Header entry a +5 penalty in its scoring.
>
> But how.
>
> I tried
>
> SUBJECT_SOFT_BLACK_HEADER_REGEX {
> type = "header";
> header = "regexp:/^X\-Google\-Group\-Id:*$/";
> regexp = true;
> map = "$LOCAL_CONFDIR/local.d/blacklist.header_soft_regexp.map";
> score = 5.0;
> }
> ...

Your regex requires that zero or more colons (and no other characters)
appear between the character 'd' in "Id" and the end of the line.  If
I understand what you're trying to do with that regex, you need a dot
before the asterisk to match any number of any characters between the
colon and the end of the line.

-- 

73,
Ged.


More information about the Users mailing list