Gnus development mailing list
 help / color / mirror / Atom feed
From: Bill White <billw@wolfram.com>
Cc: ding@gnus.org
Subject: Re: Spam spam spam spam spam
Date: Sat, 13 Apr 2002 19:57:40 -0500	[thread overview]
Message-ID: <m3g01zf663.fsf@wolfram.com> (raw)
In-Reply-To: <s5themfxlhz.fsf@goedel2.math.washington.edu> (John H Palmieri's message of "Sat, 13 Apr 2002 15:49:12 -0700")

On Sat Apr 13 2002 at 17:49, John H Palmieri <palmieri@math.washington.edu> said:

> Speaking of spam, when I'm at work, I can run spamassassin and
> everything is pretty much okay.  At home, though, I get all of my
> mail from a pop server.  That is, my home machine receives no mail,
> so I can forward incoming mail through procmail until I'm blue in
> the face, but of course it has no effect.  What can I do to filter
> spam (or tag spam) with this setup?

I run spamassassin as the next-to-last step of my nnmail-split-fancy,
after messages have been matched against my whitelisted email
addresses and headers.

One caveat: call-process-region doesn't seem to play nicely with 8-bit
characters in some circumstances.  With this setup I get the ol' \201
in front of each one sometimes (and I haven't debugged it yet).  Any
advice for that?

----------------------------------------------------------------------
(setq nnmail-split-methods 'nnmail-split-fancy)

(if (string= "billwlx" (getenv "HOSTNAME"))
    (setq spamassassin-script "/home/usr0/billw/bin/spamassassin/spamassassin"
	  spamassassin-rules "/home/usr0/billw/bin/spamassassin/rules")
  (setq spamassassin-script "/home/billw/bin/SpamAssassin/spamassassin"
	spamassassin-rules "/home/billw/bin/SpamAssassin/rules"))

(defun spamassassin-on-message ()
  ;; use " *nnmail incoming*" while splitting crash-box
    (if (get-buffer " *nnmail incoming*")
	(set-buffer " *nnmail incoming*")
  ;; use gnus-original-article-buffer while respooling & tracing
      (set-buffer gnus-original-article-buffer))
    (call-process-region (point-min) (point-max) 
			 spamassassin-script
			 t t t
			 "-P" "-c" spamassassin-rules)
    (goto-char (point-min))
    (when (re-search-forward "^X-Spam-Status: Yes" nil t)
      "spamassassin"))

(setq nnmail-split-fancy
      '(|
	("to" ".*billw@wri\\.com" "spamtrap")
	(from ".*Dan Largent.*" "personal")
	(from ".*Michelle Largent.*" "personal")
	("Subject" ".*Voice mail waiting for x.*" "voice-mail")
[...]
	("sender" "owner-ding@hpc\\.uh\\.edu"
	 (: (lambda nil (format-time-string "gnus.%Y.%m"))))
	(any "owner-wri-\\b\\(\\w+\\)" "wri.\\1")
  	(: spamassassin-on-message)
	(: (lambda nil (format-time-string "mail.misc.%Y.%m")))))
----------------------------------------------------------------------

Hope this helps.

Cheers -

bw
-- 
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."




  parent reply	other threads:[~2002-04-14  0:57 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-30 15:33 Lars Magne Ingebrigtsen
2002-03-30 15:59 ` Lars Magne Ingebrigtsen
2002-04-01 14:44   ` NAGY Andras
2002-04-05 20:01     ` Ted Zlatanov
2002-04-05 21:41       ` Kai Großjohann
2002-04-05 22:27         ` Derrell.Lipman
2002-04-09 17:44           ` Toby Speight
2002-04-05 21:42       ` Jon Ericson
2002-04-05 22:59         ` Ted Zlatanov
2002-04-02 16:31   ` Ted Zlatanov
2002-04-02 19:52     ` Lars Magne Ingebrigtsen
2002-04-02 22:06       ` Ted Zlatanov
2002-04-05 19:33         ` Ted Zlatanov
2002-03-30 16:09 ` Robin S. Socha
2002-03-30 16:32   ` Lars Magne Ingebrigtsen
2002-03-30 16:56     ` Lloyd Zusman
2002-03-30 17:05       ` Lars Magne Ingebrigtsen
2002-03-30 18:27         ` Lloyd Zusman
2002-04-01 14:46       ` NAGY Andras
2002-04-01 15:11         ` Lloyd Zusman
2002-03-30 17:30     ` Robin S. Socha
2002-03-30 17:34       ` Lars Magne Ingebrigtsen
2002-03-30 18:27         ` Robin S. Socha
2002-03-31 22:00     ` Stainless Steel Rat
2002-03-30 16:33   ` Lars Magne Ingebrigtsen
2002-03-30 16:43   ` Henrik Enberg
2002-03-30 16:53     ` Robin S. Socha
2002-03-30 17:35       ` Henrik Enberg
2002-03-30 17:58         ` Robin S. Socha
2002-03-30 18:29           ` Lars Magne Ingebrigtsen
2002-03-30 18:52             ` Harry Putnam
2002-03-30 19:37         ` Jason R. Mastaler
2002-03-30 23:46           ` Lars Magne Ingebrigtsen
2002-03-31  0:38             ` Jason R. Mastaler
2002-04-01 14:07               ` Lloyd Zusman
2002-04-04  3:28                 ` news
2002-03-31  2:07             ` Mark Milhollan
2003-01-01 21:06               ` Lars Magne Ingebrigtsen
2003-01-02 19:02               ` Simon Josefsson
2002-03-30 16:34 ` Henrik Enberg
2002-03-30 16:45   ` Lars Magne Ingebrigtsen
2002-03-30 16:52     ` Lars Magne Ingebrigtsen
2002-03-30 17:45     ` Kai Großjohann
2002-03-30 18:29       ` Lars Magne Ingebrigtsen
2002-03-30 19:28       ` Lars Magne Ingebrigtsen
2002-03-31  1:39         ` Paul Jarc
2002-03-31  1:45           ` Lars Magne Ingebrigtsen
2002-03-31  1:48             ` Paul Jarc
2002-03-31  1:57               ` Lars Magne Ingebrigtsen
2002-03-31 15:23                 ` Lars Magne Ingebrigtsen
2002-03-31 16:20                   ` Romain FRANCOISE
2002-03-31 18:19                   ` Russ Allbery
2002-04-02  7:09                     ` Michel Schinz
2002-04-03  5:10                       ` Russ Allbery
2002-04-03 13:50                         ` Frank Schmitt
2002-03-31  1:31 ` Daniel Pittman
2003-01-01 21:05   ` Lars Magne Ingebrigtsen
2002-03-31 15:34 ` Fabien Penso
2002-03-31 15:50   ` Lars Magne Ingebrigtsen
2002-03-31 16:06     ` Fabien Penso
2002-03-31 18:11     ` Russ Allbery
2002-03-31 18:31       ` Lars Magne Ingebrigtsen
2002-04-01 17:22       ` Paul Jarc
2002-04-01 19:25         ` Lars Magne Ingebrigtsen
2002-04-01 19:34           ` Paul Jarc
2002-04-01 18:22 ` Chris Shenton
2002-04-13 22:49 ` John H Palmieri
2002-04-13 23:00   ` Nevin Kapur
2002-04-14  0:04   ` Stainless Steel Rat
2002-04-14  0:57   ` Bill White [this message]
2002-04-21  3:38   ` Harry Putnam

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=m3g01zf663.fsf@wolfram.com \
    --to=billw@wolfram.com \
    --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).