Skip to content

rspamd is using the wrong settings for add_header / rewrite_subject

When using rspamd and setting an account to a policy that is either using add header or rewrite subject, the second option is not added to the config file.

ispc_spamfilter_user_78 {
	priority = 10;
	rcpt = "x@y.com";

	apply {
		CLAM_VIRUS = 1004.5;
		JUST_EICAR = 1004.5;
		actions {
			"rewrite subject" =  4;
			reject = 4.5;
			greylist = null;
		}
	}
}

This seems to lead to a problem that the default value for add_header is used and as it is mostly higher than the reject value leads to unwanted behaviour:

Score: 8.9 leads to add_header instead of reject because default for rspamd is 6.0