* 2 problems with spam + spam-stat
@ 2003-01-12 22:10 Bill White
2003-01-13 5:18 ` Ted Zlatanov
0 siblings, 1 reply; 4+ messages in thread
From: Bill White @ 2003-01-12 22:10 UTC (permalink / raw)
1 - the contents of spam-stat-file do not survive the first automated
spam study: I mark spam in my mail.misc, quit, the spam is studied and
expired:
----------------------------------------------------------------------
Mark set
No more articles [2 times]
Moving to nnml:spam: (319)...
Wrote /billw/Mail-2003/spam/157
Moving to nnml:spam: (320)...
Wrote /billw/Mail-2003/spam/158
Wrote /billw/Mail-2003/.spam-stat.el
Expiring articles...done
Wrote /billw/Mail-2003/.newsrc-dribble
Mark set
----------------------------------------------------------------------
Then spam-stat-file looks like this:
----------------------------------------------------------------------
(setq spam-stat-ngood 0 spam-stat-nbad 0 spam-stat (spam-stat-to-hash-table '()))
----------------------------------------------------------------------
So I study spam again:
Learn spam: (spam-stat-process-spam-directory "/billw/Mail-2003/spam")
Learn spam: (spam-stat-process-spam-directory "/billw/Mail-2003/spamassassin")
Learn spam: (spam-stat-process-spam-directory "/billw/Mail-2003/spamtrap")
Learn non-spam: (spam-stat-process-non-spam-directory "/billw/Mail-2003/mail/misc/2003/01")
Reduce table size: (spam-stat-reduce-size)
Save table: (spam-stat-save)
Then spam-stat-file looks like this:
----------------------------------------------------------------------
(setq spam-stat-ngood 73 spam-stat-nbad 949 spam-stat (spam-stat-to-hash-table ...
----------------------------------------------------------------------
2 - After adding spam-stat-split-fancy to nnmail-split-fancy like
this:
----------------------------------------------------------------------
(setq nnmail-split-fancy
'(|
("to" ".*billw@wri\\.com" "spamtrap")
("List-Id" ".*pstricks\\.tug\\.org.*" "pstricks")
("List-Id" ".*virtual fonts <fontinst\\.tug\\.org.*" "fontinst")
;; [...]
(: spam-stat-split-fancy)
(: (lambda nil (format-time-string "mail.misc.%Y.%m")))))
----------------------------------------------------------------------
I get an error when splitting (copied from the Messages buffer):
Result: nil
Result: (wrong-type-argument stringp nil)
Error in spam-stat-split-fancy: (wrong-type-argument stringp nil)
Result: "Error in spam-stat-split-fancy: (wrong-type-argument stringp nil)"
Result: nil
Edebug on spam-stat-split-fancy reveals that during splitting
spam-stat-buffer is nil, which results in an error.
Settings
========
Oort Gnus v0.12 (cvs from early Sunday morning), GNU Emacs 21.3.50.2
(i586-pc-linux-gnu, X toolkit) of 2002-12-03 on seton
I load the machinery with:
(require 'spam)
Here's the customized stuff. The first three aren't really used in my
setup, I think.
'(spam-directory "/billw/Mail-2003/spam-directory/")
'(spam-blacklist "/billw/Mail-2003/spam-directory/blacklist")
'(spam-whitelist "/billw/Mail-2003/spam-directory/whitelist")
'(spam-face (quote gnus-summary-low-ticked-face))
'(spam-junk-mailgroups (quote ("nnml:spam" "nnml:spamassassin" "nnml:junk" "nnml:spamtrap")))
'(spam-use-stat t)
'(spam-stat-file "/billw/Mail-2003/.spam-stat.el")
'(spam-stat-split-fancy-spam-group "nnml:spam")
And I've customized the group parameters of my spam groups and my one
non-spam group per the manual.
Let me know if there's any other information I can provide or tests I
can run.
Cheers -
bw
--
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2 problems with spam + spam-stat
2003-01-12 22:10 2 problems with spam + spam-stat Bill White
@ 2003-01-13 5:18 ` Ted Zlatanov
2003-01-13 13:03 ` Bill White
0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2003-01-13 5:18 UTC (permalink / raw)
Cc: ding
On Sun, 12 Jan 2003, billw@wolfram.com wrote:
> 1 - the contents of spam-stat-file do not survive the first
> automated spam study: I mark spam in my mail.misc, quit, the spam is
> studied and expired:
>
> ----------------------------------------------------------------------
> Mark set No more articles [2 times] Moving to nnml:spam: (319)...
> Wrote /billw/Mail-2003/spam/157 Moving to nnml:spam: (320)... Wrote
> /billw/Mail-2003/spam/158 Wrote /billw/Mail-2003/.spam-stat.el
> Expiring articles...done Wrote /billw/Mail-2003/.newsrc-dribble Mark
> set
> ----------------------------------------------------------------------
>
> Then spam-stat-file looks like this:
>
> ----------------------------------------------------------------------
> (setq spam-stat-ngood 0 spam-stat-nbad 0 spam-stat
> (spam-stat-to-hash-table '()))
> ----------------------------------------------------------------------
>
> So I study spam again:
>
> Learn spam: (spam-stat-process-spam-directory
> "/billw/Mail-2003/spam") Learn spam:
> (spam-stat-process-spam-directory "/billw/Mail-2003/spamassassin")
> Learn spam: (spam-stat-process-spam-directory
> "/billw/Mail-2003/spamtrap") Learn non-spam:
> (spam-stat-process-non-spam-directory
> "/billw/Mail-2003/mail/misc/2003/01") Reduce table size:
> (spam-stat-reduce-size) Save table: (spam-stat-save)
>
> Then spam-stat-file looks like this:
>
> ----------------------------------------------------------------------
> (setq spam-stat-ngood 73 spam-stat-nbad 949 spam-stat
> (spam-stat-to-hash-table ...
> ----------------------------------------------------------------------
I can't comment on this, I think it's a spam-stat.el issue unless it's
related to something below. Alex?
> 2 - After adding spam-stat-split-fancy to nnmail-split-fancy like
> this:
>
> ----------------------------------------------------------------------
> (setq nnmail-split-fancy '(| ("to" ".*billw@wri\\.com" "spamtrap")
> ("List-Id" ".*pstricks\\.tug\\.org.*" "pstricks") ("List-Id"
> ".*virtual fonts <fontinst\\.tug\\.org.*" "fontinst") ;; [...]
> (: spam-stat-split-fancy) (: (lambda nil (format-time-string
> "mail.misc.%Y.%m")))))
> ----------------------------------------------------------------------
>
> I get an error when splitting (copied from the Messages buffer):
>
> Result: nil Result: (wrong-type-argument stringp nil) Error in
> spam-stat-split-fancy: (wrong-type-argument stringp nil) Result:
> "Error in spam-stat-split-fancy: (wrong-type-argument stringp nil)"
> Result: nil
>
> Edebug on spam-stat-split-fancy reveals that during splitting
> spam-stat-buffer is nil, which results in an error.
You should use the spam-split function, it invokes
spam-stat-split-fancy with spam-stat-buffer set appropriately when
spam-use-stat is set (as you have). spam-stat-split-fancy will only
work on its own if you load spam-stat.el directly, without spam.el.
Let me know how that works.
Thanks
Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2 problems with spam + spam-stat
2003-01-13 5:18 ` Ted Zlatanov
@ 2003-01-13 13:03 ` Bill White
2003-01-13 17:34 ` Ted Zlatanov
0 siblings, 1 reply; 4+ messages in thread
From: Bill White @ 2003-01-13 13:03 UTC (permalink / raw)
On Sun Jan 12 2003 at 23:18, Ted Zlatanov <tzz@lifelogs.com> said:
> On Sun, 12 Jan 2003, billw@wolfram.com wrote:
>> 1 - the contents of spam-stat-file do not survive the first
>> automated spam study: I mark spam in my mail.misc, quit, the spam
>> is studied and expired:
[...]
>> Then spam-stat-file looks like this:
>>
>> ----------------------------------------------------------------------
>> (setq spam-stat-ngood 0 spam-stat-nbad 0 spam-stat
>> (spam-stat-to-hash-table '()))
>> ----------------------------------------------------------------------
>>
> I can't comment on this, I think it's a spam-stat.el issue unless
> it's related to something below. Alex?
Loading the spam-stat-file at startup solves the problem:
----------------------------------------------------------------------
(require 'spam)
(setq spam-stat-file "/billw/Mail-2003/.spam-stat.el")
(spam-stat-load)
----------------------------------------------------------------------
I realized it's just a setq, so it needed to be loaded into memory
before the automated study stuff began working.
>> 2 - After adding spam-stat-split-fancy to nnmail-split-fancy like
>> this:
[...]
>> I get an error when splitting (copied from the Messages buffer):
>>
>> Result: nil Result: (wrong-type-argument stringp nil) Error in
>> spam-stat-split-fancy: (wrong-type-argument stringp nil) Result:
>> "Error in spam-stat-split-fancy: (wrong-type-argument stringp nil)"
>> Result: nil
>>
>> Edebug on spam-stat-split-fancy reveals that during splitting
>> spam-stat-buffer is nil, which results in an error.
>
> You should use the spam-split function, it invokes
> spam-stat-split-fancy with spam-stat-buffer set appropriately when
> spam-use-stat is set (as you have). spam-stat-split-fancy will only
> work on its own if you load spam-stat.el directly, without spam.el.
> Let me know how that works.
I get an error in splitting, but even though I instrumented
spam-check-stat, I can't trace it.
Moving to nnml: (342)...
Loading gnus-dup...done
Loading /billw/Mail-2003/.spam-stat.el (source)...done
Error in `nnmail-split-methods'; using `bogus' mail group
Wrote /billw/Mail-2003/bogus/4
Late list night I "solved" this problem by using spam-stat-split-fancy
in my fancy split rules and explicitly adding the appropriate hooks in
my .gnus file:
(add-hook 'nnmail-prepare-incoming-message-hook
'spam-stat-store-current-buffer)
(add-hook 'gnus-select-article-hook
'spam-stat-store-gnus-article-buffer)
Cheers -
bw
--
Bill White . billw@wolfram.com . http://members.wri.com/billw
"No ma'am, we're musicians."
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: 2 problems with spam + spam-stat
2003-01-13 13:03 ` Bill White
@ 2003-01-13 17:34 ` Ted Zlatanov
0 siblings, 0 replies; 4+ messages in thread
From: Ted Zlatanov @ 2003-01-13 17:34 UTC (permalink / raw)
Cc: ding
On Mon, 13 Jan 2003, billw@wolfram.com wrote:
> I get an error in splitting, but even though I instrumented
> spam-check-stat, I can't trace it.
>
> Moving to nnml: (342)...
> Loading gnus-dup...done
> Loading /billw/Mail-2003/.spam-stat.el (source)...done
> Error in `nnmail-split-methods'; using `bogus' mail group
> Wrote /billw/Mail-2003/bogus/4
>
> Late list night I "solved" this problem by using
> spam-stat-split-fancy in my fancy split rules and explicitly adding
> the appropriate hooks in my .gnus file:
>
> (add-hook 'nnmail-prepare-incoming-message-hook
> 'spam-stat-store-current-buffer)
> (add-hook 'gnus-select-article-hook
> 'spam-stat-store-gnus-article-buffer)
Try this:
- do not load spam-stat.el and disable the hooks above
- load spam.el
- in the article buffer that gave you trouble above, run
M-: (spam-check-stat)
It should produce some sort of error, I hope.
Ted
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2003-01-13 17:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-01-12 22:10 2 problems with spam + spam-stat Bill White
2003-01-13 5:18 ` Ted Zlatanov
2003-01-13 13:03 ` Bill White
2003-01-13 17:34 ` Ted Zlatanov
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).