[Spambayes] Spambayes installation in SuSE Linux / No module
named zlib ?
Christopher Jastram
cej at intech.com
Tue Nov 11 10:31:04 EST 2003
Exactly what version of Python are you running?
I had the exact same problem a few weeks ago, and I think I fixed it by
downloading and installing the very latest version of Python from source
from python.org. Now, you are installing from source -- is it from RPM
source or python.org?
I think the version was 2.3.2, but I'm not sure. The computer I have it
on is at home -- grrrr.
My platform is SuSE 8.2 Professional, connecting to a Cyrus IMAP
server. I was setting sb_imapfilter to run in concert with Evolution,
but I abandoned it in favor of server-side filtering (which works quite
well, so far).
And, you are absolutely right about many manuals being written for
people who do not need them. I am only now (after 5 years' intensive
experience in Linux and FreeBSD) able to sit down with a manual and work
out how to use the software without using a HOWTO or tutorial. It is a
very time-consuming process, and I generally print out the manual on
paper and make lots of notes. Same for source code, but I can't print
source code out, which sucks (10k pages is no good).
Christopher Jastram
Olli J. Marttila wrote:
>
> Thanks to Christopher Jastram (I had to reconfigure
> python with the flag --enable-zlib; why was this not
> mentioned in installation instructions?) I was eventually
> able to open http://localhost:8880 and start training of
> Spambayes by feeding incoming messages one by one to the
> "Train on a message ..." window. Stupid as I am, I don't
> still succeed in setting the IMAP filter to run
> periodically. Command
>
> marttila at linux:~> python sb_imapfilter.py -c -t -l 10
>
> is answered by message
>
> python: can't open file 'sb_imapfilter.py';
>
> and defining the path
>
> marttila at linux:~> python /usr/local/bin/sb_imapfilter.py -c
> -t -l 10
>
> doesn't have a better success:
>
> SpamBayes IMAP Filter Beta1, version 0.1 (September 2003),
> using SpamBayes IMAP Filter Web Interface Alpha2, version
> 0.02 and engine SpamBayes Beta2, version 0.2 (July 2003).
>
> Traceback (most recent call last):
> File "/usr/local/bin/sb_imapfilter.py", line 825, in ?
> run()
> File "/usr/local/bin/sb_imapfilter.py", line 815, in run
> imap_filter.Filter()
> File "/usr/local/bin/sb_imapfilter.py", line 667, in Filter
> imap.SelectFolder(self.spam_folder.name)
> File "/usr/local/bin/sb_imapfilter.py", line 245, in
> SelectFolder
> response = self.select(folder, None)
> File "/usr/local/lib/python2.3/imaplib.py", line 606, in
> select
> typ, dat = self._simple_command(name, mailbox)
> File "/usr/local/lib/python2.3/imaplib.py", line 1000, in
> _simple_command
> return self._command_complete(name, self._command(name,
> *args))
> File "/usr/local/lib/python2.3/imaplib.py", line 774, in
> _command
> data = '%s %s' % (data, self._checkquote(arg))
> File "/usr/local/lib/python2.3/imaplib.py", line 983, in
> _checkquote
> if (arg[0],arg[-1]) in (('(',')'),('"','"')):
> IndexError: string index out of range
>
> I certainly must have missed some essential stages. - BTW,
> what is Spambayes Manager? I understood that SpamBayes
> should process the mail in three categories, but I cannot
> experience anything like that. How can I get this
> classifying started? - I created local mailboxes for spam
> and ham in my ~/Mail directory, and moved a little more
> than one thousand messages in them, arrived during last two
> weeks, but didn't know how to get Spambayes to use them for
> training - it refused to understand their format.
>
> My OS in SuSE Linux Personal edition 8.2, I am relying in
> KMail, and - what is apparent from what written above -
> using IMAP protocol. Spambayes version is 0.7. I have an
> external firewall (192.168.1.254). There is another,
> commercial spam filter (McAfee SpamKiller) for the
> Windows2000 mail programme (Eudora), that seems to filter
> most spam messages before they reach KMail; still there is
> need an effective filter for Linux based operations.
>
> Any good advice is welcome - and I have experienced with
> gratefulness that there are good advisers on this site! My
> instructor and superior, former chairman of the Board of
> the ADB services of the University, once defined that the
> programme manuals are written in a way that the
> instructions can be understood only by people who already
> know how to proceed without those instructions.
>
> - There is a saying in Finnish that the instructions must be
> modelled for the simple people wringing steel wire, and now
> I certainly need lots of wire to become to understand the
> installation instructions, be it the fact that I use Linux
> and KMail or that my mail protocol is IMAP. (There are good
> instructions in Finnish how to proceed with Mozilla Mail
> and POP3 protocol.)
>
> Olli J. Marttila
>
> ***********************
>
> On Friday 07 November 2003 03:36, Christopher Jastram wrote:
> >
> >
> > Take this with a grain of salt, because I haven't had
> > this particular problem. However, I have many similar
> > problems, both with Python and with other pieces of
> > software.
> >
> > Here's the deal: python is looking for a python module
> > called zlib, which is NOT included in the zlib /
> > zlib-devel RPMs. Fortunately, you've already compiled
> > Python (this tells me you know something about how this
> > stuff works). What you want is to enable 'zlib' support
> > when you compile python. You'll need zlib-devel to be
> > installed for Python to compile with zlib support
> > (already installed). Once Python is built and installed
> > with zlib support, the zlib.py module will exist in a
> > funcational form, and you'll be all set.
> >
> > How to enable zlib support? I dunno. Been a while since
> > I've had to compile python (I love FreeBSD ports!). Are
> > they using a configure script? If so, look in
> > ./configure --help for something like '--enable-zlib'.
> > Otherwise, look at the docs. (tip: grep -ir zlib doc/*)
> >
> > chris
>
>
More information about the Spambayes
mailing list