Generated rspamd user's configuration files does not include the "add header" line contained in following template: /usr/local/ispconfig/server/conf/rspamd_users.inc.conf.master It generates file like this one: /etc/rspamd/local.d/users/test.com.conf Code: ispc_spamfilter_user_311 { priority = 5; rcpt = "@test.com"; apply { CLAM_VIRUS = 1999.0; JUST_EICAR = 1999.0; actions { reject = null; greylist = null; } } } I've modified /usr/local/ispconfig/server/conf/rspamd_users.inc.conf.master but changes aren't applied, shall I clear template cache anywhere? If so where are stored template cache? And why no "add header" is added to generated config file? Thanks for you help
Thanks, I know, but it's the same result. I've put following content in /usr/local/ispconfig/server/conf-custom/rspamd_users.inc.conf.master: Code: <tmpl_var name='record_identifier'> { priority = <tmpl_var name='priority'>; <tmpl_if name='from_email'> from = "<tmpl_var name='from_email'>"; </tmpl_if> <tmpl_if name='to_email'> rcpt = "<tmpl_var name='to_email'>"; </tmpl_if> <tmpl_if name='spam_lover'> <tmpl_if name='virus_lover'> want_spam = yes; <tmpl_else> apply { CLAM_VIRUS = 1999.0; JUST_EICAR = 1999.0; actions { reject = null; <tmpl_if name='greylisting'> <tmpl_if name='greylisting' op='==' value='y'> greylist = <tmpl_var name='greylisting_level'>; <tmpl_else> greylist = null; </tmpl_if> </tmpl_if> } } </tmpl_if> <tmpl_else> apply { <tmpl_if name='virus_lover'> CLAM_VIRUS = -999.0; JUST_EICAR = -999.0; <tmpl_else> CLAM_VIRUS = <tmpl_var name='rspamd_virus_kill_level'>; JUST_EICAR = <tmpl_var name='rspamd_virus_kill_level'>; </tmpl_if> actions { <tmpl_if name='rspamd_spam_tag_method' op='==' value='rewrite_subject'> "rewrite subject" = <tmpl_var name='rspamd_spam_tag_level'>; "add header" = null; </tmpl_if> TEST_rspamd_spam_tag_method = <tmpl_var name='rspamd_spam_tag_method'>; TEST_rspamd_spam_tag_level = <tmpl_var name='rspamd_spam_tag_level'>; <tmpl_if name='rspamd_spam_tag_method' op='==' value='add_header'> "add header" = <tmpl_var name='rspamd_spam_tag_level'>; "rewrite subject" = null; </tmpl_if> reject = <tmpl_var name='rspamd_spam_kill_level'>; <tmpl_if name='greylisting'> <tmpl_if name='greylisting' op='==' value='y'> greylist = <tmpl_var name='greylisting_level'>; <tmpl_else> greylist = null; </tmpl_if> </tmpl_if> } } </tmpl_if> } But then generated conf file /etc/rspamd/local.d/users/test.com.conf contains: Code: ispc_spamfilter_user_311 { priority = 5; rcpt = "@test.com"; apply { CLAM_VIRUS = 1999.0; JUST_EICAR = 1999.0; actions { reject = null; greylist = null; } } } These lines (and others) aren't included: Code: TEST_rspamd_spam_tag_method = <tmpl_var name='rspamd_spam_tag_method'>; TEST_rspamd_spam_tag_level = <tmpl_var name='rspamd_spam_tag_level'>; Why?
The file contains various conditions with if / else / elseif constructs; you do not see the lines because you put them in a place that is not "true" for the if/else conditions in the file.