[Spambayes] Problem with imap filter on mac os x: memory error

Perry Greenfield perry at stsci.edu
Wed Jul 21 23:12:15 CEST 2004


I have been happily using the outlook plugin for spambayes on a win2000
machine. But I have just gotten a new Mac OS x machine and I was looking to
migrate my spam filtering to that computer. I've managed to train the imap
filter (apparently anyway, it reports the correct statistics on the training
folders). But when I try to run it as a filter, even by making the inbox
much smaller (just a few hundred messages), I keep getting a memory
allocation error. Any ideas on what is going wrong? No other mail programs
are running at the time.

It's a Mac G5 running OS X 10.3
 
% python sb_imapfilter.py -t -c -l 5 -P
SpamBayes IMAP Filter Version 0.4 (May 2004)
and engine SpamBayes Engine Version 0.3 (January 2004).

Password: 
*** malloc: vm_allocate(size=4890624) failed (error code=3)
*** malloc[4452]: error: Can't allocate region
Traceback (most recent call last):
  File "sb_imapfilter.py", line 928, in ?
    run()
  File "sb_imapfilter.py", line 918, in run
    imap_filter.Filter()
  File "sb_imapfilter.py", line 789, in Filter
    self.unsure_folder)
  File "sb_imapfilter.py", line 703, in Filter
    for msg in self:
  File "sb_imapfilter.py", line 594, in __iter__
    yield self[key]
  File "sb_imapfilter.py", line 642, in __getitem__
    msg.get_substance()
  File "sb_imapfilter.py", line 384, in get_substance
    response = imap.uid("FETCH", self.uid, self.rfc822_command)
  File "/sw/lib/python2.3/imaplib.py", line 697, in uid
    typ, dat = self._simple_command(name, command, *args)
  File "/sw/lib/python2.3/imaplib.py", line 1000, in _simple_command
    return self._command_complete(name, self._command(name, *args))
  File "/sw/lib/python2.3/imaplib.py", line 830, in _command_complete
    typ, data = self._get_tagged_response(tag)
  File "/sw/lib/python2.3/imaplib.py", line 931, in _get_tagged_response
    self._get_response()
  File "/sw/lib/python2.3/imaplib.py", line 893, in _get_response
    data = self.read(size)
  File "/sw/lib/python2.3/imaplib.py", line 231, in read
    return self.file.read(size)
  File "/sw/lib/python2.3/socket.py", line 301, in read
    data = self._sock.recv(recv_size)
MemoryError
% 



More information about the Spambayes mailing list