Imap problem

Hi all,

Ruby 1.8.1
Solaris 9

A previous imap question inspired me to futz around with a test script
I wrote. I thought it worked before, but when I run it now it runs
for a bit then dies like this:


“INBOX/Foo/John”
#<struct Net::IMAP::FetchData seqno=1, attr={“UID”=>1}>
#<struct Net::IMAP::FetchData seqno=2, attr={“UID”=>2}>
“INBOX/Foo/Jane”
#<struct Net::IMAP::FetchData seqno=1, attr={“UID”=>1}>
#<struct Net::IMAP::FetchData seqno=2, attr={“UID”=>2}>
“INBOX/Bar”
/opt/lib/ruby/1.8/net/imap.rb:948:in get_tagged_response': The message set specified is invalid. (Net::IMAP::NoResponseError) from /opt/lib/ruby/1.8/net/imap.rb:996:insend_command’
from /opt/lib/ruby/1.8/net/imap.rb:984:in synchronize' from /opt/lib/ruby/1.8/net/imap.rb:1002:insend_command’
from /opt/lib/ruby/1.8/net/imap.rb:1105:in fetch_internal' from /opt/lib/ruby/1.8/net/imap.rb:1103:insynchronize’
from /opt/lib/ruby/1.8/net/imap.rb:1107:in fetch_internal' from /opt/lib/ruby/1.8/net/imap.rb:698:infetch’
from imapTest.rb:15
from imapTest.rb:11:in `each’
from imapTest.rb:11

Here’s the script:

imaptest.rb

require “net/imap”

imap = Net::IMAP.new(server)
imap.login(“djberge”,“xxxxx”)
imap.select(“inbox”)

list = imap.list(“inbox”,"*")

list.each{ |i|
p i.name
imap.fetch(1…-1,“UID”).each{ |uid|
p uid
}
}

imap.disconnect

It always seems to die in the same spot (i.e. INBOX/Bar). I’m not
sure what’s significant about that directory. The “server” is an
Exchange server. I’m not sure what other details I can provide - let
me know.

Any help appreciated.

Regards,

Dan