{"id":571,"date":"2014-03-17T10:35:03","date_gmt":"2014-03-17T09:35:03","guid":{"rendered":"https:\/\/hoover.gplrank.de\/?p=571"},"modified":"2014-03-17T10:35:18","modified_gmt":"2014-03-17T09:35:18","slug":"repopulating-a-bogofilter-wordlist-db-after-corruption","status":"publish","type":"post","link":"https:\/\/hoover.gplrank.de\/?p=571","title":{"rendered":"Repopulating a bogofilter wordlist.db after corruption"},"content":{"rendered":"<p>So it had to happen eventually: My 660MB wordlist.db file got corrupted without any chance of recovering or repairing it. Having amassed a large amount of spam messages in an mbox file called &#8220;spam&#8221; during bogofilter&#8217;s operation, it&#8217;s quite easy to repopulate the wordlist using the &#8220;formail&#8221; command:<\/p>\n<pre><span style=\"line-height: 1.714285714; font-size: 1rem;\">$ formail -ds sh -c 'cat \u00a0| bogofilter -s ' &lt; spam<\/span><\/pre>\n<p>This operation may take a while depending on your spam mailbox size and your disk speed, but it should set you up quickly with bogofilter in a working state.<\/p>\n<p>It&#8217;s also advisable to check the spam mailbox for false positives *before* feeding it to formail to reduce the chance or legit mails ending up in your spambox due to false flagging by bogofilter.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So it had to happen eventually: My 660MB wordlist.db file got corrupted without any chance of recovering or repairing it. Having amassed a large amount of spam messages in an mbox file called &#8220;spam&#8221; during bogofilter&#8217;s operation, it&#8217;s quite easy to repopulate the wordlist using the &#8220;formail&#8221; command: $ formail -ds sh -c &#8216;cat \u00a0| [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[8],"tags":[],"class_list":["post-571","post","type-post","status-publish","format-standard","hentry","category-it"],"_links":{"self":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts\/571","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=571"}],"version-history":[{"count":2,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts\/571\/revisions"}],"predecessor-version":[{"id":573,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=\/wp\/v2\/posts\/571\/revisions\/573"}],"wp:attachment":[{"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=571"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=571"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hoover.gplrank.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=571"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}