UNIX tools

Japanese / English

About imap-bayes

Download

imap-bayes-0.2.tar.gz

* this software is a beta release. In the worst case, there's a possibility of arriving email disappearing because of a bug. Please handle with adequate care.

Operating requirements

Email environment is:

Unless the mentioned conditions have been met, you cannot use it. In addition,

is necessary, so please install.

Simple instructions

Extract files from the downloaded file, and type the following as root:

# ruby install.rb --without-kakasi

Installation has finished. The rest is the configuration for each user (or mailbox). Open ~/.qmail and check if the following line exists:

./Maildir/

If the directory name is different, replace it in the following explanation. If the line doesn't finish with "/" (slash), you cannot use imap-bayes because your mailbox is not in Maildir format. Type:

$ cd
$ imap-bayes --init ./Maildir
$ imap-bayes --learn ./Maildir

and the first learning starts. It may take several minutes or more. (Later, learning automatically starts everyday.)

Finally, replace the following line in ~/.qmail:

./Maildir/

to

| preline /usr/local/bin/imap-bayes ./Maildir

Mail to yourself for trial. Is your mail delivered (to one of the folders) ?

Detailed instructions

install.rb

# ruby install.rb [options]

The following options are available.

optiondefaultdescription
--prefix=PATH/usr/localInstall here.
--ruby=PATHruby used for install.rbruby used for imap-bayes.
--kakasi=PATHautomaticPath to kakasi.
--without-kakasiDon't use kakasi. Specify this if you don't receive mails written in Japanese.

imap-bayes

$ imap-bayes [command] Maildir

Specify a mailbox in Maildir format for Maildir. command is one of the following.

commandeffect
--initInitialize Maildir/imap-bayes.conf.
--learnLearn difference from the last learning. Automatically executed everyday.
--relearnClear all learning data and relearn.
--analyzeOutput the analysis of the last mail as CSV format.
--testExperimentally classify randomly selected mails and evaluate the precision. No effect on the mailbox.
(none)Classify the mail from the standard input to the mailbox. Usually called via qmail.

Maildir/imap-bayes.conf

A configuration file written with "name=value" format.

namedescription
IGNORESSpecify folders (split with ":") to be excluded on filtering. English and Japanese (EUC) folder names are avaliable. Folder names with other languages are currently not supported. Use "." to specify subfolders (eg. "Private.Family").
LIMITFor each folder, latest LIMIT mails are used for learning.

Contact

Contact me with the following comment area.


Change Log

License

GPL Ver.2.


*1 it's believed sendmail or postfix can also be used, but here it is explained with qmail as prerequisite.

トップ   新規 一覧 単語検索 最終更新   ヘルプ   最終更新のRSS