Gnus development mailing list
 help / color / mirror / Atom feed
From: "Peter Münster" <pm@a16n.net>
To: ding@gnus.org
Subject: Re: Handling spam
Date: Wed, 22 Mar 2023 18:27:47 +0100	[thread overview]
Message-ID: <87h6uchf1o.fsf@a16n.net> (raw)
In-Reply-To: <m27cv9ql8s.fsf@defun.dk>

On Wed, Mar 22 2023, Christian Lynbech wrote:

> So, any ideas or recommendations?

A bit OT, but perhaps a valuable advice: Whatever you do, IMHO the
sender should be informed, when his message won't be read because of the
filtering. Here is my way doing that:

fetchmail (IMAP) -> procmail -> Gnus (nnml)

And in ~/.procmailrc I have something like this:

--8<---------------cut here---------------start------------->8---
:0fw
* < $SPAM_MAX_SIZE
| spamassassin

:0
* 1^1    ^X-Spam-Flag: YES
* -10^0  ^Subject:.*no-spam
* -3^0   ^Content-Type: .*signed
* -3^0   ^To:.*special@address-1
* -3^0   ^From: Special <special@address-2>
* -1^0   ^List-Id:
{
	:0 ch
	| (formail -r -t -A"From: $NOREPLY" \
	-A"Content-Type: text/plain; charset=utf-8"; \
	cat $SPAMMSG $SIG) | $SENDMAIL -r $NOREPLY -t

	:0:
	spam.spool
}
--8<---------------cut here---------------end--------------->8---

And in $SPAMMSG:

--8<---------------cut here---------------start------------->8---
Your message has been rejected and won't be read, because it appears
to be spam. If this is not the case, please prepend `no-spam' to the
beginning of the subject field and send again.
--8<---------------cut here---------------end--------------->8---

Cheers,
-- 
           Peter



      parent reply	other threads:[~2023-03-22 17:28 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
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 [this message]

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=87h6uchf1o.fsf@a16n.net \
    --to=pm@a16n.net \
    --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).