r13730 - in /branches/upstream/libmail-imapclient-perl/current: Changes META.yml lib/Mail/IMAPClient.pm lib/Mail/IMAPClient.pod lib/Mail/IMAPClient/MessageSet.pm

gregoa-guest at users.alioth.debian.org gregoa-guest at users.alioth.debian.org
Sun Jan 27 22:05:07 UTC 2008


Author: gregoa-guest
Date: Sun Jan 27 22:05:07 2008
New Revision: 13730

URL: http://svn.debian.org/wsvn/?sc=1&rev=13730
Log:
[svn-upgrade] Integrating new upstream version, libmail-imapclient-perl (3.04)

Modified:
    branches/upstream/libmail-imapclient-perl/current/Changes
    branches/upstream/libmail-imapclient-perl/current/META.yml
    branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm
    branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod
    branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm

Modified: branches/upstream/libmail-imapclient-perl/current/Changes
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/Changes?rev=13730&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/Changes (original)
+++ branches/upstream/libmail-imapclient-perl/current/Changes Sun Jan 27 22:05:07 2008
@@ -2,6 +2,17 @@
 == Revision History for Mail::IMAPClient
 All changes from 2.99_01 upward are made by Mark Overmeer.  The changes
 before that are applied by David Kernen
+
+version 3.04: Fri Jan 25 09:25:51 CET 2008
+
+	Fixes:
+
+	- read_header fix for UID on Windows Server 2003.
+          rt.cpan.org#32398 [Michiel Stelman]
+
+	Improvements:
+
+	- doc update on authentication, by [Thomas Jarosch]
 
 version 3.03: Wed Jan  9 22:11:36 CET 2008
 

Modified: branches/upstream/libmail-imapclient-perl/current/META.yml
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/META.yml?rev=13730&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/META.yml (original)
+++ branches/upstream/libmail-imapclient-perl/current/META.yml Sun Jan 27 22:05:07 2008
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:                Mail-IMAPClient
-version:             3.03
+version:             3.04
 abstract:            IMAP4 client library
 license:             ~
 author:              ~

Modified: branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm?rev=13730&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm (original)
+++ branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pm Sun Jan 27 22:05:07 2008
@@ -2,7 +2,7 @@
 use strict;
 
 package Mail::IMAPClient;
-our $VERSION = '3.03';
+our $VERSION = '3.04';
 
 use Mail::IMAPClient::MessageSet;
 
@@ -1864,25 +1864,34 @@
     my @raw = $self->fetch($string)
         or return undef;
 
-    my %headers; # HASH from message ids to headers
-    my $h;       # HASH of fields for current msgid
-    my $field;   # previous field name
+    my %headers; # message ids to headers
+    my $h;       # fields for current msgid
+    my $field;   # previous field name, for unfolding
     my %fieldmap = map { ( lc($_) => $_ ) } @fields;
+    my $msgid;
 
     foreach my $header (map {split /\r?\n/} @raw)
-    {
+    {   # little problem: Windows2003 has UID as body, not in header
         if($header =~ s/^\* \s+ (\d+) \s+ FETCH \s+
                         \( (.*?) BODY\[HEADER (?:\.FIELDS)? .*? \]\s*//ix)
         {   # start new message header
-            my ($msgid, $msgattrs) = ($1, $2);
-            $msgid = $1 if $self->Uid && $msgattrs =~ m/\b UID \s+ (\d+)/x;
-            $h = $headers{$msgid} = {};
-        }
-        $header =~ /\S/ or next;
+            ($msgid, my $msgattrs) = ($1, $2);
+            $h = {};
+            if($self->Uid)  # undef when win2003
+            {   $msgid = $msgattrs =~ m/\b UID \s+ (\d+)/x ? $1 : undef }
+
+            $headers{$msgid} = $h if $msgid;
+        }
+        $header =~ /\S/ or next; # skip empty lines.
 
         # ( for vi
         if($header =~ /^\)/)  # end of this message
         {   undef $h;  # inbetween headers
+            next;
+        }
+        elsif(!$msgid && $header =~ /^\s*UID\s+(\d+)\s*\)/)
+        {   $headers{$1} = $h;   # finally found msgid, win2003
+            undef $h;
             next;
         }
 

Modified: branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod?rev=13730&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod (original)
+++ branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient.pod Sun Jan 27 22:05:07 2008
@@ -41,7 +41,7 @@
 RFC2060 defines two commands for authenticating to an IMAP server:
 LOGIN for plain text authentication and AUTHENTICATE for more secure
 authentication mechanisms. Currently Mail::IMAPClient supports
-CRAM-MD5, LOGIN, PLAIN (SASL), and NTLM authentication.
+DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN (SASL), and NTLM authentication.
 
 There are also a number of methods and parameters that you can use to
 build your own authentication mechanism. Since this topic is a source of
@@ -161,16 +161,24 @@
 set an I<Authmechanism> then it will call B<authenticate>, using your
 I<Authmechanism> and I<Authcallback> parameters as arguments.
 
+=item Authuser
+
+Normally you authenticate and log in with the username specified in
+the User parameter. When you are using DIGEST-MD5 as I<Authmechanism>,
+you can optionally specify a different username for the final log in.
+This can be useful to mark messages as seen for the I<Authuser>
+if you don't know the password of the user as the seen state
+is often a per-user state.
+
 =item Authcallback 
 
 The I<Authcallback> parameter, if set, should contain a pointer
 to a subroutine. The L<login> method will use this as the callback
 argument to the B<authenticate> method if the I<Authmechanism> and
 I<Authcallback> parameters are both set. If you set I<Authmechanism>
-but not I<Authcallback> then the default callback for your mechanism
-will be used. CRAM-MD5, PLAIN (SASL), and NTLM authentication mechanisms
-have a default callback; in every other case not supplying the callback
-results in an error.
+but not I<Authcallback> then the default callback for your mechanism will
+be used.  All supported authentication mechanisms have a default callback;
+in every other case not supplying the callback results in an error.
 
 Most advanced authentication mechanisms require a challenge-response
 exchange. After the L<authenticate> method sends "<tag> AUTHENTICATE
@@ -793,9 +801,8 @@
 
 If you do not specify a second argument and you have not set the 
 I<Authcallback> parameter, then the first argument must be
-one of the authentication mechanisms for which B<Mail::IMAPClient> has
-built in support. Currently there is only built in support for CRAM-MD5, 
-but I hope to add more in future releases. 
+one of the authentication mechanisms for which B<Mail::IMAPClient>
+has built in support.
 
 If you are interested in doing NTLM authentication then please see Mark
 Bush's L<Authen::NTLM>, which can work with B<Mail::IMAPClient> to

Modified: branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm
URL: http://svn.debian.org/wsvn/branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm?rev=13730&op=diff
==============================================================================
--- branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm (original)
+++ branches/upstream/libmail-imapclient-perl/current/lib/Mail/IMAPClient/MessageSet.pm Sun Jan 27 22:05:07 2008
@@ -5,7 +5,7 @@
 
 =head1 NAME
 
-Mail::IMAPClient::MessageSet -- ranges of message sequence nummers
+Mail::IMAPClient::MessageSet - ranges of message sequence nummers
 
 =cut
 




More information about the Pkg-perl-cvs-commits mailing list