[Mailman-Users] spamassassin with mm2.1.3

Richard Barrett r.barrett at openinfo.co.uk
Fri Oct 17 21:25:28 CEST 2003


On Friday, October 17, 2003, at 07:13  pm, Dave Stern - Former Rocket 
Scientist wrote:

> Has anyone gotten this to work?
>
> I followed the instructions at
> http://www.daa.com.au/~james/articles/mailman-spamassassin/
>
> but now nothing goes thru and the error log says
>
> Oct 17 14:01:07 2003 (29854) Uncaught runner exception: global name 
> 'False' is not defined
> Oct 17 14:01:07 2003 (29854) Traceback (most recent call last):
>   File "/fs/mailman2/Mailman/Queue/Runner.py", line 110, in _oneloop
>     self._onefile(msg, msgdata)
>   File "/fs/mailman2/Mailman/Queue/Runner.py", line 160, in _onefile
>     keepqueued = self._dispose(mlist, msg, msgdata)
>   File "/fs/mailman2/Mailman/Queue/IncomingRunner.py", line 130, in 
> _dispose
>     more = self._dopipeline(mlist, msg, msgdata, pipeline)
>   File "/fs/mailman2/Mailman/Queue/IncomingRunner.py", line 153, in 
> _dopipeline
>     sys.modules[modname].process(mlist, msg, msgdata)
>   File "/fs/mailman2/Mailman/Handlers/SpamAssassin.py", line 76, in 
> process
>     score, symbols = check_message(mlist, str(msg))
>   File "/fs/mailman2/Mailman/Handlers/SpamAssassin.py", line 58, in 
> check_message
>     connection = spamd.SpamdConnection(SPAMD_HOST)
>   File "/fs/mailman2/Mailman/Handlers/spamd.py", line 79, in __init__
>     self.request_headers = mimetools.Message(StringIO.StringIO(), 
> seekable=False)
> NameError: global name 'False' is not defined
>

I don't know about SpamAssassin integration but, in MM 2.1.3 at least, 
Defaults.py contains the following code fragment, the partial purpose 
of which is to define True and False if they are not defined as 
language constants, as Python 2.3 does, by the version of Python you 
are running:

# Some convenient constants
try:
     True, False
except NameError:
     True = 1
     False = 0

Yes = yes = On = on = True
No = no = Off = off = False

Maybe worth copying that code into spamd.py

> Oct 17 14:01:07 2003 (29854) SHUNTING: 
> 1066413667.322263+e093d2f8ddc007ba43f897f8caa718ced2d9fb58
>
>
> I also tried modifying Defaults.py and adding into the GLOBAL_PIPELINE 
> sections
> a line saying   `SpamAssassin',   just like the other modules but that 
> didn't
> work either.
>
> TIA
>
>  =-=-=-=-=-=-=-=-=-=-=-=-  generated by /dev/dave 
> -=-=-=-=-=-=-=-=-=-=-=-=-=-=
>  David Stern                                            University of 
> Maryland
>                 Institute for Advanced Computer Studies
-----------------------------------------------------------------------
Richard Barrett                               http://www.openinfo.co.uk





More information about the Mailman-Users mailing list