[Spambayes-checkins]
spambayes FAQ.txt, 1.2, 1.3 imapfilter.py, 1.17, 1.18
Tony Meyer
anadelonbrin at users.sourceforge.net
Thu Apr 17 17:49:43 EDT 2003
Update of /cvsroot/spambayes/spambayes
In directory sc8-pr-cvs1:/tmp/cvs-serv23128
Modified Files:
FAQ.txt imapfilter.py
Log Message:
Documentation fixes/additions.
Index: FAQ.txt
===================================================================
RCS file: /cvsroot/spambayes/spambayes/FAQ.txt,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** FAQ.txt 7 Apr 2003 00:53:45 -0000 1.2
--- FAQ.txt 17 Apr 2003 23:49:40 -0000 1.3
***************
*** 40,41 ****
--- 40,53 ----
you what this file is called (and where it is) down towards the
bottom of the page.
+
+ Q: This software is great! I want to implement it for all my users.
+ Are there plans to develop a server-side spambayes solution?
+ A: The problem with a server-side solution is that everyone has a
+ different idea of what is spam - that's the whole strength of the
+ bayesian-style filtering concept. If you are certain that *all*
+ of your users would agree on what is spam and what is not, then
+ this might work for you, but otherwise you really have to have
+ individual databases for each user. Either way, you should be
+ able to modify spambayes easily enough to fit into your setup.
+ Please let the list know if you do have success in this area, and
+ we'll update this answer.
Index: imapfilter.py
===================================================================
RCS file: /cvsroot/spambayes/spambayes/imapfilter.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** imapfilter.py 17 Apr 2003 21:14:53 -0000 1.17
--- imapfilter.py 17 Apr 2003 23:49:40 -0000 1.18
***************
*** 36,40 ****
Train Spam and Ham only, with pickled database
imapfilter -t -d bayes.db
!
To Do:
o Find a better way to remove old msg from info database when saving
--- 36,58 ----
Train Spam and Ham only, with pickled database
imapfilter -t -d bayes.db
!
! Warnings:
! o This is very alpha. The filter is currently being developed and
! tested. We do *not* recommend using it on a production system unless
! you are confident that you can get your mail back if you lose it. On
! the other hand, we do recommend that you test it for us and let us
! know if anything does go wrong. Once this appears in a release,
! rather than just cvs, you can feel a *little* <wink> more confident
! about using it.
! o By default, the filter does *not* delete, modify or move any of your
! mail. Due to quirks in how imap works, new versions of your mail are
! modified and placed in new folders, but there originals are still
! available. These are flagged with the /Deleted flag so that you know
! that they can be removed. Your mailer may not show these messages
! by default, but there should be an option to do so. *However*, if
! your mailer automatically purges/expunges (i.e. permantently deletes)
! mail flagged as such, *or* if you set the imap_expunge option to
! True, then this mail will be irretrievably lost.
!
To Do:
o Find a better way to remove old msg from info database when saving
***************
*** 62,67 ****
# Foundation license.
! __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>"
! __credits__ = "Tim Stone, All the Spambayes folk."
from __future__ import generators
--- 80,85 ----
# Foundation license.
! __author__ = "Tony Meyer <ta-meyer at ihug.co.nz>, Tim Stone"
! __credits__ = "All the Spambayes folk."
from __future__ import generators
***************
*** 94,108 ****
rfc822_command = "(RFC822.PEEK)"
- # For efficiency, we remember which folder we are currently
- # in, and only send a select command to the IMAP server if
- # we want to *change* folders. This function is used by
- # both IMAPMessage and IMAPFolder.
- # Occaisionally, we need to force a command, because we
- # are interested in the response. Things would be much
- # nicer if we cached this information somewhere.
- # XXX If we wanted to be nice and tidy, this really belongs
- # XXX in an IMAPUtilities class, or something like that,
- # XXX or something like this:
-
class IMAPSession(imaplib.IMAP4):
'''A class extending the IMAP4 class, with a few optimizations'''
--- 112,115 ----
***************
*** 111,114 ****
--- 118,125 ----
imaplib.Debug = debug # this is a global in the imaplib module
imaplib.IMAP4.__init__(self, server, port)
+ # For efficiency, we remember which folder we are currently
+ # in, and only send a select command to the IMAP server if
+ # we want to *change* folders. This function is used by
+ # both IMAPMessage and IMAPFolder.
self.current_folder = None
self.current_folder_readonly = None
***************
*** 136,139 ****
--- 147,153 ----
if self.current_folder != folder or \
self.current_folder_readonly != readOnly or force:
+ # Occasionally, we need to force a command, because we
+ # are interested in the response. Things would be much
+ # nicer if we cached this information somewhere.
response = self.select(folder, readOnly)
if response[0] != "OK":
***************
*** 348,356 ****
if options.verbose:
print "Filtering took", time.time() - t, "seconds."
-
! if __name__ == '__main__':
!
try:
opts, args = getopt.getopt(sys.argv[1:], 'htcvpl:e:i:d:D:')
--- 362,368 ----
if options.verbose:
print "Filtering took", time.time() - t, "seconds."
! def run():
try:
opts, args = getopt.getopt(sys.argv[1:], 'htcvpl:e:i:d:D:')
***************
*** 381,385 ****
doTrain = True
elif opt == '-p':
! promptForPass = 1
elif opt == '-c':
doClassify = True
--- 393,397 ----
doTrain = True
elif opt == '-p':
! promptForPass = True
elif opt == '-c':
doClassify = True
***************
*** 441,442 ****
--- 453,457 ----
else:
break
+
+ if __name__ == '__main__':
+ run()
\ No newline at end of file
More information about the Spambayes-checkins
mailing list