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

Alain de Longue stainsby_only at yahoo.com
Fri Jan 22 21:07:52 UTC 2021


I fixed it!
If local.d/milter_header.conf has extended_spam_headers = true, then the x-spam-level header is suppressed.Even if the rspamadm configtest says it is in play.

As I said in my original post, this was not the case three months ago.
So I have made an override.d/milter_headers.conf file....
# override.d/milter_headers.conf:

extended_spam_headers = false;

authenticated_headers = ["authentication-results"]

use = [ "x-spam-level", "x-spam-status", x-spamd-result ];

---||---
And now my email headers are what I want.....
Message-ID: <1296106823.3022232.1611347415760 at mail.yahoo.com>
Subject: FREE PORN
MIME-Version: 1.0
Content-Type: multipart/alternative; 
	boundary="----=_Part_3022231_1320862559.1611347415759"
References: <1296106823.3022232.1611347415760.ref at mail.yahoo.com>
X-Mailer: WebService/1.1.17501 YMailNorrin Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:84.0) Gecko/20100101 Firefox/84.0
X-Spamd-Result: default: False [7.43 / 25.00];
	 HAS_REPLYTO(0.00)[portias_casket at yahoo.com];
	 DRUGS_ERECTILE(1.99)[__DRUGS_ERECTILE1];
	 FREEMAIL_FROM(0.00)[yahoo.com];
	 R_SPF_ALLOW(-0.20)[+ptr:yahoo.com];
	 RCVD_COUNT_THREE(0.00)[3];
	 DKIM_TRACE(0.00)[yahoo.com:+];
	 DMARC_POLICY_ALLOW(-0.50)[yahoo.com,reject];
	 SUBJ_ALL_CAPS(0.11)[9];
	 NO_PRESCRIPTION(2.40)[];
	 FROM_EQ_ENVFROM(0.00)[];
	 RCVD_TLS_LAST(0.00)[];
	 MIME_TRACE(0.00)[0:+,1:+,2:~];
	 IMPOTENCE(1.37)[];
	 ASN(0.00)[asn:26101, ipnet:74.6.128.0/21, country:US];
	 FREEMAIL_ENVFROM(0.00)[yahoo.com];
	 ONLINE_PHARMACY(0.65)[];
	 ARC_NA(0.00)[];
	 DRUGS_ERECTILE_OBFU(1.11)[__DRUGS_ERECTILE1];
	 REPLYTO_EQ_FROM(0.00)[];
	 FROM_HAS_DN(0.00)[];
	 R_DKIM_ALLOW(-0.20)[yahoo.com:s=s2048];
	 TO_MATCH_ENVRCPT_ALL(0.00)[];
	 BAYES_HAM(-3.00)[100.00%];
	 MIME_GOOD(-0.10)[multipart/alternative,text/plain];
	 FREEMAIL_REPLYTO(1.00)[yahoo.com];
	 RCPT_COUNT_ONE(0.00)[1];
	 DWL_DNSWL_NONE(0.00)[yahoo.com:dkim];
	 NO_MEDICAL(1.77)[];
	 TO_DN_EQ_ADDR_ALL(0.00)[];
	 RWL_MAILSPIKE_POSSIBLE(0.00)[74.6.129.124:from];
	 FUZZY_VPILL(1.01)[]
X-Spam-Level: *******
X-Spam-Status: Yes, score=7.43
X-Spam: Yes
X-Virus-Scanned: clamav-milter 0.99.2 at srvr2005b
X-Virus-Status: Clean


"I am a part of all that I have met." Tennyson. 

    On Saturday, January 16, 2021, 6:38:28 AM EST, Gerald Galster <list+rspamd at gcore.biz> wrote:  
 
 
> 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
-- 
Users mailing list
Users at lists.rspamd.com
https://lists.rspamd.com/mailman/listinfo/users
  


More information about the Users mailing list