Gnus development mailing list
 help / color / mirror / Atom feed
* Training dspam
@ 2008-03-29 20:38 James Cloos
  2008-03-31 14:16 ` Ted Zlatanov
  0 siblings, 1 reply; 4+ messages in thread
From: James Cloos @ 2008-03-29 20:38 UTC (permalink / raw)
  To: ding

The manual suggests a couple of (defun)s to report erroneously collated
spam and innocent mail.  The synchronous nature of the recommended
functions has proven painfully slow to use on my aging laptop, so I came
up with these modified (defun)s.

Perhaps they will be useful to someone else.

(defun gnus-summary-dspam-report-spam ()
  "Submit spam to dspam, then mark it as expirable."
  (interactive)
  (gnus-summary-show-raw-article)
  (gnus-eval-in-buffer-window gnus-article-buffer
    (save-restriction
      (widen)
      (call-process-region (point-min) (point-max) "/usr/bin/dspam"
        nil 0 nil "--mode=teft" "--user" (getenv "USER")
        "--class=spam" "--source=error")))
  (gnus-summary-mark-as-expirable 1))

(defun gnus-summary-dspam-report-innocent ()
  "Submit false-positive to dspam."
  (interactive)
  (gnus-summary-show-raw-article)
  (gnus-eval-in-buffer-window gnus-article-buffer
    (save-restriction
      (widen)
      (call-process-region (point-min) (point-max) "/usr/bin/dspam"
        nil 0 nil "--mode=teft" "--user"  (getenv "USER")
        "--class=innocent" "--source=error"))))

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



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

* Re: Training dspam
  2008-03-29 20:38 Training dspam James Cloos
@ 2008-03-31 14:16 ` Ted Zlatanov
  2008-03-31 14:42   ` James Cloos
  0 siblings, 1 reply; 4+ messages in thread
From: Ted Zlatanov @ 2008-03-31 14:16 UTC (permalink / raw)
  To: James Cloos; +Cc: ding

On Sat, 29 Mar 2008 16:38:03 -0400 James Cloos <cloos@jhcloos.com> wrote: 

JC> The manual suggests a couple of (defun)s to report erroneously collated
JC> spam and innocent mail.  The synchronous nature of the recommended
JC> functions has proven painfully slow to use on my aging laptop, so I came
JC> up with these modified (defun)s.

JC> Perhaps they will be useful to someone else.

JC> (defun gnus-summary-dspam-report-spam ()
JC>   "Submit spam to dspam, then mark it as expirable."
JC>   (interactive)
JC>   (gnus-summary-show-raw-article)
JC>   (gnus-eval-in-buffer-window gnus-article-buffer
JC>     (save-restriction
JC>       (widen)
JC>       (call-process-region (point-min) (point-max) "/usr/bin/dspam"
JC>         nil 0 nil "--mode=teft" "--user" (getenv "USER")
JC>         "--class=spam" "--source=error")))
JC>   (gnus-summary-mark-as-expirable 1))

JC> (defun gnus-summary-dspam-report-innocent ()
JC>   "Submit false-positive to dspam."
JC>   (interactive)
JC>   (gnus-summary-show-raw-article)
JC>   (gnus-eval-in-buffer-window gnus-article-buffer
JC>     (save-restriction
JC>       (widen)
JC>       (call-process-region (point-min) (point-max) "/usr/bin/dspam"
JC>         nil 0 nil "--mode=teft" "--user"  (getenv "USER")
JC>         "--class=innocent" "--source=error"))))

Thanks for the code.  It looks useful, can it go into spam.el (do you
have the papers)?  I may use the same approach for all the reporting
functions if it's faster than what's there already.  I don't use dspam
personally and need to review to make sure the code is consistent, but
the papers come first...

Ted



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

* Re: Training dspam
  2008-03-31 14:16 ` Ted Zlatanov
@ 2008-03-31 14:42   ` James Cloos
  2008-03-31 19:58     ` Reiner Steib
  0 siblings, 1 reply; 4+ messages in thread
From: James Cloos @ 2008-03-31 14:42 UTC (permalink / raw)
  To: Ted Zlatanov; +Cc: ding

>>>>> "Ted" == Ted Zlatanov <tzz@lifelogs.com> writes:

Ted> Thanks for the code.  It looks useful, can it go into spam.el (do you
Ted> have the papers)?  I may use the same approach for all the reporting
Ted> functions if it's faster than what's there already.  I don't use dspam
Ted> personally and need to review to make sure the code is consistent, but
Ted> the papers come first...

It can go in if desired.

I have papers on file for Emacs; I don't know the policy on whether that
is sufficient for the cvs.gnus.org repo as well....

The argument to dspam's --mode option and the path to the executable
probably should be customizable.  I didn't think of that when I modified
the code for posting.

-JimC
-- 
James Cloos <cloos@jhcloos.com>         OpenPGP: 1024D/ED7DAEA6



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

* Re: Training dspam
  2008-03-31 14:42   ` James Cloos
@ 2008-03-31 19:58     ` Reiner Steib
  0 siblings, 0 replies; 4+ messages in thread
From: Reiner Steib @ 2008-03-31 19:58 UTC (permalink / raw)
  To: James Cloos; +Cc: Ted Zlatanov, ding

On Mon, Mar 31 2008, James Cloos wrote:

> I have papers on file for Emacs; I don't know the policy on whether that
> is sufficient for the cvs.gnus.org repo as well....

Your papers for Emacs cover contributions to Gnus as well, because
Gnus is part of Emacs.  Thanks for your contribution.

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



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

end of thread, other threads:[~2008-03-31 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-29 20:38 Training dspam James Cloos
2008-03-31 14:16 ` Ted Zlatanov
2008-03-31 14:42   ` James Cloos
2008-03-31 19:58     ` Reiner Steib

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