--- /root/.cpan/build/NetxAP-0.02/Net/IMAP.pm 1999-10-03 08:56:21.000000000 -0600 +++ IMAP.pm 2003-11-21 17:32:36.000000000 -0700 Patch to fix bug with NetxAP 0.02 (IMAP.pm), so that it will not immediately disconnect from a Cyrus 2.x IMAP server. It appears that the original NetxAP author (Kevin Johnson) has not been actively maintaining this package since 1999. Paul Kreiner 11-21-2003 @@ -232,7 +232,12 @@ $! = 5; # *sigh* error reporting needs to be improved return undef; } - + unless (defined($self->{Capabilities}{'IMAP4REV1'})) { + carp "server does not advertise imap4rev1 capability"; + $self->close_connection or carp "error closing connection: $!"; + $! = 5; # *sigh* error reporting needs to be improved + return undef; + } return $self; } @@ -263,14 +268,14 @@ } elsif (($list->[0] ne '*') || ($list->[1] !~ /^ok$/i)) { return undef; } - my $supports_imap4rev1 = 0; - for my $item (@{$list}) { - $supports_imap4rev1++ if ($item =~ /^imap4rev1$/i); - } - unless ($supports_imap4rev1) { - $self->close_connection; - return undef; - } +# my $supports_imap4rev1 = 0; +# for my $item (@{$list}) { +# $supports_imap4rev1++ if ($item =~ /^imap4rev1$/i); +# } +# unless ($supports_imap4rev1) { +# $self->close_connection; +# return undef; +# } $self->{Banner} = $list;