[Spambayes] Unwanted stock solicitations

Seth Goodman sethg at goodmanassociates.com
Wed Oct 18 19:17:33 CEST 2006


skip at pobox.com wrote on Wednesday, October 18, 2006 7:15 AM -0500:

>     Seth> Other issues: PIL is not there,
>
> Yes, that's a separate installer.  I believe this is mentioned in the
> release notes.  Get it here:
>
>     http://www.pythonware.com/products/pil/

That's the one I used.  The Spambayes release notes are a little out of date,
though they give enough to figure it out.

|x-crack_images - A lot of recent spam contains the entire message
|    embedded in one or more attached images.  This option, if true,
|    generates tokens based on the (hopefully) text content contained in any
|    images in each message.  The current support is minimal, relies on the
|    installation of ocrad (http://www.gnu.org/software/ocrad/ocrad.html) and
|    the Python Imaging Library (a.k.a. PIL, available at
|    http://www.pythonware.com/products/pil/).  It has not yet been tested on
|    Windows, but for brave souls there is a simple zip file binary of ocrad
|    called "ocrad-cygwin" on the SpamBayes download page for Windows users
|    who can't build it themselves.  PIL has its own Windows binary
|    installers specific to versions of Python as far back as 2.1.

There is no orcad-ccygwin package on the Spambayes download page.  There is
testing-ocrad-0.15, however, ocrad is distributed with Spambayes 1.1a3, so I'm
assuming it is not needed.  The ocrad executable is not in the system path.
Adding it does not help.

Python and PIL are not installed as part of Spambayes 1.1.a3.  I installed
Python 2.4.4c1 from http://www.python.org/ftp/python/2.4.4/python-2.4.4c1.msi,
then installed PIL 1.1.5 for Python 2.4 from
http://effbot.org/downloads/PIL-1.1.5.win32-py2.4.exe (this is the specific
download link on the http://www.pythonware.com/products/pil/ page).  I tried
both the default Python install directory of C:\Python24\ and the more usual
Windows location of C:\Program Files\Python24\ with the same results.  The PIL
installer finds the Python24 directory correctly through the registry in both
cases.  The Python24 directory does not end up in the system path after the
installation.  Adding it doesn't make a difference.  Since Spambayes uses
python24.dll under Windows, would Spambayes still try to execute PIL through
the separate Python2.4?


>     Seth> and no x-image_size or x-crack_images in [tokenizer]
>     section of Seth> ini file.
>
> Can you try adding these lines to the [tokenizer] section of the ini
> file?
>
>     x-lookup_ip: True
>     lookup_ip_cache: dnscache.pck
>     x-image_size: True
>     x-crack_images: True
>     max_image_size: 100000
>     crack_image_cache: image_cache.pck
> You'll also have to install PyDNS:
>
>     http://pydns.sourceforge.net/
>
> for the x-lookup_ip stuff to work.

I used the last four of these configuration lines, as I didn't intend to test
ip lookups.  If you think the ip lookup stuff will make a difference, I can
install PyDNS and try again.


> > I installed Python2.4.4c1, installed PIL 1.1.5 for python 2.4,
> > added the four configuration lines you mentioned in another thread
> > to the [tokenizer] section of the ini file and added the spambayes
> > and python directories to the system path.  Unfortunately, it
> > still doesn't generate tokens from gif's.  Perhaps there is an
> > issue with spambayes using python24.dll while ocrad uses the full
> > python2.4?
>
> Ocrad is a separate standalone program which isn't Python-specific.
> Unfortunately, it only works with NetPBM files as input (that's what
> PIL does for us), so it's probably a little challenging to run on a
> Windows machine.  I uploaded a file here:
>
>     http://orca.mojam.com/~skip/spam.pnm
>
> if you can't easily create one yourself.
>
> Running it like this
>
>     ocrad -2 < spam.pnm
>
> on my Mac gives me this gibberish on standard output:
>
>     ___AllE_llO_ ALL DA_ IRADER_ A_D |__E_IOR____

[...]

Downloading the sample image file and running ocrad from the command line
gives:

   ocrad: end-of-file reading pnm file.

--
Seth Goodman



More information about the SpamBayes mailing list