[Rspamd-Users] settings.conf sections and rcpt/from
Ronny Seffner
r.seffner at seffner-schlesier.de
Fri Nov 5 11:14:45 UTC 2021
Hi rspamd users and admins,
I generate out of an database, where users can store reject + subject-rewrite levels and greylisting on/off per mail address or domain, an /etc/rspamd/local.d/settings_users.conf file, which is included in /etc/rspamd/local.d/settings.conf.
Inside this file I have a lot of individual sections, so it happens, that one address is mentioned as e.g. "rcpt" in more than one section. Now I have "strange" behaviour as "sometimes user settings work and sometimes not".
Maybe I can use an address only one time?
An exmaple:
section_subject_userA {
id = "section_subject_userA"
priority = high;
rcpt = "userA at domain.tld";
apply {
actions {
add_header = 4.0;
rewrite_subject = 4.0;
}
}
}
section_reject_userA {
id = "section_reject_userA"
priority = high;
rcpt = "userA at domain.tld";
apply {
actions {
reject = 5.8;
}
}
}
section_greylist_userA {
id = "section_greylist_userA"
priority = high;
rcpt = "userA at domain.tld";
apply {
symbols_disabled ["GREYLIST_CHECK", "GREYLIST_SAVE"]
}
}
Now mails to userA at domain.tld will only be rejected with an score from 14 (rspamd global setting) instead of 5.8.
Is it because the subject- or greylist-section matches first (or overwrites)?
As I can see, the order of sections is different in my conf from "rspamadm configdump". Does the order matter?
Doesn't the sections merge to something like:
rcpt = "userA at domain.tld";
apply {
actions {
add_header = 4.0;
rewrite_subject = 4.0;
reject = 5.8;
}
symbols_disabled ["GREYLIST_CHECK", "GREYLIST_SAVE"]
}
Do I need to use include inside section?
But how to separate actions for only "rcpt" from actions for "rcpt"+"from" pairs then?
Mit freundlichen Grüßen
Ronny Seffner
More information about the Users
mailing list