From: Hideto ISHIBASHI Date: 2000-06-05T21:23:17+09:00 Subject: [ruby-list:23061] rfc822.rb parse error 石橋"rubyholic"秀仁です。 標準添付の rfc822.rb で parse error が出ます。 入力は [ruby-list: 22494] のメールです。 --スクリプト-- require 'rfc822' file = File.open(ARGV[0]) RFC822.new(file) --出力-- /usr/lib/ruby/1.4/rfc822.rb:270:in `parse_error': unbalanced `;': (RuntimeError) .nagaokaut.ac.jp "# help" (without quotes) to the address ruby-list-ctl@netlab.co.jp; ^ from /usr/lib/ruby/1.4/rfc822.rb:745:in `get_mailboxes' from /usr/lib/ruby/1.4/rfc822.rb:698:in `each' from /usr/lib/ruby/1.4/rfc822.rb:698:in `get_mailboxes' from /usr/lib/ruby/1.4/rfc822.rb:662:in `parse' from /usr/lib/ruby/1.4/rfc822.rb:658:in `initialize' from /usr/lib/ruby/1.4/rfc822.rb:476:in `new' from /usr/lib/ruby/1.4/rfc822.rb:476:in `get_address' from /usr/lib/ruby/1.4/rfc822.rb:425:in `parse_header' from /usr/lib/ruby/1.4/rfc822.rb:382:in `initialize' from test.rb:3:in `new' from test.rb:3 -- どうやら、ある条件で、"X-ML-Info" のなかの ';' が悪さをする ようです。確認した限りでは、parse error になるメールは、 "X-ML-Info" のついた fml のメールだけです。その「ある条件」が よくわからないのですが、たぶん中継による "Received" あたりかと・・・ parse error で止まるよりも、てきとーに処理してくれるほうが ありがたいのですが、どのようにすればよいのでしょうか? よろしくお願いします。 -- Hideto "rubyholic" ISHIBASHI http://www.rr.iij4u.or.jp/~hideto-i/ blade clone (yaiba) development: http://www.rr.iij4u.or.jp/~hideto-i/rb/yaiba/index.html