[Rspamd-Users] Disable outbound X-Spam header

Gerald Galster list+rspamd at gcore.biz
Tue Jun 16 13:32:42 UTC 2020


Hi,

> Some email servers rejected our email because it contained the header  X-Spam: yes 

rspamd honors externally set x-spam headers if they are not removed:

reconf['SPAM_FLAG'] = {
  re = string.format('%s || %s || %s',
      'X-Spam-Flag=/^(?:yes|true)/Hi',
      'X-Spam=/^(?:yes|true)/Hi',
      'X-Spam-Status=/^(?:yes|true)/Hi'),
  score = 5.0,
  description = "Message was already marked as spam",
  group = 'upstream_spam_filters'
}


> I am doubtful that rspamd marked my email as spam, but hey I shall check the logs when I get into work.
> 
> In the meantime, how may I stop rspamd from adding an X-Spam header to any authenticated outbound email?

If you're using milter (/etc/rspamd/local.d/milter_headers.conf), see

https://rspamd.com/doc/modules/milter_headers.html

sections local headers, authenticated headers or removing headers, like

headers {
  "X-Spam-Flag" = 0;
  "X-Spam-Status" = 0;
  "X-Spam-Report" = 0;
  "X-Spam-Level" = 0;
  "X-Spam-Checker-Version" = 0;
}

Best regards
Gerald


More information about the Users mailing list