Gnus development mailing list
 help / color / mirror / Atom feed
From: Ted Zlatanov <tzz@lifelogs.com>
Subject: spam.el proposed group parameters
Date: Mon, 30 Dec 2002 18:38:24 -0500	[thread overview]
Message-ID: <m3of73dqmn.fsf_-_@heechee.beld.net> (raw)
In-Reply-To: <m3u1gvdt7p.fsf@heechee.beld.net> (Ted Zlatanov's message of "Mon, 30 Dec 2002 17:42:34 -0500")

I'd like to add the following group parameters to gnus.el, but I have
very little knowledge of the accepted practices for group parameters.

Also, I'll have to define a 'spam' variable group and move all the
existing variables to it in spam.el, so ignore the "variable-group
nnmail-expire" piece for now.

The idea is that these group parameters will work in parallel with the
regular spam.el variables.  But I'm not sure if I should let the
system-wide variables override the group parameters or vice versa.

For instance, say a user enabled spam-process-with-ifile for a group,
but also has spam-use-ifile set to nil.  What's the accepted Gnus
behavior in this case?  Am I approaching the problem the wrong way?
Should I eliminate the system-wide variables and only use group
parameters?

The existing examples of gnus-define-group-parameter didn't show the
code I needed, and I'm not sure how to use that function.  I would
like to use choices instead of simple booleans, so for instance
spam-process-with-ifile and spam-process-with-bogofilter would just be
two choices in the list spam-process-backends, and the group type
would be 'ham or 'spam.  That would be better than booleans, I think.
So how do I use gnus-define-group-parameter to define a list of
symbolic tags, and then later in other code check whether a tag is in
the current list?  Any help is greatly appreciated.

Thanks
Ted

------------------------------------------------------------------------

;; group parameters for spam processing added by Ted Zlatanov <tzz@lifelogs.com>
(gnus-define-group-parameter
 spam
 :type bool
 :function gnus-group-spam-p
 :function-document
 "Check whether GROUP is designated as a spam group or not."
 :variable gnus-spam-newsgroups
 :variable-default nil
 :variable-document
 "*Groups in which to automatically mark new articles as spam on
summary entry.  If non-nil, this should be a regexp that should match
all groups in which to do automatic spam tagging.  This only makes
sense for mail groups."
 :variable-group nnmail-expire
 :variable-type '(choice (const nil)
		 regexp)
 :parameter-type '(const :tag "Group Contents Are Spam" t)
 :parameter-document
 "All articles that are unread will be marked as spam on summary entry.")

(gnus-define-group-parameter
 ham
 :type bool
 :function gnus-group-ham-p
 :function-document
 "Check whether GROUP is designated as a ham (non-spam) group or not."
 :variable gnus-ham-newsgroups
 :variable-default nil
 :variable-document
 "*Groups in which to automatically process new articles as ham
(non-spam) on summary exit.  If non-nil, this should be a regexp that
should match all groups in which to do automatic ham tagging.  This
only makes sense for mail groups."
 :variable-group nnmail-expire
 :variable-type '(choice (const nil)
		 regexp)
 :parameter-type '(const :tag "Group Contents Are Not Spam" t)
 :parameter-document
 "All articles that are not marked as spam will be processed as such at summary exit.")

(gnus-define-group-parameter
 spam-process
 :type bool
 :function gnus-group-spam-process-p
 :function-document
 "Check whether GROUP articles will be processed as spam at summary exit."
 :variable gnus-spam-process-newsgroups
 :variable-default t
 :variable-document
 "*Groups in which to automatically process spam articles on
summary exit.  If non-nil, this should be a regexp that should match
all groups in which to do automatic spam processing.  This only makes
sense for mail groups."
 :variable-group nnmail-expire
 :variable-type '(choice (const nil)
		 regexp)
 :parameter-type '(const :tag "Group Contents Are Processed As Spam" t)
 :parameter-document
 "Articles that are marked as spam will be processed on summary exit.")

(gnus-define-group-parameter
 spam-process-with-ifile
 :type bool
 :function gnus-group-spam-process-with-ifile-p
 :function-document
 "Check whether GROUP articles will be processed as spam with ifile at summary exit."
 :variable gnus-spam-process-with-ifile-newsgroups
 :variable-default nil
 :variable-document
 "*Groups in which to automatically process spam articles with ifile
on summary exit.  If non-nil, this should be a regexp that should
match all groups in which to do automatic spam processing with ifile.
This only makes sense for mail groups."
 :variable-group nnmail-expire
 :variable-type '(choice (const nil)
		 regexp)
 :parameter-type '(const :tag "Group Contents Are Processed As Spam With Ifile" t)
 :parameter-document
 "Articles that are marked as spam will be processed with ifile on summary exit.")

