<?xml version="1.0" encoding="utf-8"?><?xml-stylesheet title="XSL formatting" type="text/xsl" href="http://www.placenet.org/benoit/index.php/feed/rss2/xslt" ?><rss version="2.0"
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:wfw="http://wellformedweb.org/CommentAPI/"
  xmlns:content="http://purl.org/rss/1.0/modules/content/"
  xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
  <title>Harvard Business School of Echec - Tag - bogofilter</title>
  <link>http://www.placenet.org/benoit/index.php/</link>
  <atom:link href="http://www.placenet.org/benoit/index.php/feed/tag/bogofilter/rss2" rel="self" type="application/rss+xml"/>
  <description></description>
  <language>fr</language>
  <pubDate>Sat, 27 Dec 2008 21:43:42 +0100</pubDate>
  <copyright></copyright>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Dotclear</generator>
  
    
  <item>
    <title>evolution + bogofilter</title>
    <link>http://www.placenet.org/benoit/index.php/post/2007/02/17/evolution-bogofilter</link>
    <guid isPermaLink="false">urn:md5:af1e28d7fc8cef810448a81f4012594f</guid>
    <pubDate>Sat, 17 Feb 2007 02:14:00 +0100</pubDate>
    <dc:creator>Benoît Dejean</dc:creator>
        <category>GNOME</category>
        <category>bogofilter</category><category>bug</category><category>evolution</category><category>gnome</category><category>memory</category><category>ruby</category><category>spam</category>    
    <description>    &lt;p&gt;There is &lt;a href=&quot;http://bugzilla.gnome.org/show_bug.cgi?id=272411&quot;&gt;no standard bogofilter plugin&lt;/a&gt; for evolution. I am not happy with spamassassin/spamd/spamc CPU and RAM requirements. Like 'sa-learn --version' which takes 1.8s even on warm start...&lt;/p&gt;


&lt;p&gt;So I wrote a tiny (stupid) ruby script to emulate SpamAssassin programs with bogofilter.&lt;/p&gt;

&lt;pre&gt;
#!/usr/bin/env ruby

# 1 spam, 0 not-spam
def bogo_exec(mode)

  system 'bogofilter', '-l', mode

  exit case $?.exitstatus
    when 0
    1
    else
    0
  end
end

if ARGV.include?('--version') then
  print &amp;quot;SpamAssassin version 3.1.0-bogo
&amp;quot;
  exit
end

if ARGV.include?('--spam') then
  bogo_exec '-s'
end

if ARGV.include?('--ham') then
  bogo_exec '-n'
end

if ARGV.include?('-c') or ARGV.include?('--exit-code') then
  bogo_exec '-u'
end
&lt;/pre&gt;


&lt;p&gt;I then created symlinks &lt;code&gt;{spamassassin, spamc, spamd, sa-learn} -&amp;gt; spam.rb&lt;/code&gt;  in my &lt;code&gt;PATH&lt;/code&gt;. Maybe it WAS incomplete and broken, but it NOW works. No more daemon. Mail retrieval is no longer CPU-bound. Evolution and I are happy.&lt;/p&gt;


&lt;h3&gt;Update&lt;/h3&gt;

&lt;p&gt;I have fixed the script.
To feed spam/ham here is what i did :&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;selected a bunch of messages in evolution and Saved As '/tmp/mails'&lt;/li&gt;
&lt;li&gt;run &lt;code&gt;sa-learn --spam &amp;lt; /tmp/mails&lt;/code&gt; or &lt;code&gt;sa-learn --ham &amp;lt; /tmp/mails&lt;/code&gt;&lt;/li&gt;
&lt;/ol&gt;</description>
    
    
    
      </item>
    
</channel>
</rss>