Forums: users (Thread #18663)

findを使って複数のSpamフォルダを学習させたい (2008-05-12 09:42 by Anonymous #36591)

初めまして、藤川と申します。

複数人で使用しているメールサーバー(postfix)上でmaildropを経由してスパム振り分けをしています。
データベースは全ユーザーで共通です。

振り分けそのものはうまく動作しているのですが、誤判定したメールの学習をcronで定期的にさせたいと考えています。

findコマンドで
find /home/vmail/hoge.jp -type d -regex ".*Ham/cur$" -exec bsfilter --add-clean --homedir /home/vmail/.bsfilter {}/* \;
すると、
/home/vmail/hoge.jp/foo@hoge.jp/.Ham/cur/* is not file (RuntimeError)
と怒られてしまいます。

findの使い方の問題なので聞く場所が違うのかもしれませんが、お分かりの方がいらっしゃれば御助言頂きたいです。

Reply to #36591×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE: findを使って複数のSpamフォルダを学習させたい (2008-05-12 13:11 by Anonymous #36599)

#案1
bsfilter --add-clean --homedir /home/vmail/.bsfilter /home/vmail/hoge.jp/*/.Ham/cur/*

#案2
cd /home/vmail/hoge.jp || exit 1
bsfilter --add-clean --homedir /home/vmail/.bsfilter */.Ham/cur/*

#案3
cd /home/vmail/hoge.jp || exit 1
for D in */.Ham/cur; do
bsfilter --add-clean --homedir /home/vmail/.bsfilter $D/*
done

#案4
find /home/vmail/hoge.jp -type d -regex ".*Ham/cur$" -print | while read D; do
bsfilter --add-clean --homedir /home/vmail/.bsfilter $D/*
done
Reply to #36591

Reply to #36599×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login

RE^2: findを使って複数のSpamフォルダを学習させたい (2008-05-12 14:46 by Anonymous #36605)

藤川です。

複数のアカウントがあるので、案4で試してみてます。
export-spamするとデータベースはちゃんと生成されているので、大丈夫そうです。

ありがとうこざいました。
Reply to #36591

Reply to #36605×

You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.) Login