(gnus-define-group-parameter
 spam-process-with-bogofilter
 :type bool
 :function gnus-group-spam-process-with-bogofilter-p
 :function-document
 "Check whether GROUP articles will be processed as spam with bogofilter at summary exit."
 :variable gnus-spam-process-with-bogofilter-newsgroups
 :variable-default nil
 :variable-document
 "*Groups in which to automatically process spam articles with
bogofilter on summary exit.  If non-nil, this should be a regexp that
should match all groups in which to do automatic spam processing with
bogofilter.  This only makes sense for mail groups."
 :variable-group nnmail-expire
 :variable-type '(choice (const nil)
		 regexp)
 :parameter-type '(const :tag "Group Contents Are Processed As Spam With Bogofilter" t)
 :parameter-document
 "Articles that are marked as spam will be processed with bogofilter on summary exit.")

(gnus-define-group-parameter
 spam-process-with-blacklist
 :type bool
 :function gnus-group-spam-process-with-blacklist-p
 :function-document
 "Check whether GROUP articles will be processed as spam, adding senders to the blacklist at summary exit."
 :variable gnus-spam-process-with-blacklist-newsgroups
 :variable-default nil
 :variable-document
 "*Groups in which to automatically process spam articles, adding
senders to the blacklist on summary exit.  If non-nil, this should be
a regexp that should match all groups in which to do automatic spam
processing with the blacklist.  This only makes sense for mail
groups."
 :variable-group nnmail-expire
 :variable-type '(choice (const nil)
		 regexp)
 :parameter-type '(const :tag "Group Contents Are Processed As Spam With Blacklist" t)
 :parameter-document
 "Articles that are marked as spam will be processed with blacklist on summary exit.")

(gnus-define-group-parameter
 spam-process-ham-with-whitelist
 :type bool
 :function gnus-group-spam-process-ham-with-whitelist-p
 :function-document
 "Check whether GROUP articles will be processed as ham, adding senders to the whitelist at summary exit."
 :variable gnus-spam-process-ham-with-whitelist-newsgroups
 :variable-default nil
 :variable-document
 "*Groups in which to automatically process ham (non-spam) articles,
adding senders to the whitelist on summary exit.  If non-nil, this
should be a regexp that should match all groups in which to do
automatic ham processing with the whitelist.  This only makes sense
for mail groups."
 :variable-group nnmail-expire
 :variable-type '(choice (const nil)
		 regexp)
 :parameter-type '(const :tag "Group Contents Are Processed As Ham With Whitelist" t)
 :parameter-document
 "Ham (non-spam) articles will be processed with whitelist on summary exit.")

(gnus-define-group-parameter
 spam-process-ham-with-BBDB
 :type bool
 :function gnus-group-spam-process-ham-with-BBDB-p
 :function-document
 "Check whether GROUP articles will be processed as ham, adding senders to the BBDB at summary exit."
 :variable gnus-spam-process-ham-with-BBDB-newsgroups
 :variable-default nil
 :variable-document
 "*Groups in which to automatically process ham (non-spam) articles,
adding senders to the BBDB on summary exit.  If non-nil, this
should be a regexp that should match all groups in which to do
automatic ham processing with the BBDB.  This only makes sense
for mail groups."
 :variable-group nnmail-expire
 :variable-type '(choice (const nil)
		 regexp)
 :parameter-type '(const :tag "Group Contents Are Processed As Ham With BBDB" t)
 :parameter-document
 "Ham (non-spam) articles will be processed with BBDB on summary exit.")





  reply	other threads:[~2002-12-30 23:38 UTC|newest]

