{"id":78,"date":"2009-12-21T18:44:55","date_gmt":"2009-12-21T22:44:55","guid":{"rendered":"http:\/\/myblog.vindaloo.com\/?p=78"},"modified":"2011-02-05T15:20:31","modified_gmt":"2011-02-05T19:20:31","slug":"bogofilter-and-the-corrupt-wordlist-db","status":"publish","type":"post","link":"http:\/\/myblog.vindaloo.com\/?p=78","title":{"rendered":"bogofilter and the corrupt wordlist.db"},"content":{"rendered":"<p>Looks like something burped on my mailserver and my bogofilter wordlist got too big. Probably something to do with limits anyhow. In any case I was looking for a way to recover from the issue and came across <a href=\"http:\/\/bogofilter.sourceforge.net\/faq.shtml#rescue\">this pearl<\/a> in the <a href=\"http:\/\/bogofilter.sourceforge.net\/faq.shtml\">Bogofilter FAQ<\/a>. Well, the advice is incomplete. If you really hose up the database then bogoutil -d will stop printing\u00a0 entries before the end of the database. The next recovery step is to use the db utilities: db_dump and db_load to fix the database. db_dump -r (on FreeBSD db_dump-&lt;version&gt;) dumps the database into a text file and db_load creates a text file from a word list. The problem is that the advice in the bogofilter faq is out of date. It looks like there are some parameters that have to be specified. My solution: use db_dump without the -r that creates a broken database with a default header. Copy the header into the new text file and then append the output of db_dump -r to that. Et voila!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Looks like something burped on my mailserver and my bogofilter wordlist got too big. Probably something to do with limits anyhow. In any case I was looking for a way to recover from the issue and came across this pearl in the Bogofilter FAQ. Well, the advice is incomplete. If you really hose up the &hellip; <\/p>\n<p class=\"link-more\"><a href=\"http:\/\/myblog.vindaloo.com\/?p=78\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;bogofilter and the corrupt wordlist.db&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[15],"tags":[],"class_list":["post-78","post","type-post","status-publish","format-standard","hentry","category-sysadmin"],"_links":{"self":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/78","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=78"}],"version-history":[{"count":3,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions"}],"predecessor-version":[{"id":80,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=\/wp\/v2\/posts\/78\/revisions\/80"}],"wp:attachment":[{"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=78"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=78"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/myblog.vindaloo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=78"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}