[Spambayes] HowTo disable the "Save and Shutdown" Button in the Webinterface on linux ?
Florian Gerstenberger
gerstenberger at imst.de
Fri Oct 28 09:54:34 CEST 2005
Richie Hindle wrote:
>I assume you're running from source. You need to install resourcepackage
>from http://resourcepackage.sourceforge.net/ in order for your changes to
>anything in the "resource" directory to take effect. Download
>ResourcePackage-1.0.0.tar.gz, unpack it into a temporary area, cd to that
>area, and run "python setup.py install". You can then delete the unpacked
>files.
>
>
>
Hi Richie,
I already found that out yesterday but you're right. In my opinion this
is something that
should be contained in the Spambayes FAQ.....
>In ProxyUI.py there's a class called ProxyUserInterface with a member
>function called onView() - it's that function that shows the emails:
>
> if message is not None:
> self.write("<pre>%s</pre>" % cgi.escape(message.as_string()))
>
>You need to change that to just show the headers... I don't know off the
>top of my head whether the "email" package has a way to do that, but this
>hack should work:
>
> if message is not None:
> whole_message = message.as_string()
> split_message = re.split(r'\r*\n\r*\n', whole_message, 1)
> self.write("<pre>%s</pre>" % cgi.escape(split_message[0]))
>
>
>
This piece of Code helped me a lot. Thank you very much for your help.
With best regard,
Florian Gerstenberger
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/spambayes/attachments/20051028/c7d3c12d/attachment.htm
More information about the SpamBayes
mailing list