From: | "Michael Levine" <michael.j.levine [...] comcast.net> |
To: | <bug-Mail-IMAPClient [...] rt.cpan.org> |
Subject: | Migrate problem over SSL |
Date: | Fri, 5 Dec 2003 03:49:13 -0500 |
I am using the Mail-IMAP client over an SSL socket
my $assl = IO::Socket::SSL->new(Proto=>'tcp',
SSL_verify_mod=>0x00,
PeerAddr=>$server,
PeerPort=>$port);
open(DBG,">debugging.archive")
or die "Can't open debugging.output: $!\n";
my $archive = Mail::IMAPClient->new(Socket=>$assl,
User=>$archiveuser,
Password=>$archivepassword,
Debug=> 1,
Debug_fh => *DBG,
);
$archive->State(Connected);
$archive->login();
$archive->State(Authenticated);
Similar code opens a second connection.
On logs in as a user, the other as an archive agent.
I can successfully traverse the users mail list,
and upon finding a message created before a certain date.
I want to migrate that file to the archive users session.
i.e. archive it off so it doesn't slow down my IMAP browsing.
When I call the migrate member of the users imap connect
it bombs out at the $peer->isConnected in the .pm.
here is the archive session log.
Using Mail::IMAPClient version 2.1.4 and perl version 5.8.0 (5.008)
Sending: 1 Login "XXXXXXX" "XXXXXXX"
Sent 33 bytes
Read: * OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS AUTH=PLAIN AUTH=LOGIN]
localhost IMAP4rev1 2003.338 at Fri, 5 Dec 2003 03:42:48 -0500 (EST)
Read: 1 OK [CAPABILITY IMAP4REV1 IDLE NAMESPACE MAILBOX-REFERRALS BINARY
UNSELECT SCAN SORT THREAD=REFERENCES THREAD=ORDEREDSUBJECT MULTIAPPEND] User
mailarchive authenticated
Autoloading: create "mail/ml/test"
Sending: 2 create "mail/ml/test"
Sent 25 bytes
Read: 2 OK CREATE completed
Sending: 3 isConnected
Sent 15 bytes
Read: 3 BAD Command unrecognized: ISCONNECTED
Sending: 4 isConnected
Sent 15 bytes
Read: 4 BAD Command unrecognized: ISCONNECTED
Sending: 5 close
Sent 9 bytes
Read: 5 BAD Command unrecognized: CLOSE
the user session shows no error.
here is a chunk of script->
my $ret = $imap->migrate($archive,$mes,$archive_folder)
or warn "Could not move: $@\n";
print "Archive State ";
print $archive->Status;
print "\n";
if($archive->isConnected)
{print "Archive Connected\n";}
else
{print "Archive NOT Connected\n";}
print "Imap State ";
print $imap->Status;
print "\n";
if($imap->isConnected)
{print "Imap Connected\n";}
else
{print "Imap NOT Connected\n";}
the actual output of the script is->
Searching mail/test for messages
New Folder mail/ml/test
Could not move: Invalid or unconnected Mail::IMAPClient object used as
target for migrate.
main::search_folder('Mail::IMAPClient=HASH(0x813b9d8)','Mail::IMAPClient=HAS
H(0x86dd120)','mail/test','ml') called at imap_archive.pl line 121
Archive State 3
Archive NOT Connected
Imap State 3
Imap NOT Connected
So it look like is should be connected.
but why does it send the ISCONNECTED text to the server?
sorry this is not short but I have been look at this for about two hours
now.
thanks.
mike levine