[Spambayes] imap4 filter

Tony Meyer tameyer at ihug.co.nz
Mon Dec 29 20:15:44 EST 2003

> I guess I misunderstood how this works.  I thought somehow running 
> sb_impfilter.py would start up some sort of "service" that would run 
> constantly on my server, even when no one is logged into it 
> (like the mail service).  That way, I could access and configure it
> whenever I wanted remotely from a web browser.

The thing is that we have no way of installing things onto your mail server
- you have to run things on your own machine.  As long as you leave it
running somewhere, though, you can set it up to configure it remotely, if
you like.

> But it seems that at least the imap filter 
> part of spambayes is set up more from the standpoint of a 
> client machine (the workstation) rather than to run on a server.

SpamBayes is completely client based (although some people have fiddled
around with it to make it run server-side).  That's part of the whole idea

> But reading the whole of the instructions including the pop3 
> part, confused me 
> as to how the imap filter module worked.

The pop3 proxy is also client side (all of spambayes is).

> No, I made no changes whatsoever; all I did was install the 
> python package to c:\python23 and then run the install package
> setup.py.  This seemed to copy some items into various
> subfolders within the \python23 folder.

That's right.

> Then I 
> started the imap filter and tried to configure it.  I had a 
> problem at first, because after putting in the information about the 
> mail server, I had to stop the process and restart it before
> I could proceed.

That's a bug with 1.0a7 - it should be fixed in the next release.

> Then I tried to configure the filtering and
> this is where I ran into the errors.

Hmm.  I tried 1.0a7 and it works here.  Do the folder names on your imap
server have an odd character in them?  (something like '<' or '>')?  If
you're willing, could you try the following and let me know what you get?

1.  Open a command prompt.
2.  Type "c:\python23\python"
3.  Type "from imaplib import IMAP4"
5.  Type "i.login('YOUR USERNAME', 'YOUR PASSWORD')"
    [You'll see a "ok" message]
6   Type "i.list()"
    [You'll see a list of all your IMAP folders - this is what I'd like to
7.  Type "i.logout()"
    [You'll see a "bye" message]
8.  Close the command prompt.

> Not knowing what the resourcepackage is, I did not install that.
> I didnt install the win32 package either.

I didn't really think that you would have resourcepackage (it's not
necessary unless you're developing), but it could have explained the error.
The win32 package isn't necessary for imapfilter, either.

> I was wondering, though, why the python installation doesnt 
> put something into the registry that identifies to other
> programs where the python executable is located.  For
> instance, I dont have to put programs like Adobe Acrobat
> into the path in order for my *.pdf files to find the 
> appropriate program.

It depends how you installed Python.  If you told the installer to, it will
have associated .py files with the Python exe, and so you could simply
double-click them (unless you need to pass an argument, of course).  In this
case, you could just type "setup.py install", without the "python" at a
console window and it would work, no matter the path.  (Well, this works in
XP, I can't recall what earlier Windows versions do).

=Tony Meyer

More information about the Spambayes mailing list