diff options
author | krion <krion@FreeBSD.org> | 2004-03-01 08:59:44 +0000 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2004-03-01 08:59:44 +0000 |
commit | 89a5127e2d27695361acb3b2f75fee3698e5551a (patch) | |
tree | 3d0db56df07b9cc7531fc948613fb54af6f55eef /mail | |
parent | 577a441f06f9e097a9e4e8e497624528be39fc2d (diff) | |
download | FreeBSD-ports-89a5127e2d27695361acb3b2f75fee3698e5551a.zip FreeBSD-ports-89a5127e2d27695361acb3b2f75fee3698e5551a.tar.gz |
Add bsfilter 1.0.0, a bayesian spam filter written in Ruby.
PR: ports/63573
Submitted by: Masafumi Otsune <info@otsune.com>
Diffstat (limited to 'mail')
-rw-r--r-- | mail/Makefile | 1 | ||||
-rw-r--r-- | mail/bsfilter/Makefile | 47 | ||||
-rw-r--r-- | mail/bsfilter/distinfo | 2 | ||||
-rw-r--r-- | mail/bsfilter/files/bsfilter.conf.sample | 19 | ||||
-rw-r--r-- | mail/bsfilter/files/dot-qmail.sample | 2 | ||||
-rw-r--r-- | mail/bsfilter/pkg-descr | 10 | ||||
-rw-r--r-- | mail/bsfilter/pkg-message | 14 | ||||
-rw-r--r-- | mail/bsfilter/pkg-plist | 4 |
8 files changed, 99 insertions, 0 deletions
diff --git a/mail/Makefile b/mail/Makefile index 05808e0..581747f 100644 --- a/mail/Makefile +++ b/mail/Makefile @@ -26,6 +26,7 @@ SUBDIR += bogofilter SUBDIR += bogofilter-qdbm SUBDIR += bogofilter-tdb + SUBDIR += bsfilter SUBDIR += bsmtp SUBDIR += bulk_mailer SUBDIR += cclient diff --git a/mail/bsfilter/Makefile b/mail/bsfilter/Makefile new file mode 100644 index 0000000..a40bbe4 --- /dev/null +++ b/mail/bsfilter/Makefile @@ -0,0 +1,47 @@ +# New ports collection makefile for: bsfilter +# Date created: 1 Mar 2004 +# Whom: Masafumi Otsune <info@otsune.com> +# +# $FreeBSD$ +# + +PORTNAME= bsfilter +PORTVERSION= 1.0.0 +CATEGORIES= mail ruby +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_JP} +MASTER_SITE_SUBDIR= bsfilter/8453 +EXTRACT_SUFX= .tgz + +MAINTAINER= info@otsune.com +COMMENT= A bayesian spam filter written in Ruby + +RUN_DEPENDS= ${RUBY_ARCHLIBDIR}/gdbm.so:${PORTSDIR}/databases/ruby-gdbm +.if defined(WITH_MECAB) +RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/MeCab.so:${PORTSDIR}/japanese/ruby-mecab +.endif +.if defined(WITH_CHASEN) +RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/chasen.so:${PORTSDIR}/japanese/ruby-chasen +.endif +.if defined(WITH_KAKASI) +RUN_DEPENDS+= ${RUBY_SITEARCHLIBDIR}/kakasi.so:${PORTSDIR}/japanese/ruby-kakasi +.endif + +NO_BUILD= yes +USE_RUBY= yes + +pre-build: + @${ECHO_MSG} "specify algorithm of a tokenizer for Japanese language" + @${ECHO_MSG} "WITH_CHASEN=yes (japanese/chasen)" + @${ECHO_MSG} "WITH_KAKASI=yes (japanese/kakasi)" + @${ECHO_MSG} "WITH_MECAB=yes (japanese/mecab)" + +do-install: + @${INSTALL_SCRIPT} ${WRKSRC}/bsfilter/${PORTNAME} ${PREFIX}/bin/${PORTNAME} +.if !defined(NOPORTDOCS) + @${MKDIR} ${EXAMPLESDIR} +.for FILE in bsfilter.conf.sample dot-qmail.sample + @${INSTALL_DATA} ${FILESDIR}/${FILE} ${EXAMPLESDIR} +.endfor +.endif + +.include <bsd.port.mk> diff --git a/mail/bsfilter/distinfo b/mail/bsfilter/distinfo new file mode 100644 index 0000000..3b4e4f1 --- /dev/null +++ b/mail/bsfilter/distinfo @@ -0,0 +1,2 @@ +MD5 (bsfilter-1.0.0.tgz) = 741371bc88ffe66e503e88dbe2b3306e +SIZE (bsfilter-1.0.0.tgz) = 832896 diff --git a/mail/bsfilter/files/bsfilter.conf.sample b/mail/bsfilter/files/bsfilter.conf.sample new file mode 100644 index 0000000..c4be8a2 --- /dev/null +++ b/mail/bsfilter/files/bsfilter.conf.sample @@ -0,0 +1,19 @@ +## example of bsfilter.conf +#jtokenizer kakasi # 'make WITH_KAKASI=yes install' +#jtokenizer MeCab # 'make WITH_MECAB=yes install' +spam-cutoff 0.6 + +## IMAP +## (bsfilter --imap --imap-fetch-unflagged --insert-flag --insert-probability --imap-folder-spam inbox.spam inbox) +#imap-server server.example.com +#imap-auth login +#imap-user alibaba +#imap-password open_sesame + +## POP Proxy +## (bsfilter --pop --auto-update) +#pop-server server.example.com +#pop-proxy-port 10110 +#pop-user alibaba +#insert-flag +#insert-probability diff --git a/mail/bsfilter/files/dot-qmail.sample b/mail/bsfilter/files/dot-qmail.sample new file mode 100644 index 0000000..385327a --- /dev/null +++ b/mail/bsfilter/files/dot-qmail.sample @@ -0,0 +1,2 @@ +| /var/qmail/bin/condredirect MYADDRESS-spam@example.com bsfilter +./Maildir/ diff --git a/mail/bsfilter/pkg-descr b/mail/bsfilter/pkg-descr new file mode 100644 index 0000000..69c3439 --- /dev/null +++ b/mail/bsfilter/pkg-descr @@ -0,0 +1,10 @@ +- English and Japanese are supported. +- Written in Ruby +- Three interfaces are supported. +- Local mail file. accesses files or stdin/out. +- IMAP. accesses mails in a IMAP server. +- POP proxy. works as a proxy between a POP server and MUA. +- GPL + +Author: nabeken +WWW: http://sourceforge.jp/projects/bsfilter/ diff --git a/mail/bsfilter/pkg-message b/mail/bsfilter/pkg-message new file mode 100644 index 0000000..be20dee --- /dev/null +++ b/mail/bsfilter/pkg-message @@ -0,0 +1,14 @@ +Before actually using it, it is necessary to prepare a word database. + +1.The word contained in clean mail is counted. +% bsfilter --add-clean ~/Maildir/.cur/* + or +% ls ~/Maildir/cur/ | xargs bsfilter -c + +2.The word in spam is counted. +% bsfilter --add-spam ~/Maildir/.spam/* + or +% ls ~/Maildir/.spam/cur/ | xargs bsfilter -s + +3.A database is updated for every word. +% bsfilter -u diff --git a/mail/bsfilter/pkg-plist b/mail/bsfilter/pkg-plist new file mode 100644 index 0000000..24ec067e --- /dev/null +++ b/mail/bsfilter/pkg-plist @@ -0,0 +1,4 @@ +bin/bsfilter +%%PORTDOCS%%share/examples/bsfilter/bsfilter.conf.sample +%%PORTDOCS%%share/examples/bsfilter/dot-qmail.sample +%%PORTDOCS%%@dirrm share/examples/bsfilter |