Re: merge 2 bogofilter databases
Matthias Andree <[email protected]> Thu, 5 Oct 2017 22:19:35 +0200
| Newsgroups | gmane.mail.bogofilter.general |
|---|---|
| Message-ID | <[email protected]> |
Am 01.10.2017 um 11:58 schrieb Christos Chatzaras: > Is it possible to merge 2 bogofilter databases in 1 database? > > For example does this work? > > bogoutil -d wordlist.db > wordlist.server1 > bogoutil -d wordlist.db > wordlist.server2 > > cat wordlist.db.server1 | bogoutil -l wordlist.db.new > cat wordlist.db.server2 | bogoutil -l wordlist.db.new Hi Christos, Mostly - it spoils the .ENCODING token though. To work around that issue, please make sure the .ENCODING line matches (that's because I don't oversee without further research what happens if they are mismatched and if we need iconv in that case -- to check, look at the .ENCODING line in the bogoutil -d output of each and every file). You also should then strip it from all but one of the wordlists, as in: cat wordlist.db.server1 | bogoutil -l wordlist.db.new grep -v ^\\.ENCODING wordlist.db.server2 | bogoutil -l wordlist.db.new grep -v ^\\.ENCODING wordlist-3.db | bogoutil -l wordlist.db.new Note that bogoutil -l sort of cumulates the data, and .ENCODING would need special treatment that it currently does not get. See RELEASE.NOTES, section "[Major 0.95.0] Unicode in UTF-8", for details on this token's purpose. HTH, Matthias _______________________________________________ bogofilter mailing list [email protected] https://www.bogofilter.org/mailman/listinfo/bogofilter