Gnus development mailing list
 help / color / mirror / Atom feed
* Spam does not move
@ 2004-05-17 12:47 Kohkichi Hosoda
  2004-05-17 15:17 ` Reiner Steib
  0 siblings, 1 reply; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-05-17 12:47 UTC (permalink / raw)


Hi, 

I recently decided to re-setup my spam-filtering.  I wanted spam in a
ham group to move into spam group when I exit the ham group.
Therefore, my Group parameter is set as the following:

((spam-contents gnus-group-spam-classification-ham)
 (spam-process
  ((spam spam-use-stat)
   (ham spam-use-stat)))
 (spam-process-destination "nnml:spam")
 (spam-marks
  (gnus-spam-mark)))

Everytime I find spam in a ham group, I mark it with M-d.  Then it
will go into the spam group when I exit summary buffer of the ham
group, but it does not.  I get messages as the followings:

Exiting summary buffer and applying spam rules
Registering 0  articles as spam using backend spam-use-stat
Marking spam as expired and moving it to (nnml:spam)
Marking spam as expired without moving it
Registering 0  articles as ham using backend spam-use-stat

However, the reality is that the spam resides in the ham group.  It
is not even marked as expired.  I probably have missed something, but
I'm not a Gnus master.  I would appreciate your help in advance.    

## The followings are my spam filtering in my .gnus.el according to
   Mr. Koseki's page (it's Japanese).   
http://cgi.netlaputa.ne.jp/~kose/diary/?200304a&to=200304091#200304091

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; spam filtering in my .gnus.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'spam)
(require 'spam-stat)
(spam-stat-load)
(setq spam-use-stat t)

;; Regular expression
 (setq spam-use-regex-headers t)
 (setq spam-regex-headers-spam
       '("Subject:.*未承諾広告"))

;; decode
 (setq nnmail-mail-splitting-decodes t)

;; Mailing list                                         
(modify-syntax-entry ?\- "w" nnmail-split-fancy-syntax-table)                                                     
(setq nnmail-split-fancy-ML-alist
       '(("x-ml-name" "\\b\\(\\w+\\)" "\\1")
	 ("errors-to\\|sender" "owner-\\(\\w+\\)@.*" "\\1")
	 ("sender" "\\b\\(\\w+\\)-\\(owner\\|admin\\)@.*" "\\1")
	 ("mailing-list" "\\bcontact \\b\\(\\w+\\)-\\(help\\|owner\\)@.*" "\\1")))

;; parent      
(setq nnmail-treat-duplicates 'warn)       
(setq nnmail-cache-accepted-message-ids t) 

;; group parameter & spam
(gnus-group-split-setup t "spam")

;; to myself
(setq nnmail-split-fancy-DM-alist
      '(("subject" "Output from \"cron\" command" "cron")
	(from "khosoda@[a-zA-Z.]+\\.jp" "kohkichi")
	(to "khosoda@[a-zA-Z.]+\\.jp"
	    (| ("subject" "re:" "kohkichi")
	       ("references" "@" "kohkichi")
	     ;  ("content-type" "multipart" "spam")
	       (from "[a-zA-Z]+\\.jp" "kohkichi")
	       "spam"))
	"spam"))

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

(setq gnus-group-split-updated-hook
      (lambda ()
	(setq nnmail-split-fancy
	      (append '(|)
		      ;; (1) spam
		      '((: spam-split))
		      ;; (2) mailing-list
		      nnmail-split-fancy-ML-alist
		      ;; (3) parent
		      '((: nnmail-split-fancy-with-parent))
		      ;; (4) Group parameter
		      (let ((lst (cdr nnmail-split-fancy))
			    first ret)
			(while (listp (setq first (car lst)))
			  (setq ret (append (list first) ret))
			  (setq lst (cdr lst)))
			ret)
		      ;; (5) DM
		      nnmail-split-fancy-DM-alist))))

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-17 12:47 Spam does not move Kohkichi Hosoda
@ 2004-05-17 15:17 ` Reiner Steib
  2004-05-18 14:55   ` Kohkichi Hosoda
  0 siblings, 1 reply; 24+ messages in thread
From: Reiner Steib @ 2004-05-17 15:17 UTC (permalink / raw)


On Mon, May 17 2004, Kohkichi Hosoda wrote:

> ## The followings are my spam filtering in my .gnus.el according to
>    Mr. Koseki's page (it's Japanese).   
> http://cgi.netlaputa.ne.jp/~kose/diary/?200304a&to=200304091#200304091
[...]
> (require 'spam)
> (require 'spam-stat)
> (spam-stat-load)
> (setq spam-use-stat t)

Try the recommended setup from the manual instead:

,----[ (info "(gnus)Filtering Spam Using The Spam ELisp Package") ]
|    First of all, you *must* run the function `spam-initialize' to
| autoload `spam.el' and to install the `spam.el' hooks.  There is one
| exception: if you use the `spam-use-stat' (*note spam-stat spam
| filtering::) setting, you should turn it on before `spam-initialize':
| 
|      (setq spam-use-stat t) ;; if needed
|      (spam-initialize)
`----

Bye, Reiner.
-- 
       ,,,
      (o o)
---ooO-(_)-Ooo--- PGP key available via WWW   http://rsteib.home.pages.de/




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-17 15:17 ` Reiner Steib
@ 2004-05-18 14:55   ` Kohkichi Hosoda
  2004-05-18 15:40     ` Kai Grossjohann
  0 siblings, 1 reply; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-05-18 14:55 UTC (permalink / raw)


>>>>> On Mon, 17 May 2004 17:17:30 +0200, Reiner Steib <4.uce.03.r.s@nurfuerspam.de> said:

Reiner> Try the recommended setup from the manual instead:

