Forums: users (Thread #22147)

pop proxyモード+Thunderbirdでの挙動について (2009-03-26 10:50 by Anonyme #42757)

はじめまして,黒沢と申します.
bsfilterをpop proxyで動作させ,MUAにThunderbirdを使用した場合,Thunderbird起動直後のメール取得で
Timeoutしてしまいます.
Thunderbird起動直後のみ問題が生じ,手で"受信"をクリックすればその後のメール取得は可能ですが,
対応策などございますでしょうか.

環境,試したことを以下に記します.

MUAの環境は,
OS: Windows XP SP3
MUA: Mozilla Thunderbird 2.0.0.14

popサーバ, bsfilterの環境は,
OS: Debian lenny
MTA: postfix 2.5.5 + dovecot 1.0.15
bsfilter 1.0.15
で,
bsfilter --pop --pop-server xxxxxx --insert-flag --insert-probability -v --debug
として起動しています.

この状態でThunderbirdを起動すると,
start Thu Mar 26 09:25:48 +0900 2009
pop mode start Thu Mar 26 09:25:48 +0900 2009
pop_proxy is on 10110:0.0.0.0:0.0.0.0
#<TCPSocket:0xb7d41360> is accepted
#<TCPSocket:0xb7d407bc> is connected
resp #<TCPSocket:0xb7d407bc> +OK Dovecot ready.
resp #<TCPSocket:0xb7d41360> AUTH
send #<TCPSocket:0xb7d407bc> AUTH
resp #<TCPSocket:0xb7d407bc> +OK
send #<TCPSocket:0xb7d41360> +OK
Timeout error xxxxxx 110 10110
#<TCPSocket:0xb7d41360> is gone
#<TCPSocket:0xb7d407bc> is gone

となって,Timeoutしてしまいます.
この状態で,Thunderbirdの"受信”をクリックすると,
#<TCPSocket:0xb7d3d030> is accepted
#<TCPSocket:0xb7d3c400> is connected
resp #<TCPSocket:0xb7d3c400> +OK Dovecot ready.
resp #<TCPSocket:0xb7d3d030> CAPA
send #<TCPSocket:0xb7d3c400> CAPA
resp #<TCPSocket:0xb7d3c400> +OK
send #<TCPSocket:0xb7d3d030> +OK
resp #<TCPSocket:0xb7d3d030> AUTH PLAIN
send #<TCPSocket:0xb7d3c400> AUTH PLAIN
resp #<TCPSocket:0xb7d3c400> +
send #<TCPSocket:0xb7d3d030> +
resp #<TCPSocket:0xb7d3d030> xxxxxxxxx
send #<TCPSocket:0xb7d3c400> xxxxxxxxx
resp #<TCPSocket:0xb7d3c400> +OK Logged in.
send #<TCPSocket:0xb7d3d030> +OK Logged in.
resp #<TCPSocket:0xb7d3d030> STAT
send #<TCPSocket:0xb7d3c400> STAT
resp #<TCPSocket:0xb7d3c400> +OK 33 403559
send #<TCPSocket:0xb7d3d030> +OK 33 403559
resp #<TCPSocket:0xb7d3d030> LIST
send #<TCPSocket:0xb7d3c400> LIST
resp #<TCPSocket:0xb7d3c400> +OK 33 messages:
send #<TCPSocket:0xb7d3d030> +OK 33 messages:
resp #<TCPSocket:0xb7d3d030> UIDL
send #<TCPSocket:0xb7d3c400> UIDL
resp #<TCPSocket:0xb7d3c400> +OK
send #<TCPSocket:0xb7d3d030> +OK
resp #<TCPSocket:0xb7d3d030> QUIT
send #<TCPSocket:0xb7d3c400> QUIT
resp #<TCPSocket:0xb7d3c400> +OK Logging out.
send #<TCPSocket:0xb7d3d030> +OK Logging out.
#<TCPSocket:0xb7d3d030> is gone
#<TCPSocket:0xb7d3c400> is gone

となり,正常に受信できます.

telnetで直接コマンドを入力すると,
% telnet localhost 10110 ~

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot ready.(pop_proxy by bsfilter)
AUTH
+OK
Connection closed by foreign host.

となり,接続が切れてしまいます.このとき,bsfilter側は,
#<TCPSocket:0xb7d1a3a0> is accepted
#<TCPSocket:0xb7d197d4> is connected
resp #<TCPSocket:0xb7d197d4> +OK Dovecot ready.
resp #<TCPSocket:0xb7d1a3a0> AUTH
send #<TCPSocket:0xb7d197d4> AUTH
resp #<TCPSocket:0xb7d197d4> +OK
send #<TCPSocket:0xb7d1a3a0> +OK
Timeout error xxxxxx 110 10110
#<TCPSocket:0xb7d1a3a0> is gone
#<TCPSocket:0xb7d197d4> is gone
となります.

popサーバに直接telnetすると,
kuro4% telnet xxxxxx 110

Trying xxxxxxxx...
Connected to xxxxxx
Escape character is '^]'.
+OK Dovecot ready.
AUTH
+OK
.
CAPA
+OK
CAPA
TOP
UIDL
RESP-CODES
PIPELINING
STLS
USER
SASL PLAIN
.
QUIT
+OK Logging out
Connection closed by foreign host.

となり,問題はありません.

MUAが"AUTH"を送った際,レスポンスの'+OK'(2b 4f 4b 0d 0a)の後の'.'(2e 0d 0a)を待っているときに
Timeoutしているようです.

以上ですが,よろしくお願いいたします.

Répondre à 42757×

You can not use Wiki syntax
Vous n'êtes pas connecté. Pour distinguer vos messages en provenance du reste, vous devez choisir un surnom. (L'unicité du surnom est pas réservé. Il est possible que quelqu'un d'autre pourrait utiliser exactement le même surnom. Si vous voulez l'assurance de votre identité, nous vous recommandons de vous connecter avant de poster.) Connexion

RE: pop proxyモード+Thunderbirdでの挙動について (2009-03-26 17:29 by Anonyme #42764)

黒沢と申します.
とりあえず,下記のpatchを当てることで回避できました.bsfilter 1.0.17.rc3用です.1.0.15でも該当部分を変更することで回避できます.

副作用が無ければよいのですが.

kuro4% cat bsfilter.patch ~/tmp/bsfilter-1.0.17.rc3/bsfilter
*** bsfilter.orig 2009-03-09 22:11:34.000000000 +0900
--- bsfilter 2009-03-26 14:36:40.408139139 +0900
***************
*** 2531,2537 ****
buf.push(response)
@options["message-fh"].printf("resp %s %s", socket, response.sub(/\APASS.*/i, "PASS ********")) if (@options["debug"])
if ((response =~ /\A\+OK/) &&
! ((command =~ /\A(RETR|TOP|CAPA)/i) ||
(command =~ /\A(UIDL|LIST)[^\d]*\z/i)))
while (response != ".\r\n")
response = socket.gets_timeout
--- 2531,2537 ----
buf.push(response)
@options["message-fh"].printf("resp %s %s", socket, response.sub(/\APASS.*/i, "PASS ********")) if (@options["debug"])
if ((response =~ /\A\+OK/) &&
! ((command =~ /\A(RETR|TOP|CAPA|AUTH)/i) ||
(command =~ /\A(UIDL|LIST)[^\d]*\z/i)))
while (response != ".\r\n")
response = socket.gets_timeout
Répondre à #42757

Répondre à 42764×

You can not use Wiki syntax
Vous n'êtes pas connecté. Pour distinguer vos messages en provenance du reste, vous devez choisir un surnom. (L'unicité du surnom est pas réservé. Il est possible que quelqu'un d'autre pourrait utiliser exactement le même surnom. Si vous voulez l'assurance de votre identité, nous vous recommandons de vous connecter avant de poster.) Connexion

RE: pop proxyモード+Thunderbirdでの挙動について (2009-03-28 15:28 by nabeken #42820)

スクリプトのその個所では、サーバからの"+OK"の後、"."までを受け取ろうとしています。
クライアントの"AUTH"に対して、サーバが"+OK"を返したら、その後つねに"."まで送って来る、というのであれば、その修正で大丈夫です。

しかし、Thunderbirdが引数無しでAUTHを送り、サーバが"+ERR"でなく"+OK"と"."を返す、という現状の動作は、それで正しいのでしょうか?
Répondre à #42757

Répondre à 42820×

You can not use Wiki syntax
Vous n'êtes pas connecté. Pour distinguer vos messages en provenance du reste, vous devez choisir un surnom. (L'unicité du surnom est pas réservé. Il est possible que quelqu'un d'autre pourrait utiliser exactement le même surnom. Si vous voulez l'assurance de votre identité, nous vous recommandons de vous connecter avant de poster.) Connexion