[Rspamd-Users] x-spam-level header removed?

Gerald Galster list+rspamd at gcore.biz
Sat Jan 16 11:38:02 UTC 2021


> Do I understand you correctly that you ALWAYS want the header to be added? I don't know how to do that, maybe you have to set "remove = 0" for that header?

In local.d/milter_headers.conf I have:

use = ["mseu-x-spam-score"];

custom {
   mseu-x-spam-score = <<EOD
     return function(task, common_meta)
       local sc = common_meta['metric_score'] or task:get_metric_score()
       -- return no error
       return nil,
       -- header(s) to add
       {['X-Spam-Score'] = string.format('%.2f', sc[1])},
       -- header(s) to remove
       {['X-Spam-Score'] = 1},
       -- metadata to store
       {}
   end
EOD;
}


This adds a custom X-Spam-Score header, maybe you could modify it to show whatever you need.

Best regards
Gerald


More information about the Users mailing list