Reiner> ,----[ (info "(gnus)Filtering Spam Using The Spam ELisp
Reiner> Package") ] | First of all, you *must* run the function
Reiner> `spam-initialize' to | autoload `spam.el' and to install the
Reiner> `spam.el' hooks.  There is one | exception: if you use the
Reiner> `spam-use-stat' (*note spam-stat spam | filtering::) setting,
Reiner> you should turn it on before `spam-initialize':
Reiner> | 
Reiner> | (setq spam-use-stat t) ;; if needed 
        | (spam-initialize)

Thank you for your advice. However, this setting in my .gnus.el gave
me error and gnus did not even start.  

Debugger entered--Lisp error: (void-function spam-initialize)
  (spam-initialize)
  eval-buffer(#<buffer  *load*> nil "~/.gnus" nil t)
  ;;; Reading at buffer position 15404
  load-with-code-conversion("/Users/kohkichi/.gnus.el" "~/.gnus" nil t)
  load("~/.gnus" nil t)
  gnus-read-init-file()
  gnus-1(nil nil nil)
  gnus(nil)
* call-interactively(gnus)
  execute-extended-command(nil)
* call-interactively(execute-extended-command)

I also tried the following setup.  

(setq spam-use-stat t)
(require 'spam)
(spam-initialize)

With this setting, gnus starts but my problem is not solved, i.e.,
spam mails in ham group still do not move into spam group.  

Is there any other method I should try?  

Thank you for your help in advance.  

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-18 14:55   ` Kohkichi Hosoda
@ 2004-05-18 15:40     ` Kai Grossjohann
  2004-05-19 15:31       ` Kohkichi Hosoda
  0 siblings, 1 reply; 24+ messages in thread
From: Kai Grossjohann @ 2004-05-18 15:40 UTC (permalink / raw)


Kohkichi Hosoda <khosoda@venus.dti.ne.jp> writes:

> Thank you for your advice. However, this setting in my .gnus.el gave
> me error and gnus did not even start.  
>
> Debugger entered--Lisp error: (void-function spam-initialize)
>   (spam-initialize)

Did you (require 'gnus-load) from ~/.emacs?  It must be before any
part of Gnus is loaded, therefore ~/.gnus is too late.

Kai



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-18 15:40     ` Kai Grossjohann
@ 2004-05-19 15:31       ` Kohkichi Hosoda
  2004-05-19 18:07         ` Ted Zlatanov
  0 siblings, 1 reply; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-05-19 15:31 UTC (permalink / raw)


>>>>> On Tue, 18 May 2004 17:40:09 +0200, Kai Grossjohann <kgrossjo@eu.uu.net> said:

Kai> Did you (require 'gnus-load) from ~/.emacs?  It must be before
Kai> any part of Gnus is loaded, therefore ~/.gnus is too late.

Oops, I did not do that.  Yes, addition of (require 'gnus-load) in my
.emacs.el solved the Gnus startup trouble.  However, the original
problem (spam does not move) still exists. What else should I try? 

Thank you for your advice, anyway.  

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-19 15:31       ` Kohkichi Hosoda
@ 2004-05-19 18:07         ` Ted Zlatanov
  2004-05-21 13:16           ` Kohkichi Hosoda
  0 siblings, 1 reply; 24+ messages in thread
From: Ted Zlatanov @ 2004-05-19 18:07 UTC (permalink / raw)
  Cc: ding

On Thu, 20 May 2004, khosoda@venus.dti.ne.jp wrote:

>>>>>> On Tue, 18 May 2004 17:40:09 +0200, Kai Grossjohann <kgrossjo@eu.uu.net> said:
> 
> Kai> Did you (require 'gnus-load) from ~/.emacs?  It must be before
> Kai> any part of Gnus is loaded, therefore ~/.gnus is too late.
> 
> Oops, I did not do that.  Yes, addition of (require 'gnus-load) in my
> .emacs.el solved the Gnus startup trouble.  However, the original
> problem (spam does not move) still exists. What else should I try? 

Hi,

I looked at your settings earlier and nothing looked unusual.  Can
you run spam-summary-prepare-exit manually when you mark some spam?
Does it do anything?  If not, can you trace the function's
execution?  It does not do anything very complex, and the specific
point of interest is 

    (unless (and spam-move-spam-nonspam-groups-only
		 (spam-group-spam-contents-p gnus-newsgroup-name))
      (when (< 0 (length (spam-list-articles
			  gnus-newsgroup-articles
			  'spam)))
	(gnus-message 6 "Marking spam as expired and moving it to %s"
		      (gnus-parameter-spam-process-destination 
		       gnus-newsgroup-name))
	(spam-mark-spam-as-expired-and-move-routine
	 (gnus-parameter-spam-process-destination gnus-newsgroup-name))))

which works fine for me, so something odd is happening on your side.

You know, it could be an old version of spam.el, which doesn't even
have the code as it is above...  But you would have to upgrade your
whole Gnus to CVS to use the latest spam.el, so that's annoying.  Hmm.
What do you want to do, try CVS or try to fix your current spam.el
copy?

Thanks
Ted



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-19 18:07         ` Ted Zlatanov
@ 2004-05-21 13:16           ` Kohkichi Hosoda
  2004-05-22 14:11             ` Kohkichi Hosoda
  2004-05-24 19:10             ` Ted Zlatanov
  0 siblings, 2 replies; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-05-21 13:16 UTC (permalink / raw)


I think I figured out something I missed.  What I tried was the followings;

When I found spam mail marked with "o" in ham group, I marked it with
M-d.  It did not move to spam group when I exit the summary buffer of
the ham group.     

On the other hand, the working procedure is the followings; 

1. Remove marks from "o"-spam with M-c in ham group
2. Exit the summary buffer
3. Re-enter the ham group
4. Mark the spam with M-d and exit the summary buffer
5. Spam moves to spam group

And *Messages* are 

Exiting summary buffer and applying spam rules
Registering 5  articles as spam using backend spam-use-stat
Moving to nnml:spam: (7165 7137 7089 7088 7086)...
Wrote /Users/kohkichi/Mail/spam/19874
Wrote /Users/kohkichi/Mail/spam/19875
Wrote /Users/kohkichi/Mail/spam/19876
Wrote /Users/kohkichi/Mail/spam/19877
Wrote /Users/kohkichi/Mail/spam/19878
5 spam messages are marked as expired and moved it to nnml:spam

Of course, new spam in the ham group move to the spam group if it is
marked with M-d.  

I would like to know if this is the right way Gnus works.  

Thank you for your help.  

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-21 13:16           ` Kohkichi Hosoda
@ 2004-05-22 14:11             ` Kohkichi Hosoda
  2004-05-24 19:10             ` Ted Zlatanov
  1 sibling, 0 replies; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-05-22 14:11 UTC (permalink / raw)


>>>>> On Fri, 21 May 2004 22:16:13 +0900, Kohkichi Hosoda <khosoda@venus.dti.ne.jp> said:

>> I think I figured out something I missed.  What I tried was the
>> followings; When I found spam mail marked with "o" in ham group, 

Actually, I meant "O", not "o".

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-21 13:16           ` Kohkichi Hosoda
  2004-05-22 14:11             ` Kohkichi Hosoda
@ 2004-05-24 19:10             ` Ted Zlatanov
  2004-05-28 17:00               ` Kohkichi Hosoda
  1 sibling, 1 reply; 24+ messages in thread
From: Ted Zlatanov @ 2004-05-24 19:10 UTC (permalink / raw)
  Cc: ding

On Fri, 21 May 2004, khosoda@venus.dti.ne.jp wrote:

> I think I figured out something I missed.  What I tried was the followings;
> 
[edited: "o" -> "O"]
> When I found spam mail marked with "O" in ham group, I marked it with
> M-d.  It did not move to spam group when I exit the summary buffer of
> the ham group.

I'm sorry, but I could not repeat this bug.  It may have been fixed in
newer versions of spam.el.  Can you consider using the latest CVS?  If
not, I can try to debug things with you, but it will take a while.

Ted



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-24 19:10             ` Ted Zlatanov
@ 2004-05-28 17:00               ` Kohkichi Hosoda
  2004-06-14 16:07                 ` Ted Zlatanov
  0 siblings, 1 reply; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-05-28 17:00 UTC (permalink / raw)


>>>>> On 24 May 2004 15:10:36 -0400, "Ted Zlatanov" <tzz@lifelogs.com> said:

Ted> I'm sorry, but I could not repeat this bug.  It may have been
Ted> fixed in newer versions of spam.el.  Can you consider using the
Ted> latest CVS?  If not, I can try to debug things with you, but it
Ted> will take a while.

I checkouted, compiled and tried the latest CVS of Gnus.
Unfortunately, however, it did not change the situation.  Spam mail
marked with "O" in ham group still did not go into spam group when I
exited the summary buffer of the ham group.  

Thank you very much for your advice, anyway.  

I would appreciate it very much if you could debug this problem.

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-05-28 17:00               ` Kohkichi Hosoda
@ 2004-06-14 16:07                 ` Ted Zlatanov
  2004-06-18 16:00                   ` Kohkichi Hosoda
  0 siblings, 1 reply; 24+ messages in thread
From: Ted Zlatanov @ 2004-06-14 16:07 UTC (permalink / raw)
  Cc: ding

On Sat, 29 May 2004, khosoda@venus.dti.ne.jp wrote:

> I checkouted, compiled and tried the latest CVS of Gnus.
> Unfortunately, however, it did not change the situation.  Spam mail
> marked with "O" in ham group still did not go into spam group when I
> exited the summary buffer of the ham group.  
> 
> Thank you very much for your advice, anyway.  
> 
> I would appreciate it very much if you could debug this problem.

The new version of spam.el which I just posted to the ding list has
new logic for moving spam out.  Can you test with that version and
let me know what happens?

Thank you
Ted



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-06-14 16:07                 ` Ted Zlatanov
@ 2004-06-18 16:00                   ` Kohkichi Hosoda
  2004-06-24 16:30                     ` Ted Zlatanov
  0 siblings, 1 reply; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-06-18 16:00 UTC (permalink / raw)
  Cc: Ted Zlatanov

>>>>> On 14 Jun 2004 12:07:45 -0400, "Ted Zlatanov" <tzz@lifelogs.com> said:

Ted> The new version of spam.el which I just posted to the ding list
Ted> has new logic for moving spam out.  Can you test with that
Ted> version and let me know what happens?

Unfortunately, the new version does not change the situation.   Spam
mail marked with "O" in ham group still does not go into spam group
when I exited the summary buffer of the ham group. 
The messages say;
Exiting summary buffer and applying spam rules

When I use M-c to remove mark, exit and re-enter the summary buffer,
and mark the spam with M-d, it does go into the spam group.  
The messages say;
Exiting summary buffer and applying spam rules
Registering 1  articles as spam using backend spam-use-stat
1 spam messages were processed by backend spam-use-stat.
Registering 1  articles as spam using backend spam-use-move
Moving to nnml:spam: (7159)...
Loading gnus-dup...done
Wrote /Users/kohkichi/Mail/spam/22187
1 spam messages were processed by backend spam-use-move.

BTW, your patch hunk for gnus.el.  That may be the cause of the
trouble this time.  Could you use -uNr option for diff?

Thank you very much for remembering my problem.  

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-06-18 16:00                   ` Kohkichi Hosoda
@ 2004-06-24 16:30                     ` Ted Zlatanov
  2004-06-26 14:05                       ` Kohkichi Hosoda
  2004-06-26 16:19                       ` Kohkichi Hosoda
  0 siblings, 2 replies; 24+ messages in thread
From: Ted Zlatanov @ 2004-06-24 16:30 UTC (permalink / raw)
  Cc: ding

On Sat, 19 Jun 2004, khosoda@venus.dti.ne.jp wrote:

>>>>>> On 14 Jun 2004 12:07:45 -0400, "Ted Zlatanov" <tzz@lifelogs.com> said:
> 
> Ted> The new version of spam.el which I just posted to the ding list
> Ted> has new logic for moving spam out.  Can you test with that
> Ted> version and let me know what happens?
> 
> Unfortunately, the new version does not change the situation.   Spam
> mail marked with "O" in ham group still does not go into spam group
> when I exited the summary buffer of the ham group. 

I'm pretty sure this is not a problem with spam.el, but either with
your configuration or with another part of Gnus (maybe the agent?)

Put this:

(debug (spam-list-articles gnus-newsgroup-articles 'spam))

at line 1296 of spam.el, just before 

    ;; do the non-moving backends first, then the moving ones
    (dolist (backend-type '(non-mover mover))

Then do M-x eval-buffer, and try to repeat the behavior.

When you quit the summary, you'll see a buffer that will show you the
list of spam-marked messages.  At least one, the one you marked as
spam, should be in it, represented as an integer.  If it's not,
something is very wrong with your gnus-newsgroup-articles.  Or maybe
you've customized your spam-marks variable, though no one has ever
done that to my knowledge...

I've spent hours testing this, and I simply can't find the bug you
describe.  I don't doubt your experience, but it's very difficult to
debug a problem that I can't duplicate.  Maybe you should try
debugging the spam-summary-prepare-exit function yourself or get
someone local that knows Emacs well to help you.

Ted

(to undo the changes above, undo them in spam.el and do M-x
eval-buffer again)



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-06-24 16:30                     ` Ted Zlatanov
@ 2004-06-26 14:05                       ` Kohkichi Hosoda
  2004-06-26 16:19                       ` Kohkichi Hosoda
  1 sibling, 0 replies; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-06-26 14:05 UTC (permalink / raw)
  Cc: Ted Zlatanov

>>>>> On 24 Jun 2004 12:30:03 -0400, "Ted Zlatanov" <tzz@lifelogs.com> said:

Ted> Put this:

Ted> (debug (spam-list-articles gnus-newsgroup-articles 'spam))

Ted> at line 1296 of spam.el, just before

First of all, thank you very much for taking care of my persistent
problem.  I tried this in my mail group, marked a mail with M-d,
exited the summary buffer, and got the following messages.    

Debugger entered: nil
  (if gnus-group-is-exiting-without-update-p nil (gnus-message 6 "Exiting summary buffer and applying spam rules") (dolist (classification ...) (let* ... ...)) (debug (spam-list-articles gnus-newsgroup-articles ...)) (dolist (backend-type ...) (dolist ... ...)) (dolist (article ...) (gnus-summary-mark-article article gnus-expirable-mark)))
  (unless gnus-group-is-exiting-without-update-p (gnus-message 6 "Exiting summary buffer and applying spam rules") (dolist (classification ...) (let* ... ...)) (debug (spam-list-articles gnus-newsgroup-articles ...)) (dolist (backend-type ...) (dolist ... ...)) (dolist (article ...) (gnus-summary-mark-article article gnus-expirable-mark)))
  spam-summary-prepare-exit()
  run-hooks(gnus-summary-prepare-exit-hook)
  apply(run-hooks gnus-summary-prepare-exit-hook)
  gnus-run-hooks(gnus-summary-prepare-exit-hook)
  gnus-summary-exit()
* call-interactively(gnus-summary-exit)

On the other hand, I got the following messages when I exited the
summary buffer of spam group.  

Debugger entered: ((22836 22835 22834 22833 22832 22831 22830))
  (if gnus-group-is-exiting-without-update-p nil (gnus-message 6 "Exiting summary buffer and applying spam rules") (dolist (classification ...) (let* ... ...)) (debug (spam-list-articles gnus-newsgroup-articles ...)) (dolist (backend-type ...) (dolist ... ...)) (dolist (article ...) (gnus-summary-mark-article article gnus-expirable-mark)))
  (unless gnus-group-is-exiting-without-update-p (gnus-message 6 "Exiting summary buffer and applying spam rules") (dolist (classification ...) (let* ... ...)) (debug (spam-list-articles gnus-newsgroup-articles ...)) (dolist (backend-type ...) (dolist ... ...)) (dolist (article ...) (gnus-summary-mark-article article gnus-expirable-mark)))
  spam-summary-prepare-exit()
  run-hooks(gnus-summary-prepare-exit-hook)
  apply(run-hooks gnus-summary-prepare-exit-hook)
  gnus-run-hooks(gnus-summary-prepare-exit-hook)
  gnus-summary-exit()
* call-interactively(gnus-summary-exit)

I also checked gnus-newsgroup-articles.  
C-h v gnus-newsgroup-articles demonstrated; 

gnus-newsgroup-articles's value is 
(272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572)

Local in buffer *Summary nnml:ding*; global value is nil

This seems normal to me.  

Sincerely,

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-06-24 16:30                     ` Ted Zlatanov
  2004-06-26 14:05                       ` Kohkichi Hosoda
@ 2004-06-26 16:19                       ` Kohkichi Hosoda
  2004-06-29 18:16                         ` Ted Zlatanov
  1 sibling, 1 reply; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-06-26 16:19 UTC (permalink / raw)
  Cc: ding

>>>>> On 24 Jun 2004 12:30:03 -0400, "Ted Zlatanov" <tzz@lifelogs.com> said:

Ted> I'm pretty sure this is not a problem with spam.el, but either
Ted> with your configuration or with another part of Gnus (maybe the
Ted> agent?)

Ted> Put this:

Ted> (debug (spam-list-articles gnus-newsgroup-articles 'spam))

Ted> at line 1296 of spam.el

First of all, thank you very much for taking care of my persistent
problem.  I tried this in my mail group, marked a mail with M-d,
exited the summary buffer, and got the following messages.    

Debugger entered: nil
  (if gnus-group-is-exiting-without-update-p nil (gnus-message 6 "Exiting summary buffer and applying spam rules") (dolist (classification ...) (let* ... ...)) (debug (spam-list-articles gnus-newsgroup-articles ...)) (dolist (backend-type ...) (dolist ... ...)) (dolist (article ...) (gnus-summary-mark-article article gnus-expirable-mark)))
  (unless gnus-group-is-exiting-without-update-p (gnus-message 6 "Exiting summary buffer and applying spam rules") (dolist (classification ...) (let* ... ...)) (debug (spam-list-articles gnus-newsgroup-articles ...)) (dolist (backend-type ...) (dolist ... ...)) (dolist (article ...) (gnus-summary-mark-article article gnus-expirable-mark)))
  spam-summary-prepare-exit()
  run-hooks(gnus-summary-prepare-exit-hook)
  apply(run-hooks gnus-summary-prepare-exit-hook)
  gnus-run-hooks(gnus-summary-prepare-exit-hook)
  gnus-summary-exit()
* call-interactively(gnus-summary-exit)

On the other hand, I got the following messages when I exited the
summary buffer of spam group.  

Debugger entered: ((22836 22835 22834 22833 22832 22831 22830))
  (if gnus-group-is-exiting-without-update-p nil (gnus-message 6 "Exiting summary buffer and applying spam rules") (dolist (classification ...) (let* ... ...)) (debug (spam-list-articles gnus-newsgroup-articles ...)) (dolist (backend-type ...) (dolist ... ...)) (dolist (article ...) (gnus-summary-mark-article article gnus-expirable-mark)))
  (unless gnus-group-is-exiting-without-update-p (gnus-message 6 "Exiting summary buffer and applying spam rules") (dolist (classification ...) (let* ... ...)) (debug (spam-list-articles gnus-newsgroup-articles ...)) (dolist (backend-type ...) (dolist ... ...)) (dolist (article ...) (gnus-summary-mark-article article gnus-expirable-mark)))
  spam-summary-prepare-exit()
  run-hooks(gnus-summary-prepare-exit-hook)
  apply(run-hooks gnus-summary-prepare-exit-hook)
  gnus-run-hooks(gnus-summary-prepare-exit-hook)
  gnus-summary-exit()
* call-interactively(gnus-summary-exit)

I also checked gnus-newsgroup-articles.  
C-h v gnus-newsgroup-articles demonstrated; 

gnus-newsgroup-articles's value is 
(272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572)

Local in buffer *Summary nnml:ding*; global value is nil

This seems normal to me.  

Sincerely,

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-06-26 16:19                       ` Kohkichi Hosoda
@ 2004-06-29 18:16                         ` Ted Zlatanov
  2004-07-01 13:21                           ` Kohkichi Hosoda
  0 siblings, 1 reply; 24+ messages in thread
From: Ted Zlatanov @ 2004-06-29 18:16 UTC (permalink / raw)
  Cc: ding

On Sun, 27 Jun 2004, khosoda@venus.dti.ne.jp wrote:

> Ted> (debug (spam-list-articles gnus-newsgroup-articles 'spam))

> Debugger entered: nil

This means that no spam-marked articles were found.  I have been
unable to duplicate this error.  Here's the spam-list-articles
function from spam.el:

(defun spam-list-articles (articles classification)
  (let ((mark-check (if (eq classification 'spam)
			'spam-group-spam-mark-p
		      'spam-group-ham-mark-p))
	alist mark-cache-yes mark-cache-no)
    (dolist (article articles)
      (let ((mark (gnus-summary-article-mark article)))
	(unless (or (memq mark mark-cache-yes)
		    (memq mark mark-cache-no))
	  (if (funcall mark-check
		       gnus-newsgroup-name
		       mark)
	      (push mark mark-cache-yes)
	    (push mark mark-cache-no)))
	(when (memq mark mark-cache-yes)
	  (push article alist))))
    alist))

It does some caching to avoid calling spam-group-spam-mark-p, but I'm
pretty sure there's no bugs there.  In any case, I need you to:

- determine the article number that's marked as spam, e.g. 5644

- do M-: (gnus-summary-article-mark 5644)

- do M-: (spam-group-spam-mark-p GROUP MARK)
  where GROUP is the group name, usually in gnus-newsgroup-name, and
  MARK is what gnus-summary-article-mark returned.

- send all this information to me.

I have the feeling you've somehow removed the spam-mark from the list
of spam-marks for your ham group.  I don't know what else the problem
could be.

Ted



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-06-29 18:16                         ` Ted Zlatanov
@ 2004-07-01 13:21                           ` Kohkichi Hosoda
  2004-07-01 16:11                             ` Ted Zlatanov
  0 siblings, 1 reply; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-07-01 13:21 UTC (permalink / raw)
  Cc: Ted Zlatanov


Ted> - do M-: (gnus-summary-article-mark 5644)

do M-: (gnus-summary-article-mark 6029) -> 36

Ted> - do M-: (spam-group-spam-mark-p GROUP MARK) where GROUP is the
Ted> group name, usually in gnus-newsgroup-name, and MARK is what
Ted> gnus-summary-article-mark returned.

do M-: (spam-group-spam-mark-p kohkichi 36) ->

Debugger entered--Lisp error: (void-variable kohkichi)
  (spam-group-spam-mark-p kohkichi 36)
  eval((spam-group-spam-mark-p kohkichi 36))
  eval-expression((spam-group-spam-mark-p kohkichi 36) nil)
* call-interactively(eval-expression)

Ted> I have the feeling you've somehow removed the spam-mark from the
Ted> list of spam-marks for your ham group.  I don't know what else
Ted> the problem could be.

Group parameters of my HAM group are the followings:

((spam-contents gnus-group-spam-classification-ham)
 (spam-process
  ((spam spam-use-stat)
   (ham spam-use-stat)))
 (spam-process-destination "nnml:spam")
 (spam-marks
  (gnus-spam-mark)))

Thanks you very much for your help.  




^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-07-01 13:21                           ` Kohkichi Hosoda
@ 2004-07-01 16:11                             ` Ted Zlatanov
  2004-07-02 13:11                               ` Kohkichi Hosoda
  0 siblings, 1 reply; 24+ messages in thread
From: Ted Zlatanov @ 2004-07-01 16:11 UTC (permalink / raw)
  Cc: ding

On Thu, 01 Jul 2004, khosoda@venus.dti.ne.jp wrote:

> Ted> - do M-: (gnus-summary-article-mark 5644)
> 
> do M-: (gnus-summary-article-mark 6029) -> 36
> 
> Ted> - do M-: (spam-group-spam-mark-p GROUP MARK) where GROUP is the
> Ted> group name, usually in gnus-newsgroup-name, and MARK is what
> Ted> gnus-summary-article-mark returned.

OK, so we know this article is considered spam (36 is the $ character
which is the spam mark).

> do M-: (spam-group-spam-mark-p kohkichi 36) ->
> 
> Debugger entered--Lisp error: (void-variable kohkichi)
>   (spam-group-spam-mark-p kohkichi 36)
>   eval((spam-group-spam-mark-p kohkichi 36))
>   eval-expression((spam-group-spam-mark-p kohkichi 36) nil)
> * call-interactively(eval-expression)

Where you put kohkichi, you need either

gnus-newsgroup-name

OR

"nntp:group.name" (or whatever the actual group name is)

This is essential, but you don't need to do the preceding
gnus-summary-article-mark step, just enter the group and run this
step.

> Ted> I have the feeling you've somehow removed the spam-mark from the
> Ted> list of spam-marks for your ham group.  I don't know what else
> Ted> the problem could be.
> 
> Group parameters of my HAM group are the followings:
> 
> ((spam-contents gnus-group-spam-classification-ham)
>  (spam-process
>   ((spam spam-use-stat)
>    (ham spam-use-stat)))
>  (spam-process-destination "nnml:spam")
>  (spam-marks
>   (gnus-spam-mark)))

Can you please remove the spam-marks parameter altogether?  The rest
looks OK (if you really have a spam group called "nnml:spam").

Thanks
Ted



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-07-01 16:11                             ` Ted Zlatanov
@ 2004-07-02 13:11                               ` Kohkichi Hosoda
  2004-07-16 17:00                                 ` Ted Zlatanov
  0 siblings, 1 reply; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-07-02 13:11 UTC (permalink / raw)


>>>>> On 1 Jul 2004 12:11:29 -0400, "Ted Zlatanov" <tzz@lifelogs.com> said:

Ted> Where you put kohkichi, you need either

Ted> gnus-newsgroup-name

Ted> OR

Ted> "nntp:group.name" (or whatever the actual group name is)

Ted> This is essential, but you don't need to do the preceding
Ted> gnus-summary-article-mark step, just enter the group and run this
Ted> step.

do M-: (spam-group-spam-mark-p "nnml:kohkichi" 36) -> (36) 

Does this mean that my setup is correct?

Ted> Can you please remove the spam-marks parameter altogether?  The
Ted> rest looks OK (if you really have a spam group called
Ted> "nnml:spam").

Sure.   Now my Group parameters of HAM group are;

((spam-contents gnus-group-spam-classification-ham)
 (spam-process
  ((spam spam-use-stat)
   (ham spam-use-stat)))
 (spam-process-destination "nnml:spam"))

Actually, bad behavior of my gnus does not change with or without
(spam-marks (gnus-spam-mark)) in group parameters.  

I really appreciate your help.  

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-07-02 13:11                               ` Kohkichi Hosoda
@ 2004-07-16 17:00                                 ` Ted Zlatanov
  2004-07-25 14:29                                   ` Kohkichi Hosoda
  0 siblings, 1 reply; 24+ messages in thread
From: Ted Zlatanov @ 2004-07-16 17:00 UTC (permalink / raw)
  Cc: ding

On Fri, 02 Jul 2004, khosoda@venus.dti.ne.jp wrote:

> Sure.   Now my Group parameters of HAM group are;
> 
> ((spam-contents gnus-group-spam-classification-ham)
>  (spam-process
>   ((spam spam-use-stat)
>    (ham spam-use-stat)))
>  (spam-process-destination "nnml:spam"))
> 
> Actually, bad behavior of my gnus does not change with or without
> (spam-marks (gnus-spam-mark)) in group parameters.  

Well, I have no answer.  The function spam-list-articles is correct
for everyone except you - in your case, even though mark 36 ($) is a
spam-mark, spam articles are not gathered by spam-list-articles.  I
don't know what could be interfering with spam-list-articles, and my
advice is to do (debug) statements in the spam-list-articles source,
and see where the problem is.  I would gladly do this for you, but I
simply can't duplicate the error!

Ted



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-07-16 17:00                                 ` Ted Zlatanov
@ 2004-07-25 14:29                                   ` Kohkichi Hosoda
  2004-07-27 16:46                                     ` Ted Zlatanov
  0 siblings, 1 reply; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-07-25 14:29 UTC (permalink / raw)
  Cc: Ted Zlatanov

[-- Attachment #1: Type: text/plain, Size: 836 bytes --]


>>>>> On 16 Jul 2004 13:00:23 -0400, "Ted Zlatanov" <tzz@lifelogs.com> said:

Ted> Well, I have no answer.  The function spam-list-articles is
Ted> correct for everyone except you - in your case, even though mark
Ted> 36 ($) is a spam-mark, spam articles are not gathered by
Ted> spam-list-articles.  I don't know what could be interfering with
Ted> spam-list-articles, and my advice is to do (debug) statements in
Ted> the spam-list-articles source, and see where the problem is.  I
Ted> would gladly do this for you, but I simply can't duplicate the
Ted> error!

First of all, thank you very much for your continued effort to solve
 my trouble.  I tried M-x debug-on-entry RET spam-list-articles RET.
 I obtained the following results, which was different from previous
 result which demonstrated the value of 36, i.e., spam mark. 


[-- Attachment #2: Backtrace --]
[-- Type: application/octet-stream, Size: 1190 bytes --]

[-- Attachment #3: Type: text/plain, Size: 181 bytes --]


What does "33" mean?  ham?

I appreciate your help in advance.  

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-07-25 14:29                                   ` Kohkichi Hosoda
@ 2004-07-27 16:46                                     ` Ted Zlatanov
  2004-08-14 14:15                                       ` Kohkichi Hosoda
  0 siblings, 1 reply; 24+ messages in thread
From: Ted Zlatanov @ 2004-07-27 16:46 UTC (permalink / raw)
  Cc: ding

On Sun, 25 Jul 2004, khosoda@venus.dti.ne.jp wrote:

> I tried M-x debug-on-entry RET spam-list-articles RET.

OK, but you need to use edebug or (debug) statements.  Here's what I
would use:

(defun spam-list-articles (articles classification)
  (let ((mark-check (if (eq classification 'spam)
			'spam-group-spam-mark-p
		      'spam-group-ham-mark-p))
	alist mark-cache-yes mark-cache-no)
    (dolist (article articles)
      (let ((mark (gnus-summary-article-mark article)))
	(unless (or (memq mark mark-cache-yes)
		    (memq mark mark-cache-no))
	  (if (funcall mark-check
		       gnus-newsgroup-name
		       mark)
	      (push mark mark-cache-yes)
	    (push mark mark-cache-no)))
        (debug (memq mark mark-cache-yes) mark-check article classification mark mark-cache-yes mark-cache-no)
	(when (memq mark mark-cache-yes)
	  (push article alist))))
    alist))

(press C-x C-e after the last parenthesis to use this function; do
the same on the version in spam.el to revert to the original
function).  Run the following with M-:

list all ham articles:

(spam-list-articles 'ham)

list all spam article:

(spam-list-articles 'spam)

while you are in the group summary buffer.

You will get 1 debug statement for each article - save those
separately, I don't need more than 2 examples of what happens with
spam articles and 2 examples with ham articles (4 total) but it's OK
if you send me more.

Again, sorry that I can't find the problem, but it's happening only
for you, so you have to do the hard work :)

> What does "33" mean?  ham?

Gnus mark values are just character values, so 33 is ASCII
exclammation (!), the tick mark.  You can do something like

(format "%c" 33)

to find the visual representation of any mark.  The spam-mark is $,
value 36.

Ted



^ permalink raw reply	[flat|nested] 24+ messages in thread

* Re: Spam does not move
  2004-07-27 16:46                                     ` Ted Zlatanov
@ 2004-08-14 14:15                                       ` Kohkichi Hosoda
  0 siblings, 0 replies; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-08-14 14:15 UTC (permalink / raw)
  Cc: Ted Zlatanov

[-- Attachment #1: Type: text/plain, Size: 340 bytes --]

Sorry for delayed response.  I have been very busy for a while.  

>>>>> On 27 Jul 2004 12:46:58 -0400, "Ted Zlatanov" <tzz@lifelogs.com> said:

Ted> OK, but you need to use edebug or (debug) statements.  Here's
Ted> what I would use:

Ted> (spam-list-articles 'ham)

When I perfomed the process mentioned above, I obtained the following;


[-- Attachment #2: ham_debug_statement --]
[-- Type: application/octet-stream, Size: 825 bytes --]

Debugger entered--Lisp error: (wrong-number-of-arguments (lambda (articles classification) (let ((mark-check (if (eq classification (quote spam)) (quote spam-group-spam-mark-p) (quote spam-group-ham-mark-p))) alist mark-cache-yes mark-cache-no) (dolist (article articles) (let ((mark (gnus-summary-article-mark article))) (unless (or (memq mark mark-cache-yes) (memq mark mark-cache-no)) (if (funcall mark-check gnus-newsgroup-name mark) (push mark mark-cache-yes) (push mark mark-cache-no))) (debug (memq mark mark-cache-yes) mark-check article classification mark mark-cache-yes mark-cache-no) (when (memq mark mark-cache-yes) (push article alist)))) alist)) 1)
  spam-list-articles(ham)
  eval((spam-list-articles (quote ham)))
  eval-expression((spam-list-articles (quote ham)) nil)
* call-interactively(eval-expression)

[-- Attachment #3: Type: text/plain, Size: 101 bytes --]



Ted> list all spam article:

Ted> (spam-list-articles 'spam)

For this, I obtained the following;


[-- Attachment #4: spam_debug_statement --]
[-- Type: application/octet-stream, Size: 828 bytes --]

Debugger entered--Lisp error: (wrong-number-of-arguments (lambda (articles classification) (let ((mark-check (if (eq classification (quote spam)) (quote spam-group-spam-mark-p) (quote spam-group-ham-mark-p))) alist mark-cache-yes mark-cache-no) (dolist (article articles) (let ((mark (gnus-summary-article-mark article))) (unless (or (memq mark mark-cache-yes) (memq mark mark-cache-no)) (if (funcall mark-check gnus-newsgroup-name mark) (push mark mark-cache-yes) (push mark mark-cache-no))) (debug (memq mark mark-cache-yes) mark-check article classification mark mark-cache-yes mark-cache-no) (when (memq mark mark-cache-yes) (push article alist)))) alist)) 1)
  spam-list-articles(spam)
  eval((spam-list-articles (quote spam)))
  eval-expression((spam-list-articles (quote spam)) nil)
* call-interactively(eval-expression)

[-- Attachment #5: Type: text/plain, Size: 720 bytes --]


And when I did M-d on a mail already marked with "O", I got exactly
the same result as spam1-debug-statement above.  Therefore, I guess
something deletes spam mark on a mail previously marked with "O" when
I exit the summary buffer.  But I have no idea what it is.  

Ted> Again, sorry that I can't find the problem, but it's happening
Ted> only for you, so you have to do the hard work :)

You are not sorry.  I really appreciate your help.  :-)

>> What does "33" mean?  ham?


Ted> (format "%c" 33)

Ted> to find the visual representation of any mark. 

Thank you very much for teaching me so much.  

--
Kohkichi Hosoda
E-mail address: khosoda@venus.dti.ne.jp
http://www.venus.dti.ne.jp/~khosoda/Enlightenment.html

^ permalink raw reply	[flat|nested] 24+ messages in thread

* Spam does not move
@ 2004-05-16 13:20 Kohkichi Hosoda
  0 siblings, 0 replies; 24+ messages in thread
From: Kohkichi Hosoda @ 2004-05-16 13:20 UTC (permalink / raw)
  Cc: semi-gnus-ja

Hi, 

I recently decided to re-setup my spam-filtering.  I wanted spam in a
ham group to move into spam group when I exit the ham group.
Therefore, my Group parameter is set as the following:

((spam-contents gnus-group-spam-classification-ham)
 (spam-process
  ((spam spam-use-stat)
   (ham spam-use-stat)))
 (spam-process-destination "nnml:spam")
 (spam-marks
  (gnus-spam-mark)))

Everytime I find spam in a ham group, I mark it with M-d.  Then it
will go into the spam group when I exit summary buffer of the ham
group, but it does not.  I get messages as the followings:

Exiting summary buffer and applying spam rules
Registering 0  articles as spam using backend spam-use-stat
Marking spam as expired and moving it to (nnml:spam)
Marking spam as expired without moving it
Registering 0  articles as ham using backend spam-use-stat

However, the reality is that the spam resides in the ham group.  It
is not even marked as expired.  I probably have missed something, but
I'm not a Gnus master.  I would appreciate your help in advance.    

## The followings are my spam filtering in my .gnus.el according to
   Mr. Koseki's page (it's Japanese).   
http://cgi.netlaputa.ne.jp/~kose/diary/?200304a&to=200304091#200304091

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; spam filtering in my .gnus.el
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

(require 'spam)
(require 'spam-stat)
(spam-stat-load)
(setq spam-use-stat t)

;; Regular expression
 (setq spam-use-regex-headers t)
 (setq spam-regex-headers-spam
       '("Subject:.*未承諾広告"))

;; decode
 (setq nnmail-mail-splitting-decodes t)

;; Mailing list                                         
(modify-syntax-entry ?\- "w" nnmail-split-fancy-syntax-table)                                                     
(setq nnmail-split-fancy-ML-alist
       '(("x-ml-name" "\\b\\(\\w+\\)" "\\1")
	 ("errors-to\\|sender" "owner-\\(\\w+\\)@.*" "\\1")
	 ("sender" "\\b\\(\\w+\\)-\\(owner\\|admin\\)@.*" "\\1")
	 ("mailing-list" "\\bcontact \\b\\(\\w+\\)-\\(help\\|owner\\)@.*" "\\1")))

;; parent      
(setq nnmail-treat-duplicates 'warn)       
(setq nnmail-cache-accepted-message-ids t) 

;; group parameter & spam
(gnus-group-split-setup t "spam")

;; to myself
(setq nnmail-split-fancy-DM-alist
      '(("subject" "Output from \"cron\" command" "cron")
	(from "khosoda@[a-zA-Z.]+\\.jp" "kohkichi")
	(to "khosoda@[a-zA-Z.]+\\.jp"
	    (| ("subject" "re:" "kohkichi")
	       ("references" "@" "kohkichi")
	     ;  ("content-type" "multipart" "spam")
	       (from "[a-zA-Z]+\\.jp" "kohkichi")
	       "spam"))
	"spam"))

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

(setq gnus-group-split-updated-hook
      (lambda ()
	(setq nnmail-split-fancy
	      (append '(|)
		      ;; (1) spam
		      '((: spam-split))
		      ;; (2) mailing-list
		      nnmail-split-fancy-ML-alist
		      ;; (3) parent
		      '((: nnmail-split-fancy-with-parent))
		      ;; (4) Group parameter
		      (let ((lst (cdr nnmail-split-fancy))
			    first ret)
			(while (listp (setq first (car lst)))
			  (setq ret (append (list first) ret))
			  (setq lst (cdr lst)))
			ret)
		      ;; (5) DM
		      nnmail-split-fancy-DM-alist))))




^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2004-08-14 14:15 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-17 12:47 Spam does not move Kohkichi Hosoda
2004-05-17 15:17 ` Reiner Steib
2004-05-18 14:55   ` Kohkichi Hosoda
2004-05-18 15:40     ` Kai Grossjohann
2004-05-19 15:31       ` Kohkichi Hosoda
2004-05-19 18:07         ` Ted Zlatanov
2004-05-21 13:16           ` Kohkichi Hosoda
2004-05-22 14:11             ` Kohkichi Hosoda
2004-05-24 19:10             ` Ted Zlatanov
2004-05-28 17:00               ` Kohkichi Hosoda
2004-06-14 16:07                 ` Ted Zlatanov
2004-06-18 16:00                   ` Kohkichi Hosoda
2004-06-24 16:30                     ` Ted Zlatanov
2004-06-26 14:05                       ` Kohkichi Hosoda
2004-06-26 16:19                       ` Kohkichi Hosoda
2004-06-29 18:16                         ` Ted Zlatanov
2004-07-01 13:21                           ` Kohkichi Hosoda
2004-07-01 16:11                             ` Ted Zlatanov
2004-07-02 13:11                               ` Kohkichi Hosoda
2004-07-16 17:00                                 ` Ted Zlatanov
2004-07-25 14:29                                   ` Kohkichi Hosoda
2004-07-27 16:46                                     ` Ted Zlatanov
2004-08-14 14:15                                       ` Kohkichi Hosoda
  -- strict thread matches above, loose matches on Subject: below --
2004-05-16 13:20 Kohkichi Hosoda

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).