Skip Menu |

This queue is for tickets about the IMAP-Admin CPAN distribution.

Report information
The Basics
Id: 64884
Status: new
Priority: 0/
Queue: IMAP-Admin

Owner: Nobody in particular
Requestors: guilherme.maciel.ferreira [...]

Bug Information
Severity: Important
Broken in: 1.6.7
Fixed in: (no value)

Subject: RENAME broken when renaming users with subfolders
Download (untitled) / with headers
text/plain 954b
Hi, When renaming an user who has subfolders, the subsequent calls to rename subroutine will not work properly. Because the rename subroutine isn't parsing multiple lines from RENAME result, so it unsynchronizes the "* OK" results, leaving residual responses in the socket. For example, performing the follow command: try RENAME user/a1 user/a2 the IMAP server returns: * OK rename user/a1 user/a2 * OK rename user/a1/Trash user/a2/Trash * OK rename user/a1/Sent user/a2/Sent try OK Completed once the rename subroutine is checking just the first line, when we call rename again it returns success, even if it should fail. Because it reads the second line from the previous response instead of read its own response lines. The patch attached solves this issue by consuming all lines from the socket before return from rename subroutine. Similar thing is done by quota, expunge and select subroutines. -> 1.6.7 IMAP server cyrus -> 2.3.16
Subject: perl-IMAP-Admin-1.6.7-fix-rename.patch
--- IMAP-Admin-1.6.7.orig/ +++ IMAP-Admin-1.6.7/ @@ -272,6 +272,7 @@ sub rename { my $self = shift; + my @info; if (!defined($self->{'Socket'})) { return 1; @@ -291,6 +292,10 @@ print $fh qq{try RENAME "$old_name" "$new_name"\n}; } my $try = $self->_read; + while ($try =~ /^\* (.*)/) { # danger danger (could lock up needs timeout) + push @info, $1; + $try = $self->_read; + } if (($try =~ /^try OK/) || ($try =~ /^\* OK/)) { $self->{'Error'} = 'No Errors'; return 0;

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to