Skip Menu |

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

Report information
The Basics
Id: 9341
Status: resolved
Priority: 0/
Queue: Mail-IMAPClient

People
Owner: Nobody in particular
Requestors: gilles.lamiral [...] free.fr
Cc:
AdminCc:

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



Date: Mon, 03 Jan 2005 01:51:06 +0100
From: Gilles LAMIRAL <gilles.lamiral [...] free.fr>
To: bug-Mail-IMAPClient [...] rt.cpan.org
Subject: fetch_hash BODY[HEADER] void because of a ) match force
Hello David, First thanks for this useful module. $from->fetch_hash("BODY[HEADER]") doesn't report anything but $from->fetch_hash("BODY[HEADER.FIELDS (Message-ID)]" does because of the ) of "Message-ID)" so the regex in sub fetch_hash: my($uid) = $l =~ /\((?:.* )?UID (\d+).*\)/i; ----------------------------------------^ is too hard to match a simple "BODY[HEADER]". but the patch is easy: my($uid) = $l =~ /\((?:.* )?UID (\d+).*/i; I hope there is no side effect. Seems not. Do you still maintain this module ? Happy new year David. -- Au revoir, 02 99 78 62 49 06 20 79 76 06 Gilles Lamiral. France, L'Hermitage (35590) 08 70 76 34 16
On Sun Jan 02 20:25:06 2005, gilles.lamiral@free.fr wrote: Show quoted text
> Hello David, > > First thanks for this useful module. > > $from->fetch_hash("BODY[HEADER]") > doesn't report anything > but > $from->fetch_hash("BODY[HEADER.FIELDS (Message-ID)]" > does because of the ) of "Message-ID)" > so the regex in sub fetch_hash: > > my($uid) = $l =~ /\((?:.* )?UID (\d+).*\)/i; > ----------------------------------------^ > > is too hard to match a simple "BODY[HEADER]". > but the patch is easy: > > my($uid) = $l =~ /\((?:.* )?UID (\d+).*/i;
The regex is too complex... (?:.* ) is also quite silly. I have changed it into /\bUID\s+(\d+)/ Show quoted text
> I hope there is no side effect. Seems not. > Do you still maintain this module ?
No, I took over, because David could not be contacted anymore.
Subject: Re: [rt.cpan.org #9341] fetch_hash BODY[HEADER] void because of a ) match force
Date: Wed, 24 Oct 2007 05:32:37 +0200
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Show quoted text
> > Do you still maintain this module ?
> No, I took over, because David could not be contacted anymore.
This is very good news ! You'll receive other patch/bug report from me. -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66
Subject: Re: [rt.cpan.org #9341] fetch_hash BODY[HEADER] void because of a ) match force
Date: Wed, 24 Oct 2007 08:59:01 +0200
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071024 03:33]: Show quoted text
> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=9341 > >
> > > Do you still maintain this module ?
> > No, I took over, because David could not be contacted anymore.
> > This is very good news ! > You'll receive other patch/bug report from me.
Yes please! Are you still using IMAPClient? I am looking for people who can help me checking the massive rework (and I do not use imap myself!) -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #9341] fetch_hash BODY[HEADER] void because of a ) match force
Date: Wed, 24 Oct 2007 09:16:53 +0200
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Show quoted text
> Are you still using IMAPClient? I am looking for people who can > help me checking the massive rework (and I do not use imap myself!)
I wrote and still maintain imapsync: http://freshmeat.net/projects/imapsync/ imapsync uses IMAPClient massively. I had to fix some functions. IMAPClient code is difficult to read and touch for me. Fixes are at the end of the imapsync script, I renamed functions, foo() to foo2(), to avoid crushing the real definition. -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66
Subject: Re: [rt.cpan.org #9341] fetch_hash BODY[HEADER] void because of a ) match force
Date: Wed, 24 Oct 2007 10:46:25 +0200
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071024 07:17]: Show quoted text
> > Are you still using IMAPClient? I am looking for people who can > > help me checking the massive rework (and I do not use imap myself!)
> > I wrote and still maintain imapsync: > http://freshmeat.net/projects/imapsync/ > > imapsync uses IMAPClient massively. I had to fix some functions. > IMAPClient code is difficult to read and touch for me. > Fixes are at the end of the imapsync script, > I renamed functions, foo() to foo2(), to avoid > crushing the real definition.
I see a few fixes which I have already incuperated. Please, have a look at the attached code ;-) Which is totally untested :( and see if you can understand it better. Then, please, try to figure-out which changes you made to the original code, and wether they are in already. Provide a bug-report for each of them. (The Changes file may clear-up your memory) For instance, PLAIN authenication is already in. That author thought 'Proxy' was a good name, where you use 'Authuser'. Changes like that are still possible... but please tell me asap. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Download Mail-IMAPClient-2.99_02.tar.gz
application/x-gunzip 165.1k

Message body not shown because it is not plain text.

CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #9341] fetch_hash BODY[HEADER] void because of a ) match force
Date: Fri, 26 Oct 2007 11:55:09 +0200
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071024 07:17]: Show quoted text
> Queue: Mail-IMAPClient > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=9341 >
I just release 2.99_02, and it passes all the tests in my enviroment. Hopefully you find time to test it with your module (and remove the patches you made yourself) -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #9341] new lib 2.99_02
Date: Tue, 30 Oct 2007 00:55:59 +0100
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Show quoted text
> I just release 2.99_02, and it passes all the tests in my enviroment.
I doesn't pass the first one in mine :-( Show quoted text
> Hopefully you find time to test it with your module (and remove the > patches you made yourself)
Can you try this simple script with the old 2.2.9 and the new 2.99_02 lib? Here, the old one works, the new one doesn't. #!/usr/bin/perl -w use Mail::IMAPClient; $imap = Mail::IMAPClient->new(); $imap->Debug(1); $imap->Server('louloutte.dyndns.org'); $imap->connect(); $imap->User('MarkOv@est.belle'); $imap->Password('emhj91ly'); $imap->login(); $imap->logout(); Feel free to play with this imap account. Everyone on this list can do so. This imap account will stay alive until any problem arises. -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66
Subject: Re: [rt.cpan.org #9341] new lib 2.99_02
Date: Tue, 30 Oct 2007 09:07:06 +0100
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071029 23:56]: Show quoted text
> Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=9341 > > > Hello Mark, >
> > I just release 2.99_02, and it passes all the tests in my enviroment.
> I doesn't pass the first one in mine :-(
Of course, with such an extensive rewrite, some problems will appear. However, I cannot reproduce your error. What platform are you using? My output of your script is: Read: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=PLAIN CRAM-MD5 CRAM-SHA1 IDLE STARTTLS] Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See COPYING for distribution information. Sending: 1 LOGIN "MarkOv@est.belle" emhj91ly Sent 37 bytes Read: 1 OK LOGIN Ok. Sending: 2 LOGOUT Sent 10 bytes Read: * BYE Courier-IMAP server shutting down 2 OK LOGOUT completed Which looks as I expect it. What's your output? -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #9341] new lib 2.99_02
Date: Tue, 30 Oct 2007 14:00:33 +0100
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Show quoted text
> However, I cannot reproduce your error. What platform are you using?
A classic Debian Etch on Linux. Show quoted text
> Sending: 1 LOGIN "MarkOv@est.belle" emhj91ly > Sent 37 bytes > Read: 1 OK LOGIN Ok. > Sending: 2 LOGOUT > Sent 10 bytes > Read: * BYE Courier-IMAP server shutting down > 2 OK LOGOUT completed
Good. Outputing the password is often a risky choice. Show quoted text
> Which looks as I expect it. What's your output?
$ perl -IMail-IMAPClient-2.99_02/lib t/01_connect NO Not connected. ...propagated at t/01_connect line 9. Line 9 is now : $imap->connect() or die; Now with the 2.2.9: $ perl t/01_connect Read: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=PLAIN CRAM-MD5 CRAM-SHA1 IDLE STARTTLS] Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See COPYING for distribution information. Connect: Received this from readline: 0/OUTPUT/* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=PLAIN CRAM-MD5 CRAM-SHA1 IDLE STARTTLS] Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See COPYING for distribution information. Sending: 1 Login "XXXXXXXX" XXXXXXXX Sent 37 bytes Read: 1 OK LOGIN Ok. Sending: 2 LOGOUT Sent 10 bytes Read: * BYE Courier-IMAP server shutting down 2 OK LOGOUT completed -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66
Subject: Re: [rt.cpan.org #9341] new lib 2.99_02
Date: Wed, 31 Oct 2007 10:09:12 +0100
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071030 13:01]: Show quoted text
> > However, I cannot reproduce your error. What platform are you using?
Still cannot reproduce the error. Could you please have a look at error messages produced by your server. Show quoted text
> Outputing the password is often a risky choice.
While testing, I want to see exactly what is happening, not some weak derivation of the reality Show quoted text
> Line 9 is now : > $imap->connect() or die; > NO Not connected. ...propagated at t/01_connect line 9.
Please change the first two lines of your script into my $imap = Mail::IMAPClient->new(Debug => 1); Then we have a few more lines of output. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #9341] new lib 2.99_02
Date: Wed, 31 Oct 2007 14:49:43 +0100
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Show quoted text
> Still cannot reproduce the error. > Could you please have a look at error messages produced by your > server.
$ perl t/01_connect Using Mail::IMAPClient version 2.2.9 and perl version 5.8.8 (5.008008) Read: * OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA AUTH=PLAIN CRAM-MD5 CRAM-SHA1 IDLE STARTTLS] Courier-IMAP ready. Copyright 1998-2005 Double Precision, Inc. See COPYING for distribution information. Connect: Received this from readline: 0/OUTPUT/* OK [CAPA ... gives: Oct 31 14:37:41 plume couriertcpd: Connection, ip=[::ffff:192.168.68.7] Oct 31 14:37:41 plume couriertcpd: LOGIN: ip=[::ffff:192.168.68.7], command=LOGIN Oct 31 14:37:41 plume couriertcpd: LOGIN: ip=[::ffff:192.168.68.7], username=MarkOv@est.belle Oct 31 14:37:41 plume couriertcpd: LOGIN, user=MarkOv@est.belle, ip=[::ffff:192.168.68.7], protocol=IMAP Oct 31 14:37:41 plume couriertcpd: LOGOUT, user=MarkOv@est.belle, ip=[::ffff:192.168.68.7], headers=0, body=0, rcvd=10, sent=80, time=0 $ perl -I Mail-IMAPClient-2.99_02/lib t/01_connect Using Mail::IMAPClient version 2.99_02 and perl version 5.8.8 (5.008008) NO Not connected. ...propagated at t/01_connect line 9. gives Oct 31 14:39:47 plume couriertcpd: Connection, ip=[::ffff:192.168.68.7] Oct 31 14:39:47 plume couriertcpd: Disconnected, ip=[::ffff:192.168.68.7], time=0 Show quoted text
> Please change the first two lines of your script into > my $imap = Mail::IMAPClient->new(Debug => 1); > Then we have a few more lines of output.
See above The connect() fails. Last lines of system calls : $ strace -f perl -I Mail-IMAPClient-2.99_02/lib t/01_connect ... open("/etc/host.conf", O_RDONLY) = 3 fstat64(3, {st_mode=S_IFREG|0644, st_size=9, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7be5000 read(3, "multi on\n", 4096) = 9 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7be5000, 4096) = 0 futex(0xb7f74ac0, FUTEX_WAKE, 2147483647) = 0 open("/etc/hosts", O_RDONLY) = 3 fcntl64(3, F_GETFD) = 0 fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 fstat64(3, {st_mode=S_IFREG|0644, st_size=1034, ...}) = 0 mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7be5000 read(3, "# /etc/hosts\n\n127.0.0.1\tlocalhos"..., 4096) = 1034 read(3, "", 4096) = 0 close(3) = 0 munmap(0xb7be5000, 4096) = 0 socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3 ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfbe8618) = -1 EINVAL (Invalid argument) _llseek(3, 0, 0xbfbe8660, SEEK_CUR) = -1 ESPIPE (Illegal seek) ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfbe8618) = -1 EINVAL (Invalid argument) _llseek(3, 0, 0xbfbe8660, SEEK_CUR) = -1 ESPIPE (Illegal seek) fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 connect(3, {sa_family=AF_INET, sin_port=htons(143), sin_addr=inet_addr("192.168.68.7")}, 16) = 0 write(2, "NO Not connected.\t...propagated "..., 56NO Not connected. ...propagated at t/01_connect line 9. ) = 56 close(3) = 0 exit_group(29) = ? Process 24455 detached May be a problem with the IO::Socket -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66
Subject: Re: [rt.cpan.org #9341] new lib 2.99_02
Date: Sat, 10 Nov 2007 21:09:47 +0100
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071031 13:50]: Show quoted text
> > Still cannot reproduce the error. > > Could you please have a look at error messages produced by your > > server.
> > Oct 31 14:39:47 plume couriertcpd: Connection, ip=[::ffff:192.168.68.7]
IPv6 address? Show quoted text
> read(3, "# /etc/hosts\n\n127.0.0.1\tlocalhos"..., 4096) = 1034 > read(3, "", 4096) = 0 > close(3) = 0 > munmap(0xb7be5000, 4096) = 0 > socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 3 > ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfbe8618) = -1 EINVAL (Invalid argument) > _llseek(3, 0, 0xbfbe8660, SEEK_CUR) = -1 ESPIPE (Illegal seek) > ioctl(3, SNDCTL_TMR_TIMEBASE or TCGETS, 0xbfbe8618) = -1 EINVAL (Invalid argument) > _llseek(3, 0, 0xbfbe8660, SEEK_CUR) = -1 ESPIPE (Illegal seek) > fcntl64(3, F_SETFD, FD_CLOEXEC) = 0 > connect(3, {sa_family=AF_INET, sin_port=htons(143), sin_addr=inet_addr("192.168.68.7")}, 16) = 0 > write(2, "NO Not connected.\t...propagated "..., 56NO Not connected. ...propagated at t/01_connect line 9. > ) = 56
Apparently, the connection fails on a very low level, before any data is exchanged. Anyway... there are a few things fixed in 2.99_04 by Flavio Poletti. I hope you find time to investigate your problem a little further. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions drs Mark A.C.J. Overmeer MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #9341] new lib 2.99_04
Date: Tue, 13 Nov 2007 04:57:51 +0100
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Show quoted text
> IPv6 address?
No. Linux kernel can do IPV6 so system call show this (libc). Show quoted text
> Apparently, the connection fails on a very low level, before any data > is exchanged.
Yes. it fails on: sub connect ... while(my $output = $self->_read_line) ... because $self->_read_line returns undef and $self->_read_line returns undef because sub _read_line ... unless($self->IsConnected && $self->Socket) ... $self->Socket is undef and $self->Socket is undef because : sub Socket(;$) { my ($self, $sock) = @_; defined $sock or return $self->{Socket}; $self->Socket is called without any arg so $sock is undef so $self->{Socket} is return but $self->{Socket} is undef. I didn't find where $self->{Socket} is set in 2.99_02 So I understand why this code doesn't work here. But I don't understand why this code works with you :-( Show quoted text
> Anyway... there are a few things fixed in 2.99_04 by Flavio Poletti.
Where is 2.99_04 ? -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66
Subject: Re: [rt.cpan.org #9341] new lib 2.99_04
Date: Tue, 13 Nov 2007 08:49:09 +0100
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071113 03:58]: Show quoted text
> Yes. it fails on: > > sub connect > ...
Connect creates and sets the Socket in line 254. Show quoted text
> while(my $output = $self->_read_line) > ...
Show quoted text
> because $self->_read_line returns undef > and $self->_read_line returns undef because > > sub _read_line > ... > unless($self->IsConnected && $self->Socket)
So this should be true, the first pass. I have had patches from at four different people, and for them the initiation all work. When I run your script, connecting to your server, it also works. The flow of the program also indicates that the connecting must be present. Interesting things are happening, probably with your environment. Hum. Is your server running on the same system as you run your script? I did remove a $sock->autoflush(1); after the socket is created, because the manual page of IO::Socket::INET states: NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE As of VERSION 1.18 all IO::Socket objects have autoflush turned on by default. This was not the case with earlier releases. NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE NOTE However, this might not be done correctly, where local sockets are a bit different from network sockets. [I require IO::Socket::INET version 1.26, and run version 1.28] -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #9341] new lib 2.99_04
Date: Tue, 13 Nov 2007 16:26:45 +0100
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Show quoted text
> > Yes. it fails on: > > sub connect > > ...
> > Connect creates and sets the Socket in line 254.
It seems you don't use the same Mail-IMAPClient-2.99_02 I use, since line 254 is : $ cat -n Mail-IMAPClient-2.99_02/lib/Mail/IMAPClient.pm ... 252 253 sub login 254 { my $self = shift; 255 return $self->authenticate($self->Authmechanism, $self->Authcallback) 256 if $self->{Authmechanism} && $self->{Authmechanism} ne 'LOGIN'; 257 Show quoted text
> > while(my $output = $self->_read_line) > > ...
>
> > because $self->_read_line returns undef > > and $self->_read_line returns undef because > > > > sub _read_line > > ... > > unless($self->IsConnected && $self->Socket)
> > So this should be true, the first pass.
It is not and we have to understand why. Show quoted text
> I have had patches from at four different people, and for them the > initiation all work.
Can you make them test the connect script : 85$ cat t/01_connect #!/usr/bin/perl -w use Carp; use Mail::IMAPClient; $imap = Mail::IMAPClient->new(Debug => 1); $imap->Debug(1); $imap->Server('louloutte.dyndns.org'); $imap->connect() or croak "Error connecting @!"; $imap->User('MarkOv@est.belle'); $imap->Password('emhj91ly'); $imap->login(); $imap->logout(); Show quoted text
> When I run your script, connecting to your server, it also works.
Yes. You can stop to convince me it works for you. Show quoted text
> The flow of the program also indicates that > the connecting must be present.
I don't see where. Show quoted text
> Interesting things are happening, probably with your environment. > Hum.
Yes. Show quoted text
> Is your server running on the same system as you run your script?
Yes. Show quoted text
> I did remove a > $sock->autoflush(1); > after the socket is created,
I still have this line : 205 sub connect 206 { my $self = shift; ... 222 $self->Socket($sock); 223 $self->State(Connected); 224 $sock->autoflush(1); Show quoted text
> [I require IO::Socket::INET > version 1.26, and run version 1.28]
I run 1.29 Attached two perl debug outputs : a) # 01_connect_2.99_02.dump perl -d -I Mail-IMAPClient-2.99_02/lib t/01_connect b) # 01_connect_2.99_02.dump_2 PERLDB_OPTS="NonStop frame=1 AutoTrace LineInfo=t/01_connect_2.99_02.dump_2" perl -d -I Mail-IMAPClient-2.99_02/lib t/01_connect Where is the lib 2.99_04 or the one you work on ? -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66

Message body is not shown because it is too large.

Message body is not shown because it is too large.

Subject: Re: [rt.cpan.org #9341] new lib 2.99_04
Date: Wed, 14 Nov 2007 09:49:30 +0100
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071113 15:29]: Show quoted text
> Queue: Mail-IMAPClient > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=9341 > > > Hello Mark, >
> > > Yes. it fails on: > > > sub connect > > > ...
> > > > Connect creates and sets the Socket in line 254.
> > It seems you don't use the same Mail-IMAPClient-2.99_02 I use, > since line 254 is : > $ cat -n Mail-IMAPClient-2.99_02/lib/Mail/IMAPClient.pm > ... > 252 > 253 sub login > 254 { my $self = shift; > 255 return $self->authenticate($self->Authmechanism, $self->Authcallback) > 256 if $self->{Authmechanism} && $self->{Authmechanism} ne 'LOGIN'; > 257
Ok, that's understandable: I have found the cause of our problems. I sent you a kind of unofficial pre-release of _02, which differs from the _02 final as found on CPAN. Quite a bit even: the diff is over 2000 lines. That might also be the reason that our output differs. One of the things you miss is a crucial $self->{Socket} = $sock; Have you tried any newer version already? We are up to _06 on the moment. http://search.cpan.org/~markov/Mail-IMAPClient-2.99_06/ Thanks for taking the time to help me get to the bottom of this. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #9341] new lib 2.99_07
Date: Fri, 16 Nov 2007 15:53:08 +0100
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Show quoted text
> Have you tried any newer version already? We are up to _06 on the > moment. http://search.cpan.org/~markov/Mail-IMAPClient-2.99_06/
I tried Mail-IMAPClient-2.99_07/ The connect works. I tried it with imapsync, 2.99_07 lacks Mail::IMAPClient::Ssl() 2.2.9 hadn't Ssl but I added it. -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66
Subject: Re: [rt.cpan.org #9341] new lib 2.99_07
Date: Sat, 17 Nov 2007 10:54:50 +0100
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <solutions [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071116 18:21]: Show quoted text
> Queue: Mail-IMAPClient > Ticket <URL: http://rt.cpan.org/Ticket/Display.html?id=9341 > > > Hello Mark, >
> > Have you tried any newer version already? We are up to _06 on the > > moment. http://search.cpan.org/~markov/Mail-IMAPClient-2.99_06/
> I tried Mail-IMAPClient-2.99_07/ > The connect works.
Pfffeeew... good, fixed that one ;-b Show quoted text
> I tried it with imapsync, 2.99_07 lacks Mail::IMAPClient::Ssl() > 2.2.9 hadn't Ssl but I added it.
Or did it work with AUTOLOAD? I removed a lot that that mess. Probably, the easiest way to use SSL, is the same ways as other people are doing: my $ssl = IO::Socket::SSL->new(...); my $imap = Mail::IMAPClient->new(RawSocket => $ssl); I also got reports from someone who tried to use your imapsync script: a few extra warnings are given because you write close $fh; Those should be rewritten into $fh->close; # or CORE::close($fh); I hope you find more errors in Mail::IMAPClient: I prefer to be able to fix errors, over having errors which I do not know of :-b -- MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
Subject: Re: [rt.cpan.org #9341] new lib 2.99_07
Date: Sun, 18 Nov 2007 04:06:46 +0100
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Show quoted text
> > I tried it with imapsync, 2.99_07 lacks Mail::IMAPClient::Ssl() > > 2.2.9 hadn't Ssl but I added it.
> Or did it work with AUTOLOAD?
May be. Show quoted text
> I removed a lot that that mess.
Good remove. I don't like heavy magic. Show quoted text
> Probably, the easiest way to use SSL, is the same ways as other > people are doing: > my $ssl = IO::Socket::SSL->new(...); > my $imap = Mail::IMAPClient->new(RawSocket => $ssl);
You're right, and that is already what imapsync is doing. I think I just have to remove useless Ssl calls. I've just checked that, it works with the old lib. Now I'm on the authenticate passage. imapsync authenticate2() from old lib doesn't work with the new one. For now I don't know why. Show quoted text
> I also got reports from someone who tried to use your imapsync > script: a few extra warnings are given because you write > close $fh; > Those should be rewritten into > $fh->close; # or
I saw that and fixed it. Show quoted text
> I hope you find more errors in Mail::IMAPClient: I prefer to be able > to fix errors, over having errors which I do not know of.
I will. To support the new Mail::IMAPClient I need to run imapsync with both old and new Mail::IMAPClient until the new one is available on every standard Unix distribution. -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66
Subject: Re: [rt.cpan.org #9341] new lib 2.99_07
Date: Sun, 18 Nov 2007 10:16:25 +0100
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071118 03:07]: Show quoted text
> > I hope you find more errors in Mail::IMAPClient: I prefer to be able > > to fix errors, over having errors which I do not know of.
> > I will. To support the new Mail::IMAPClient I need to run imapsync > with both old and new Mail::IMAPClient until the new one is > available on every standard Unix distribution.
It has many benefits to try to avoid the old code: your script will be much simpler... so smaller chance on bugs. So, if it was my package, I whould either - included Mail::IMAPClient newest version in your package - explain how people can upgrade their perl modules - start an imapsync 2.xxx sequence, and maintain 1.xxx for the old client when there are bugs. Distribution packagers may understand this move. Sorry that my changes cost you time. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
On Sun Nov 18 04:16:48 2007, Mark@Overmeer.net wrote: Show quoted text
> It has many benefits to try to avoid the old code: your script will > be much simpler... so smaller chance on bugs. So, if it was my > package, I whould either > - included Mail::IMAPClient newest version in your package > - explain how people can upgrade their perl modules > - start an imapsync 2.xxx sequence, and maintain 1.xxx for the > old client when there are bugs. Distribution packagers may > understand this move. > > Sorry that my changes cost you time.
Already decided what you will do? Fork or stick to the old code? Meanwhile, I have released the module as 3.00
Subject: Re: [rt.cpan.org #9341] fetch_hash BODY[HEADER] void because of a ) match force
Date: Sun, 30 Dec 2007 03:42:44 +0100
To: bug-Mail-IMAPClient [...] rt.cpan.org
From: Gilles LAMIRAL <gilles.lamiral [...] laposte.net>
Hello Mark, Sorry for the delay. Show quoted text
> Already decided what you will do? Fork or stick to the old code? > Meanwhile, I have released the module as 3.00
I'll do what I've said, no fork, stick to the working codes, old and new. I'm paid to maintain imapsync usage, not to break it :-) -- Au revoir, 02 99 64 31 77 06 20 79 76 06 Gilles Lamiral. France, Chavagne (35310) 09 52 27 33 66
Subject: Re: [rt.cpan.org #9341] fetch_hash BODY[HEADER] void because of a ) match force
Date: Sun, 30 Dec 2007 09:54:05 +0100
To: Gilles LAMIRAL via RT <bug-Mail-IMAPClient [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Gilles LAMIRAL via RT (bug-Mail-IMAPClient@rt.cpan.org) [071230 02:42]: Show quoted text
> > Already decided what you will do? Fork or stick to the old code? > > Meanwhile, I have released the module as 3.00
> > I'll do what I've said, no fork, > stick to the working codes, old and new.
ok. Please send bug-reports instead of implementing work-arounds. Show quoted text
> I'm paid to maintain imapsync usage, > not to break it :-)
hum... I'm not paid for this project. So you can fix my bugs? :-b -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
problem fixed in 3.04