Thread overview: 144+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-31 19:24 new spam functionality added Ted Zlatanov
2002-07-31 19:54 ` Scott A Crosby
2002-07-31 20:07   ` Ted Zlatanov
2002-07-31 20:14   ` Simon Josefsson
2002-07-31 20:25     ` Josh Huber
2002-07-31 20:34       ` Scott A Crosby
2002-07-31 20:41         ` Josh Huber
2002-07-31 21:03           ` Stainless Steel Rat
2002-07-31 21:08             ` Stainless Steel Rat
2002-07-31 21:12             ` Josh Huber
2002-07-31 21:38               ` Paul Jarc
2002-07-31 23:19                 ` David Masterson
2002-07-31 23:08               ` Frank Schmitt
2002-08-01 17:03                 ` Josh Huber
2002-08-01 17:38                   ` Harry Putnam
2002-08-01 19:16                     ` Scott A Crosby
2002-08-01 22:43                       ` Harry Putnam
2002-08-05 17:16                       ` Per Abrahamsen
2002-08-01  1:25               ` Stainless Steel Rat
2002-08-01  1:33                 ` Scott A Crosby
2002-08-01  2:17                   ` Stainless Steel Rat
2002-08-01 19:20                     ` David Masterson
2002-08-01 20:00                       ` Stainless Steel Rat
2002-08-02 23:37                     ` Florian Weimer
2002-08-02 23:45                       ` Russ Allbery
2002-08-03 10:23                       ` Simon Josefsson
2002-08-03 13:47                         ` Stainless Steel Rat
2002-08-03 16:01                           ` hashcash (was Re: new spam functionality added) Simon Josefsson
2002-08-04  6:55                             ` Stainless Steel Rat
2002-08-01 19:17                 ` new spam functionality added David Masterson
2002-08-01 19:59                   ` Stainless Steel Rat
2002-07-31 21:07           ` Scott A Crosby
2002-07-31 21:35             ` Paul Jarc
2002-07-31 21:58               ` Josh Huber
2002-07-31 21:47             ` Josh Huber
2002-07-31 21:54               ` Paul Jarc
2002-07-31 22:05                 ` Josh Huber
2002-07-31 22:10                   ` Paul Jarc
2002-07-31 22:35               ` Scott A Crosby
2002-07-31 23:10                 ` Josh Huber
2002-08-01 16:56                   ` Paul Jarc
2002-07-31 23:30                 ` Alan Shutko
2002-08-01 19:25                   ` David Masterson
2002-08-01 19:33                     ` Josh Huber
2002-08-01 22:06                       ` Scott A Crosby
2002-08-01 22:13                         ` Paul Jarc
2002-08-01 22:18                           ` Jack Twilley
2002-08-01 22:23                             ` TMDA (was: new spam functionality added) Paul Jarc
2002-08-01 22:40                               ` Scott A Crosby
2002-08-01 23:29                                 ` Josh Huber
2002-08-02  2:11                                   ` Scott A Crosby
2002-08-01 19:34                     ` new spam functionality added Ted Zlatanov
2002-08-01 19:39                       ` Paul Jarc
2002-08-01 21:38                       ` Simon Josefsson
2002-08-23  1:50                         ` Ted Zlatanov
2002-08-23  2:42                           ` Katsumi Yamaoka
2002-08-23  3:10                             ` Ted Zlatanov
2002-12-30  0:10                           ` Lars Magne Ingebrigtsen
2002-12-30  2:31                             ` Ted Zlatanov
2002-12-30  2:52                               ` Lars Magne Ingebrigtsen
2002-12-30  3:13                                 ` Ted Zlatanov
2002-12-30  3:27                                   ` Lars Magne Ingebrigtsen
2002-12-30  3:44                                     ` Ted Zlatanov
2002-12-30  4:12                                       ` Lars Magne Ingebrigtsen
2002-12-30  4:48                                         ` Ted Zlatanov
2002-12-30  5:08                                           ` Lars Magne Ingebrigtsen
2002-12-30 19:03                                             ` spam.el now supports blackholes by default Ted Zlatanov
2002-12-30 21:41                                               ` Matt Armstrong
2002-12-30 22:42                                                 ` Ted Zlatanov
2002-12-30 23:38                                                   ` Ted Zlatanov [this message]
2002-12-31  0:02                                                     ` spam.el proposed group parameters Lars Magne Ingebrigtsen
2003-01-05 16:58                                                 ` spam.el now supports blackholes by default luis fernandes
2003-01-05 22:07                                                   ` Ted Zlatanov
2003-01-06  2:15                                                   ` Lars Magne Ingebrigtsen
2002-08-02  2:05             ` new spam functionality added Jason R. Mastaler
2002-08-02  3:43               ` Russ Allbery
2002-08-02  4:29                 ` Jason R. Mastaler
2002-08-02  4:34                   ` Russ Allbery
2002-08-02 16:17                     ` TMDA (was: new spam functionality added) Paul Jarc
2002-08-02 21:46                       ` Russ Allbery
2002-08-02 21:53                         ` Paul Jarc
2002-08-05 17:38                       ` Per Abrahamsen
2002-08-05 17:49                         ` Paul Jarc
2002-08-05 17:57                           ` Simon Josefsson
2002-08-05 20:18                             ` David Masterson
2002-08-05 20:46                               ` Stainless Steel Rat
2002-08-05 21:50                                 ` Russ Allbery
2002-08-06  0:43                                   ` Stainless Steel Rat
2002-08-06  3:04                                 ` David Masterson
2002-08-06 14:27                                   ` Stainless Steel Rat
2002-08-06 17:13                                     ` David Masterson
2002-08-06 17:26                                       ` David Masterson
2002-08-06 18:08                                         ` Stainless Steel Rat
2002-08-07 12:02                                           ` Lloyd Zusman
2002-12-30  0:22                                             ` Hashcash (was: TMDA) Lars Magne Ingebrigtsen
2003-01-02 18:33                                               ` Hashcash Simon Josefsson
2003-01-02 19:25                                                 ` Hashcash Lars Magne Ingebrigtsen
2003-01-02 21:01                                                   ` Hashcash Simon Josefsson
2003-01-02 21:05                                                     ` Hashcash Lars Magne Ingebrigtsen
2002-08-05 18:30                           ` TMDA (was: new spam functionality added) Stainless Steel Rat
2002-08-05 20:46                             ` David Masterson
2002-08-05 21:33                               ` Stainless Steel Rat
2002-08-06  3:28                                 ` David Masterson
2002-08-06 16:02                                   ` Paul Jarc
2002-08-08  9:21                                     ` Steinar Bang
2002-08-08 15:34                                       ` Paul Jarc
2002-08-08 19:57                                         ` Steinar Bang
2002-08-08 20:17                                           ` Paul Jarc
2002-08-08 21:30                                             ` Steinar Bang
2002-08-08 21:35                                               ` Paul Jarc
2002-08-08 22:27                                                 ` Steinar Bang
2002-08-08 17:26                                       ` Matt Armstrong
2002-08-08 20:23                                         ` Steinar Bang
2002-08-09 19:32                                           ` Matt Armstrong
2002-08-10  9:23                                             ` Steinar Bang
2002-08-10 17:21                                               ` Paul Jarc
2002-08-11  8:41                                                 ` Steinar Bang
2002-08-11 14:58                                                   ` Steinar Bang
2002-08-11  8:47                                             ` Steinar Bang
2002-08-12 16:04                                               ` Paul Jarc
2002-08-12 21:38                                                 ` Steinar Bang
2002-08-12 22:40                                                   ` Paul Jarc
2002-08-13  9:21                                                     ` Steinar Bang
2002-08-05 20:11                         ` David Masterson
2002-08-06  2:15                         ` Scott A Crosby
2002-08-06 10:10                           ` Per Abrahamsen
2002-08-06 13:20                             ` Scott A Crosby
2002-08-06 16:13                               ` Per Abrahamsen
2002-08-16 14:23             ` new spam functionality added clemens fischer
2002-08-05 17:07         ` Per Abrahamsen
2002-07-31 20:46       ` Jack Twilley
2002-07-31 21:01         ` Josh Huber
2002-07-31 21:03         ` Simon Josefsson
2002-07-31 21:51           ` David Masterson
2002-07-31 21:08       ` Simon Josefsson
2002-07-31 22:05         ` David Masterson
2002-07-31 23:32           ` Alan Shutko
2002-08-01 17:00             ` Paul Jarc
2002-08-05 18:07           ` Simon Josefsson
2002-08-05 18:23             ` TMDA (was: new spam functionality added) Paul Jarc
2002-08-05 23:41               ` Simon Josefsson
2002-08-06 10:27                 ` Per Abrahamsen
2002-08-06 15:57                 ` Paul Jarc
2002-07-31 20:35     ` new spam functionality added Ted Zlatanov

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=m3of73dqmn.fsf_-_@heechee.beld.net \
    --to=tzz@lifelogs.com \
    /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).