Gnus development mailing list
 help / color / mirror / Atom feed
From: Christian Lynbech <christian@defun.dk>
To: Andrew Cohen <acohen@ust.hk>
Cc: ding@gnus.org
Subject: Re: Handling spam
Date: Wed, 22 Mar 2023 15:37:17 +0100	[thread overview]
Message-ID: <m2wn38q2ci.fsf@defun.dk> (raw)
In-Reply-To: <87v8itp5nm.fsf@ust.hk> (Andrew Cohen's message of "Wed, 22 Mar 2023 16:11:09 +0800")

Thanks for the hint, I guess this is then shifting the analysis to work
on the formatted message rather than the raw.

It will actually not be hard to change my workflow to work on the
formatted message (all uncaught spam is manually moved to a separate
folder which I then process with a command I have written myself, this
command takes care to go to the raw message but I can just not do that).

                               /Christian

-----------------------
On Wed, Mar 22 2023, Andrew Cohen wrote:

>>>>> "CL" == Christian Lynbech <christian@defun.dk> writes:

    CL> Does any of you use gnus to handle spam, and if so, how do you
    CL> do it?  I have for quite some time been using the spam-stat
    CL> library that is bundled with emacs, but it is not working so
    CL> well for me.

[...]

    CL> So I am not sure what to do, either I need to teach the split
    CL> rule to look at the raw message or I need to retrain my spam
    CL> detection on formatted messages, something I can certainly do
    CL> but which perhaps is less efficient in distinguishing between
    CL> spam and non-spam. Certainly, being able to quickly process
    CL> whole directories is rather convenient.

You need to look at 'spam-stat-washing-hook:
  "Hook applied to each message before analysis."

With this you can manipulate the article before the spam analysis. A
common choice is

(require 'spam-wash)
(add-hook 'spam-stat-washing-hook 'spam-wash)

which will decode MIME encodings before doing the spam analysis.  I
don't recall if it deals with html email but you should be able to
modify the function 'spam-wash easily enough to do what you want.

Best,
Andy
-- 
Andrew Cohen


  reply	other threads:[~2023-03-22 14:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22  7:49 Christian Lynbech
2023-03-22  8:11 ` Andrew Cohen
2023-03-22 14:37   ` Christian Lynbech [this message]
2023-03-22 12:06 ` Byung-Hee HWANG
2023-03-22 14:33   ` Christian Lynbech
2023-03-23 13:31   ` Emanuel Berg
2023-04-23 19:28     ` Christian Lynbech
2023-03-22 17:27 ` Peter Münster

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=m2wn38q2ci.fsf@defun.dk \
    --to=christian@defun.dk \
    --cc=acohen@ust.hk \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).