Skip Menu |

This queue is for tickets about the Mail-IMAPClient CPAN distribution.

Report information
The Basics
Id: 128582
Status: new
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: PLOBBES [...] cpan.org
Requestors: PLOBBES [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: (no value)



Consider adding support for REFERRAL / RFC 2221 A suggestion was made that it would be nice if https://tools.ietf.org/html/rfc2221 was implemented in Mail::IMAPClient. The workaround was: <     $self->{$location}{imap} = Mail::IMAPClient->new(Uid => 1, %$args) or die "Could not connect to $location: $@"; --- Show quoted text
>     try { >         $self->{$location}{imap} = Mail::IMAPClient->new(Uid => 1, %$args) or die $@; >     } catch { >         my $error = $_; >         # this is extremely minimal support for RFC 2221 but all i need for zimbra >         my $user = quotemeta uri_escape $args->{User}; >         if ($error =~ m{^\d+ NO \[REFERRAL imap://$user\@(?<server>[\w.-]+)/\] AUTHENTICATE failed}) { >             $args->{Server} = $+{server}; >             $self->connect_imap($location); >         } else { >             die "Could not connect to $location: $@"; >         } >     };