Forums: users (Thread #10699)

IMAP上のメールに変化がない (2006-04-05 10:08 by Anonymous #21022)

Windows XP上でbsfilterの1.0.12を使用しています.
IMAPサーバに対しての設定をしたのですが,メールにX-Spam-Flag:が挿入されません.
以下のようなことをしたのですが,何か間違っていますでしょうか.

・ドキュメントに従い,データベースを準備
・「imap.conf」を作成(内容は以下)
imap
imap-server hogehoge.co.jp
imap-auth auto
imap-user hoge
imap-password hoge
imap-fetch-unflagged
imap-folder-spam Junk
insert-flag
insert-probability
auto-update
・コマンドプロンプトで次のようにして実行
bsfilter -v --config-file imap.conf
※実行自体は正常に終了しているが,実行後のERRORLEVELを確認すると1が返ってきている

Reply to #21022×

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: IMAP上のメールに変化がない (2006-04-06 00:04 by nabeken #21039)

コマンドライン引数で、IMAPサーバ上の判定対象のメールボックス名を指定して下さい。典型的にはinboxではないかと思います。

-v が付いているので、判定したメール1通につき1行
combined probability....
が表示されるはずです。

ヘッダ挿入の前に、ここまではOKでしょうか?
Reply to #21022

Reply to #21039×

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: IMAP上のメールに変化がない (2006-04-06 12:32 by Anonymous #21055)

ご回答,ありがとうございます.
指摘を受け,コマンドラインで以下のようにしましたが,まだ変化がありません.

bsfilter -v --config-file imap.conf inbox

-vによる表示は以下しかありません.そもそも何かがおかしいのでしょうか.
start Thu Apr 06 12:23:48 JST 2006
open c:\WinApp\hoge/.bsfilter/C.prob.sdbm 91298 tokens 91298 mails by 2060.
open c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 136558 tokens 136558 mails by 2060.
try to login imap server for hoge with authenticate cram-md5
close c:\WinApp\hoge/.bsfilter/C.prob.sdbm 91298 tokens 91298 mails by 2060.
close c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 136558 tokens 136558 mails by 2060.
end Thu Apr 06 12:23:54 JST 2006
Reply to #21039

Reply to #21055×

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: IMAP上のメールに変化がない (2006-04-08 23:48 by nabeken #21108)

ruby そのものがインストールされている必要がありますが、bsfiter抜きで、imap.rb(標準ライブラリ)でIMAPサーバと通信できているか、確認してもらえますでしょうか。

% ruby /usr/local/lib/ruby/1.8/net/imap.rb --user=hoge --auth=cram-md5 imap-server.example.com
で起動。passwordを聞かれるので入力。プロンプトが出るので、
list [enter]
と入力。メールボックス一覧が表示されるので
select 適当なメールボックス [enter]
と入力。
summary [enter]
と入力すると、subject一覧が表示される。

以上、OKでしょうか?
help [enter]
で、ヘルプが表示出来ます。
Reply to #21055

Reply to #21108×

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: IMAP上のメールに変化がない (2006-04-10 17:54 by Anonymous #21136)

ご回答,ありがとうございます.
返信が遅くなりまして申し訳ありません.

Rubyをインストールし,指示いただいたコマンドを実行しました.
IMAPサーバへの接続から,list,select,summaryの各コマンドはどれも正常に終了しました.
また,listとsummaryについてはそれぞれ内容が正しく表示されました.
Reply to #21022

Reply to #21136×

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: IMAP上のメールに変化がない (2006-04-11 23:57 by nabeken #21180)

imap-fetch-unflagged を外してみる

% bsfilter ... メールボックス
ではなく
% bsfilter ... メールボックス/1
のように、メール番号まで指定してみる

以上くらいしか、調査方法が思い当たりません。
週末、経過を表示するようにしたスクリプトをcommitしますので、それで原因をつかめることを期待したいと思います。
Reply to #21136

Reply to #21180×

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: IMAP上のメールに変化がない (2006-04-12 15:29 by Anonymous #21191)

度々のご回答,ありがとうございます.
「imap-fetch-unflagged を外してみる」を試したところ,うまくいきました.
以下,実施した内容と結果です.

・「imap.conf」を修正(内容は以下)
imap
imap-server hogehoge.co.jp
imap-auth auto
imap-user hoge
imap-password hoge
imap-folder-spam Junk
insert-flag
insert-probability
auto-update
・コマンドプロンプトで次のようにして実行
bsfilter -v --config-file imap.conf inbox
・実行結果
start Wed Apr 12 13:12:54 JST 2006
open c:\WinApp\hoge/.bsfilter/C.prob.sdbm 91330 tokens 91330 mails by 4344.
open c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 136625 tokens 136625 mails by 4344.
try to login imap server for hoge with authenticate cram-md5
combined probability inbox 1 0.000000
combined probability inbox 2 0.000000
combined probability inbox 3 0.000000
combined probability inbox 4 0.000000
combined probability inbox 5 0.000000
close c:\WinApp\hoge/.bsfilter/C.prob.sdbm 91330 tokens 91330 mails by 4344.
close c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 136625 tokens 136625 mails by 4344.
open c:\WinApp\hoge/.bsfilter/ja.clean.sdbm 83288 tokens 5721 mails by 4344.
open c:\WinApp\hoge/.bsfilter/ja.spam.sdbm 69721 tokens 6477 mails by 4344.
open c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 136625 tokens 136625 mails by 4344.
close c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 136625 tokens 136625 mails by 4344.
close c:\WinApp\hoge/.bsfilter/ja.clean.sdbm 83288 tokens 5726 mails by 4344.
close c:\WinApp\hoge/.bsfilter/ja.spam.sdbm 69721 tokens 6477 mails by 4344.
end Wed Apr 12 13:12:56 JST 2006
Reply to #21180

Reply to #21191×

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: IMAP上のメールに変化がない (2006-04-12 15:58 by Anonymous #21192)

先の投稿への補足です.
メール番号の指定をする場合ですが,imap-fetch-unflaggedを設定しているとフラグの挿入が行なわれませんでした
Reply to #21191

Reply to #21192×

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: IMAP上のメールに変化がない (2006-04-12 23:00 by nabeken #21196)

IMAPサーバの種類、バージョンが分かれば教えてください。

imap-fetch-unflagged が指定されると、X-Spam-Flag ヘッダの付いているメールを処理の対象としません。
X-Spam-Flagが付いているメールのリストを、IMAPサーバにSEARCHコマンドを送ることによって得ているのですが、この辺に問題がありそうです。
Reply to #21192

Reply to #21196×

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: IMAP上のメールに変化がない (2006-04-17 17:27 by Anonymous #21300)

返信が遅くなりまして,申し訳ないです.
管理者に確認したところ,サーバは以下を使用しているとのことでした.

・Sendmail Advanced Message Server 1.3J
(CSKの発売している製品です)
http://www.cskwin.com/products/SAMS_13W.html

試用版をダウンロードできますが,ユーザ登録をする必要があるのでちょっと面倒臭いです.
Reply to #21196

Reply to #21300×

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: IMAP上のメールに変化がない (2006-04-16 15:02 by nabeken #21268)

-v --imap --imap-fetch-unflagged 指定時に、以下のようなメッセージを出すように追加しました。
imap-fetch-unflagged working original 3 null 2 Yes 0 No 2
imap-fetch-unflagged worked 1

nullの数 == Yesの数 + Noの数 == X-Spam-Flagの付いているメールの数
という関係にあることを期待しています。

現在そちらでは、X-Spam-Flagヘッダの有無に関らず、originalの数 == nullの数
になってしまっているのでしょうか?

Reply to #21180

Reply to #21268×

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: IMAP上のメールに変化がない (2006-04-17 18:40 by Anonymous #21302)

返信が遅くなりまして,申し訳ありません.
先ほど1.0.13をダウンロードして試したのですが,期待した表示が得られませんでした.
(追加いただいたメッセージが出力されませんでした)

・imap.confの内容
imap
imap-server hogehoge.co.jp
imap-auth auto
imap-user hoge
imap-password hoge
imap-fetch-unflagged
imap-folder-spam Junk
insert-flag
insert-probability
auto-update
・実行時の指定
bsfilter --config-file imap.conf -v inbox
・実行結果
start Mon Apr 17 17:30:18 JST 2006
open c:\WinApp\hoge/.bsfilter/C.prob.sdbm 91822 tokens 91822 mails by 5708.
open c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 140174 tokens 140174 mails by 5708.
try to login imap server for hoge with authenticate cram-md5
close c:\WinApp\hoge/.bsfilter/C.prob.sdbm 91822 tokens 91822 mails by 5708.
close c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 140174 tokens 140174 mails by 5708.
end Mon Apr 17 17:30:19 JST 2006
Reply to #21268

Reply to #21302×

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: IMAP上のメールに変化がない (2006-04-19 00:53 by nabeken #21342)

すみません。ソースのみで.exeはありませんが、revision 1.78.4.1 で試していただけませんでしょうか。

http://cvs.sourceforge.jp/cgi-bin/viewcvs.cgi/bsfilter/bsfilter/bsfilter?rev=1.78.4.1&content-type=text/vnd.viewcvs-markup
Reply to #21302

Reply to #21342×

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: IMAP上のメールに変化がない (2006-04-19 13:09 by Anonymous #21366)

お手数をおかけしております.
指定いただいたソースを取り込んで試しました.
実行結果は以下の通りです(実行時,inboxのメール8通には全てX-Spam-Flag: Noが挿入された状態です).
懸念されていた,
「現在そちらでは、X-Spam-Flagヘッダの有無に関らず、originalの数 == nullの数になってしまっているのでしょうか?」
のとおりになっております.

start Wed Apr 19 13:00:22 JST 2006
open c:\WinApp\hoge/.bsfilter/C.prob.sdbm 91977 tokens 91977 mails by 6112.
open c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 141538 tokens 141538 mails by 6112.
try to login imap server for hoge with authenticate cram-md5
imap-fetch-unflagged working original 8 null 8 Yes 0 No 8
imap-fetch-unflagged worked 0
close c:\WinApp\hoge/.bsfilter/C.prob.sdbm 91977 tokens 91977 mails by 6112.
close c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 141538 tokens 141538 mails by 6112.
end Wed Apr 19 13:00:23 JST 2006
Reply to #21342

Reply to #21366×

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: IMAP上のメールに変化がない (2006-04-20 01:42 by nabeken #21374)

X-Spam-Flagヘッダが付いていないメールを含むメールボックスについても、実行をお願いします。
Reply to #21366

Reply to #21374×

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: IMAP上のメールに変化がない (2006-04-20 10:19 by Anonymous #21385)

確かに.比較データは必要でしたね.申し訳ありません.
以下に実行結果を記載して置きます.
inboxには10件のメールがあり,その内先頭の6件にX-Spam-Flag: Noが挿入されている状態です.

start Thu Apr 20 10:14:55 JST 2006
open c:\WinApp\hoge/.bsfilter/C.prob.sdbm 92147 tokens 92147 mails by 5988.
open c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 141969 tokens 141969 mails by 5988.
try to login imap server for hoge with authenticate cram-md5
imap-fetch-unflagged working original 10 null 10 Yes 0 No 6
imap-fetch-unflagged worked 0
close c:\WinApp\hoge/.bsfilter/C.prob.sdbm 92147 tokens 92147 mails by 5988.
close c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 141969 tokens 141969 mails by 5988.
end Thu Apr 20 10:14:59 JST 2006
Reply to #21374

Reply to #21385×

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: IMAP上のメールに変化がない (2006-04-20 10:53 by Anonymous #21387)

追加でもう少し実験しました.
inboxにメールが10通入っています.以下のような状態でモジュールを実行しました.

[×][×][×][×][×][×][ ][ ][ ][○]
[×[…X-Spam-Flag: No
[ ]…フラグなし
[○]…X-Spam-Flag: Yes

実行結果は以下のようになりました.
start Thu Apr 20 10:43:09 JST 2006
open c:\WinApp\hoge/.bsfilter/C.prob.sdbm 92171 tokens 92171 mails by 4356.
open c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 142014 tokens 142014 mails by 4356.
try to login imap server for hoge with authenticate cram-md5
imap-fetch-unflagged working original 10 null 10 Yes 1 No 6
imap-fetch-unflagged worked 0
close c:\WinApp\hoge/.bsfilter/C.prob.sdbm 92171 tokens 92171 mails by 4356.
close c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 142014 tokens 142014 mails by 4356.
end Thu Apr 20 10:43:10 JST 2006
Reply to #21385

Reply to #21387×

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: IMAP上のメールに変化がない (2006-04-22 01:14 by nabeken #21426)

imap-fetch-unflagged working original 10 null 10 Yes 1 No 6

状況が分かりましたので、対策します。
Sendmail Advanced Message Server
のバグと思われます。

下はRFC 3501のSEARCHについての説明ですが、"If the string to search is zero-length..." によって、X-Spam-Flagヘッダのあるメールのリストを作っているつもりです。
しかし Sendmail Advanced Message Server は、ヘッダの有無に関係なく、全メールを返してくるようです。

HEADER <field-name> <string>
Messages that have a header with the specified field-name (as
defined in [RFC-2822]) and that contains the specified string
in the text of the header (what comes after the colon). If the
string to search is zero-length, this matches all messages that
have a header line with the specified field-name regardless of
the contents.

Reply to #21387

Reply to #21426×

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: IMAP上のメールに変化がない (2006-04-23 00:58 by nabeken #21444)

revision 1.78.4.2 を試してみて下さい。
いままで、以下のケースで"worked 0"だったとしたら、"worked 3"になるはずです。(3 == 10 - 1 - 6)

imap-fetch-unflagged working original 10 null 10 Yes 1 No 6
imap-fetch-unflagged worked 0
Reply to #21426

Reply to #21444×

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: IMAP上のメールに変化がない (2006-04-24 10:31 by Anonymous #21469)

ご対応,ありがとうございます.
早速ソースをダウンロードし,試しました.
以下のような結果となり,imap-fetch-unflagged が期待通りに動作しました.

inboxにメールが12通入っています.以下のような状態でモジュールを実行しました.

[×][×][×][×][×][×][×][ ][ ][ ][○][ ]
[×]…X-Spam-Flag: No
[ ]…フラグなし
[○]…X-Spam-Flag: Yes

実行結果は以下のようになりました.
start Mon Apr 24 10:16:26 JST 2006
open c:\WinApp\hoge/.bsfilter/C.prob.sdbm 92857 tokens 92857 mails by 4324.
open c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 143884 tokens 143884 mails by 4324.
try to login imap server for hoge with authenticate cram-md5
imap-fetch-unflagged working original 12 null 12 Yes 1 No 7
imap-fetch-unflagged worked 4
combined probability inbox 8 1.000000
combined probability inbox 9 1.000000
combined probability inbox 10 0.000000
combined probability inbox 12 0.000000
close c:\WinApp\hoge/.bsfilter/C.prob.sdbm 92857 tokens 92857 mails by 4324.
close c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 143884 tokens 143884 mails by 4324.
open c:\WinApp\hoge/.bsfilter/ja.clean.sdbm 89575 tokens 6370 mails by 4324.
open c:\WinApp\hoge/.bsfilter/ja.spam.sdbm 71394 tokens 6671 mails by 4324.
open c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 143884 tokens 143884 mails by 4324.
close c:\WinApp\hoge/.bsfilter/ja.prob.sdbm 143904 tokens 143904 mails by 4324.
close c:\WinApp\hoge/.bsfilter/ja.clean.sdbm 89588 tokens 6372 mails by 4324.
close c:\WinApp\hoge/.bsfilter/ja.spam.sdbm 71403 tokens 6673 mails by 4324.
end Mon Apr 24 10:16:28 JST 2006
Reply to #21444

Reply to #21469×

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