[Rspamd-Users] Score/Reject on Subject Line With Regexp

Jürgen Echter j.echter at echter-kuechen-elektro.de
Thu Dec 9 19:11:55 UTC 2021

Am Donnerstag, Dezember 09, 2021 19:39 CET, schrieb Pete Long <pete at valar.uk.net>:
 Hi all,

I wonder if someone would let me know where I'm going wrong with my

I would like to either score, reject or greylist (doesn't matter which
one right now as I need to get the syntax down) incoming email based
entirely on a subject line regular expression.

Here's a current multimap.conf excerpt which I think is trying to match
on the whole content of the mail and not just the subject line.

type = "content";
filter = "full";
map = "/usr/local/etc/rspamd/local.d/common.spam.regexp.map";
action = greylist;
regexp = true;

Previously I have used 'headers' for the 'type' but I'm not sure if the
Subject line in an email is actually part of the body.


Pete.Hi Pete,

i use Subject=/something/i{header} and it works.

But i don't use it in a map, as that didn't work for me.

I use /etc/rspamd/local.d/regexp.conf

    re = 'Subject=/something/i{header}',
    score = 10.0,
    description = 'some rule description',

More information about the Users mailing list