Group :: Networking/Mail
RPM: imapsync
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: imapsync-1.255-authuser.patch
Download
Download
diff -urp imapsync-1.255.orig/imapsync imapsync-1.255/imapsync
--- imapsync-1.255.orig/imapsync 2008-06-24 18:38:58.000000000 +0200
+++ imapsync-1.255/imapsync 2008-08-08 10:55:51.000000000 +0200
@@ -489,8 +489,8 @@ $VERSION = ($1) ? $1 : "UNKNOWN";
my $VERSION_IMAPClient = $Mail::IMAPClient::VERSION;
-check_lib_version() or
- die "imapsync needs perl lib Mail::IMAPClient release 2.2.9 exactly, future imapsync release may suppoort 3.0.x, but sorry not now. See file BUG_IMAPClient_3.xx\n";
+#check_lib_version() or
+# warn "There are known problems in versions of Mail::IMAPClient more recent than 2.2.9 (Yours is $VERSION_IMAPClient). Please see file BUG_IMAPClient_3.xx";
$mess_size_total_trans = 0;
@@ -749,7 +749,9 @@ sub login_imap {
$imap->Authcallback(\&plainauth) if $authmech eq "PLAIN";
$imap->User($user);
- $imap->Authuser($authuser);
+ # Newer Mail::IMAPClient (3.08) provides Authuser, use compat stub if it fails
+ eval { $imap->Authuser($authuser) };
+ $imap->Authuser_compat($authuser) if $@;
$imap->Password($password);
unless ($imap->login()) {
print "Error login : [$host] with user [$user] auth [$authmech]: $@\n";
@@ -2561,7 +2563,7 @@ use constant NonFolderArg => 1;
package Mail::IMAPClient;
-sub Authuser {
+sub Authuser_compat {
my $self = shift;
if (@_) { $self->{AUTHUSER} = shift }