Skip Menu |
 

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

Report information
The Basics
Id: 125883
Status: open
Priority: 0/
Queue: Net-IMAP-Simple

People
Owner: Nobody in particular
Requestors: cpan [...] parparov.com
Cc:
AdminCc:

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



MIME-Version: 1.0
X-Spam-Status: No, score=-1.233 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, SPF_SOFTFAIL=0.665] autolearn=no
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
Content-Language: en-US
Content-Type: multipart/alternative; boundary="------------8AB2099E80DD5702A4878E81"
Message-ID: <b66d1d20-2922-79d0-beba-6484d3c287b3 [...] parparov.com>
Reply-To: roman [...] parparov.com
X-Received: by 2002:a24:684d:: with SMTP id v74-v6mr3324144itb.88.1531943691281; Wed, 18 Jul 2018 12:54:51 -0700 (PDT)
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -1.233
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 309E3240265 for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Wed, 18 Jul 2018 15:55:02 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gUZ-meCtEyPo for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Wed, 18 Jul 2018 15:55:01 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id A1AF12400C8 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Wed, 18 Jul 2018 15:55:00 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 7E84811FDAB for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Wed, 18 Jul 2018 12:54:59 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 9AA60121468 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Wed, 18 Jul 2018 12:54:57 -0700 (PDT)
Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id 4BE4111FDAB for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Wed, 18 Jul 2018 12:54:52 -0700 (PDT)
Received: by mail-it0-f51.google.com with SMTP id h2-v6so5891858itj.1 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Wed, 18 Jul 2018 12:54:52 -0700 (PDT)
Received: from rparparov-m01.vmware.com (c-73-223-22-122.hsd1.ca.comcast.net. [73.223.22.122]) by smtp.gmail.com with ESMTPSA id q1-v6sm2086417iod.16.2018.07.18.12.54.49 for <bug-Net-IMAP-Simple [...] rt.cpan.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 18 Jul 2018 12:54:50 -0700 (PDT)
X-Google-SMTP-Source: AAOMgpcCOuK6/0JD17QgncBm7xfjzvBBwx4S0IDSe+OmpVUYbOQtEZM9qhkC/cl9RcrTpKqiWnkVfw==
Delivered-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
Subject: _cmd_ok bug - not handling a case happening with Outlook365 IMAP
Return-Path: <rparparov [...] gmail.com>
X-RT-Mail-Extension: net-imap-simple
X-Original-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:reply-to:from:subject:message-id:date :user-agent:mime-version:content-language; bh=f8aPmS5lcyC78lAupvpURtMMed5at4nJGGTsEqnVwIc=; b=VAD5GinQvZqUNlO+WSMRy6+nhDhpHsKfiIH9rXZNA0bK/v45y5u/9tEhWrtO6n0i0y Wsj9qrOkFPZo+LeX5hjATtohBKHVdZOBPbgKlrxik4EGj5DtwRR3pIJFgryYovxxtW8h fKH3V7SIXbFiaarg4ep1RZJ005Bukep7Qm6N8CGEyOzgMDkmu8oYbyRaTM1RXG355Th1 ZJocfZ+1B/F07WuX+jqbI81V69xPbp8oUsK3yHAforGIfn9PmEMzPJpzUkKA8yLaQpeE pGRZg/4NnD4a72w1QXaj2ts5XzlCDx1znGPCtkuj4rWh6h1+NxDFlnPF0A8xT5N3rN90 S0hw==
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_NO_HTTP 0.1, BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_3000_3999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, NO_CTA_URI_FOUND 0, NO_URI_FOUND 0, NO_URI_HTTPS 0, REPLYTO_SAMEAS_FROM 0, SPF_PASS 0, WEBMAIL_SOURCE 0, __BAT_BOUNDARY 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FUR_RDNS_GMAIL 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HAS_REPLYTO 0, __HELO_GMAIL 0, __HIGHBITS 0, __HTML_FONT_RED 0, __MIME_HTML 0, __MIME_TEXT_H 0, __MIME_TEXT_H1 0, __MIME_TEXT_H2 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_TEXT_P2 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __OEM_PRICE 0, __PHISH_SPEAR_SUBJ_SUBJECT 0, __RDNS_WEBMAIL 0, __REPLYTO_SAMEAS_FROM_ACC 0, __REPLYTO_SAMEAS_FROM_ADDY 0, __REPLYTO_SAMEAS_FROM_DOMAIN 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0, __SUBJ_ALPHA_END 0, __TAG_EXISTS_HTML 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __USER_AGENT 0, __YOUTUBE_RCVD 0, __blackholes.mail-abuse.org_TIMEOUT , __zen.spamhaus.org_ERROR '
Date: Wed, 18 Jul 2018 12:54:48 -0700
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2018.7.18.194516
To: bug-Net-IMAP-Simple [...] rt.cpan.org
From: Roman Parparov <roman [...] parparov.com>
X-GM-Message-State: AOUpUlE+mGv4cmuRg6+X/Wb5oagQJsNEc+GQMxiBySVktQvVrT5S1Lni PY0vaqHJx9vpUW3HCZm/bdj25rl3
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"; format="flowed"
Content-Transfer-Encoding: 8bit
X-RT-Original-Encoding: utf-8
Content-Length: 1285
Download (untitled) / with headers
text/plain 1.2k
Hi guys, Great work, but in the version 1.2209 (and as I checked, in 1.2212) there is a problem handling out in _cmd_ok (line 1182 in 1.2209): sub _cmd_ok {     my ( $self, $res ) = @_;     my $id = $self->_count;     $self->_debug( caller, __LINE__, '_cmd_ok', $res ) if $self->{debug};     if ( $res =~ /^$id\s+OK/i ) {         return 1;     } elsif ( $res =~ /^$id\s+(?:NO|BAD)(?:\s+(.+))?/i ) {         $self->_seterrstr( $1 || 'unknown error' );         return 0;     } elsif ( $res =~ m/^\*\s+/ ) {     }else {         $self->_seterrstr("warning unknown return string (id=$id): $res");     }     return; } Unfortunately, Outlook365 IMAP implementation has been noticed to arbitrarily close the connection sending: [...re/perl5/Net/IMAP/Simple.pm line 1126 in sub _process_cmd] * BYE Connection is closed. 13\r\n [...re/perl5/Net/IMAP/Simple.pm line 1277 in sub _cmd_ok] * BYE Connection is closed. 13\r\n which are thus unparsed and not taken care of. After that you can continue to pump commands into IMAP pipeline and after about a fifty such commands the script will die without a reason. I don't know what the patch should be, but at least some _seterrstr should be called. Thanks, Roman.
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: 8bit
X-RT-Original-Encoding: utf-8
Content-Length: 2160
MIME-Version: 1.0
In-Reply-To: <b66d1d20-2922-79d0-beba-6484d3c287b3 [...] parparov.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <b66d1d20-2922-79d0-beba-6484d3c287b3 [...] parparov.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-1293-1533909793-685.125883-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Encrypt: 0
X-RT-Sign: 0
Content-Length: 1757
Download (untitled) / with headers
text/plain 1.7k
Hrm. I'm not sure what can be done about that. I'm thinking about it. Since you've had time to think about it... have you had any ideas? BTW, sorry for the late reply. I didn't notice this in a timely fashion. On Wed Jul 18 15:55:03 2018, ROMM wrote: Show quoted text
> Hi guys, > > Great work, but in the version 1.2209 (and as I checked, in 1.2212) > there is a problem handling out in _cmd_ok (line 1182 in 1.2209): > > sub _cmd_ok { >     my ( $self, $res ) = @_; >     my $id = $self->_count; > >     $self->_debug( caller, __LINE__, '_cmd_ok', $res ) if $self->{debug}; > >     if ( $res =~ /^$id\s+OK/i ) { >         return 1; > >     } elsif ( $res =~ /^$id\s+(?:NO|BAD)(?:\s+(.+))?/i ) { >         $self->_seterrstr( $1 || 'unknown error' ); >         return 0; > >     } elsif ( $res =~ m/^\*\s+/ ) { > >     }else { >         $self->_seterrstr("warning unknown return string (id=$id): $res"); >     } > >     return; > } > > Unfortunately, Outlook365 IMAP implementation has been noticed to > arbitrarily close the connection sending: > [...re/perl5/Net/IMAP/Simple.pm line 1126 in sub _process_cmd] * BYE > Connection is closed. 13\r\n > [...re/perl5/Net/IMAP/Simple.pm line 1277 in sub _cmd_ok] * BYE > Connection is closed. 13\r\n > which are thus unparsed and not taken care of. After that you can > continue to pump commands into IMAP pipeline and after about a fifty > such commands the script will die without a reason. > > I don't know what the patch should be, but at least some _seterrstr > should be called. > > Thanks, > Roman.
-- If riding in an airplane is flying, then riding in a boat is swimming. 116 jumps, 48.6 minutes of freefall, 92.9 freefall miles.
MIME-Version: 1.0
X-Cpan.org: This message routed through the cpan.org mail forwarding service. Please use PAUSE pause.perl.org to configure your delivery settings.
X-Spam-Flag: NO
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
content-type: text/plain; charset="utf-8"; format="flowed"
X-RT-Original-Encoding: utf-8
X-Spam-Score: -3.234
X-Google-SMTP-Source: AA+uWPxW6zy2/3q7e7qt3XTVYZo6dIaMZvHrdX05Kj0al2BsGTPnH4wf3g7lhjPZGxypS9I9SyM70Q==
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id E3CEE24016D for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Sat, 11 Aug 2018 18:51:44 -0400 (EDT)
Received: from hipster.bestpractical.com ([127.0.0.1]) by localhost (hipster.bestpractical.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nVyZ1uOH3x7s for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Sat, 11 Aug 2018 18:51:42 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id 1F685240096 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sat, 11 Aug 2018 18:51:41 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id AE57F120BE0 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sat, 11 Aug 2018 15:51:40 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id AF1A5120C2A for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sat, 11 Aug 2018 15:51:37 -0700 (PDT)
Received: from mail-pf1-f182.google.com (mail-pf1-f182.google.com [209.85.210.182]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id 40DB0120BE0 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sat, 11 Aug 2018 15:51:27 -0700 (PDT)
Received: by mail-pf1-f182.google.com with SMTP id p12-v6so6071477pfh.2 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sat, 11 Aug 2018 15:51:27 -0700 (PDT)
Received: from rparparov-a01.vmware.com (c-73-223-22-122.hsd1.ca.comcast.net. [73.223.22.122]) by smtp.gmail.com with ESMTPSA id 1-v6sm31628177pfk.134.2018.08.11.15.51.25 for <bug-Net-IMAP-Simple [...] rt.cpan.org> (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 11 Aug 2018 15:51:25 -0700 (PDT)
Delivered-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #125883] _cmd_ok bug - not handling a case happening with Outlook365 IMAP
X-Google-Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:reply-to:subject:to:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=Q8y6kIyr9i3AZIiTQYSgpsq+lyz4Jzzx8Epm3aZX3l4=; b=aHSu+anSBrjDbiYgLKv+vqgQu2XTN5iVUiAJw3OMeosG6SbVX2Lz+TrrNpNdKOnu9G zthorx/gW2mJJdPwdNnEldGDadoT/agbA0cbDmI2TuZk25sf3OS1cP8vIDkH3wSZ5kOK mDhzKLz76Y5hu9W3Jw3nCWwAA4/QE25NEfX2L+0qvLhAGdyWJJK80U2qpenBmTJZxv5s 2rqiA675GmYD2UStmXJrzO9NDWVLRFm/m3WET2FHyD8JJ75aSOiZUdEetrpuzzia7Tbc VUpiIMF3+4BpIFs1SAlVFdxgbL/TsmdROpoSskh33qc2UsNLES2CqLu+kTqSzR/wm3LD 88tQ==
Date: Sat, 11 Aug 2018 15:51:24 -0700
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODY_SIZE_4000_4999 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, IN_REP_TO 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, REFERENCES 0, REPLYTO_SAMEAS_FROM 0, SINGLE_URI_IN_BODY 0, SPF_PASS 0, URI_ENDS_IN_HTML 0, URI_WITH_PATH_ONLY 0, WEBMAIL_SOURCE 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FORWARDED_MSG 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FUR_RDNS_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_REPLYTO 0, __HELO_GMAIL 0, __HIGHBITS 0, __HTTPS_URI 0, __IN_REP_TO 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __MOZILLA_USER_AGENT 0, __NO_HTML_TAG_RAW 0, __OEM_PRICE 0, __PHISH_SPEAR_SUBJ_SUBJECT 0, __RDNS_WEBMAIL 0, __REFERENCES 0, __REPLYTO_SAMEAS_FROM_ACC 0, __REPLYTO_SAMEAS_FROM_ADDY 0, __REPLYTO_SAMEAS_FROM_DOMAIN 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 0, __STOCK_PHRASE_7 0, __SUBJ_ALPHA_END 0, __SUBJ_ALPHA_NEGATE 0, __SUBJ_REPLY 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_IN_BODY 0, __URI_NOT_IMG 0, __URI_NO_MAILTO 0, __URI_NO_WWW 0, __URI_NS , __URI_WITH_PATH 0, __USER_AGENT 0, __YOUTUBE_RCVD 0, __blackholes.mail-abuse.org_TIMEOUT , __zen.spamhaus.org_ERROR '
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2018.8.11.223917
To: bug-Net-IMAP-Simple [...] rt.cpan.org
Content-Transfer-Encoding: 8bit
X-GM-Message-State: AOUpUlEFp8Gw6FVqZjqoj3DZ2nePfcDxYA+hvgp8cpeUtl1uWSxVbn/2 7waYsdB7QYd72d/E+hkuDRlZ5Le3
In-Reply-To: <rt-4.0.18-1293-1533909793-228.125883-6-0 [...] rt.cpan.org>
X-Spam-Status: No, score=-3.234 tagged_above=-99.9 required=10 tests=[AWL=2.000, BAYES_00=-1.9, FREEMAIL_FROM=0.001, FROM_OUR_RT=-4, SPF_SOFTFAIL=0.665] autolearn=ham
X-RT-Interface: API
Content-Language: en-US
References: <RT-Ticket-125883 [...] rt.cpan.org> <b66d1d20-2922-79d0-beba-6484d3c287b3 [...] parparov.com> <rt-4.0.18-1293-1533909793-228.125883-6-0 [...] rt.cpan.org>
Message-ID: <0a7392af-a9bd-c0ac-1d55-0e5500704e78 [...] parparov.com>
Reply-To: roman [...] parparov.com
X-Received: by 2002:a62:4808:: with SMTP id v8-v6mr12861845pfa.89.1534027886340; Sat, 11 Aug 2018 15:51:26 -0700 (PDT)
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
Return-Path: <rparparov [...] gmail.com>
X-RT-Mail-Extension: net-imap-simple
X-Original-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
From: Roman Parparov <roman [...] parparov.com>
RT-Message-ID: <rt-4.0.18-2972-1534027905-1834.125883-0-0 [...] rt.cpan.org>
Content-Length: 4463
Download (untitled) / with headers
text/plain 4.3k
Hi Paul, So actually I think the * BYE or * qr/.*backoff.*/i or something may need to be tested for. The problem is that at least in my case (I am working with MAPI, Office365 IMAP server) the server uses this response either to inform that the sock has been shut down, or that the client is throttled and needs to back off. What currently happens is that Net::IMAP::Simple is unaware that the sock it wants to print to has been shut down, tries to print something into it, and perl quietly(!) SIGPIPES and exits, not dies, but just exits with SIGPIPE errno. Right now I built a wrapper of sorts (sorry, I can't share more at this point): readline_callback => sub {       push(@{$self->{imap_responses}}, $_[0])       if $_[0] =~ /^(\d+|\*) /i; } sub errstr ($) {         my $self = shift;         my $errstr = $Net::IMAP::Simple::errstr                 || $self->{imap_responses}[-1]                 || 'Unknown error';         $errstr; } sub handle_failure ($$) {         my $self = shift;         my $cmd  = shift;         my $args = shift;         $self->log_it("$cmd $args failed: " . $self->errstr);         if ($self->errstr =~ /backoff.* (\d+) millise/i) {                 my $tosleep = ($1+100000)*1000;                 $self->log_it("Throttling encountered, backing off");                 my $sock = $self->{imap}->_sock();                 $self->disconnect();                 $sock = undef;                 usleep $tosleep;         }         else {                 sleep $self->{config}{command_failure_sleep};         } } sub disconnect ($) {         my $self = shift;         if ($self->{imap} && $self->{imap}->_sock && $self->{imap}->_sock->connected) { $self->{imap}->_sock->shutdown(2);                 sleep 1;         } } sub get_status ($) {         my $self = shift;         $self->{imap_responses}                 && @{$self->{imap_responses}}                 && $self->{imap_responses}[-1] =~ /^$self->{imap}{count} OK / } And when I execute a command, I test:                 if (! $sock || ! $sock->connected) {                         $imap = $self->reconnect($type, $retries+1);                         unshift(@commands, 'login') unless $command eq 'login';                 } Thanks for your time and effort, R. On 8/10/18 7:03 AM, Paul Miller via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=125883 > > > Hrm. I'm not sure what can be done about that. I'm thinking about it. Since you've had time to think about it... have you had any ideas? > > BTW, sorry for the late reply. I didn't notice this in a timely fashion. > > On Wed Jul 18 15:55:03 2018, ROMM wrote:
>> Hi guys, >> >> Great work, but in the version 1.2209 (and as I checked, in 1.2212) >> there is a problem handling out in _cmd_ok (line 1182 in 1.2209): >> >> sub _cmd_ok { >>     my ( $self, $res ) = @_; >>     my $id = $self->_count; >> >>     $self->_debug( caller, __LINE__, '_cmd_ok', $res ) if $self->{debug}; >> >>     if ( $res =~ /^$id\s+OK/i ) { >>         return 1; >> >>     } elsif ( $res =~ /^$id\s+(?:NO|BAD)(?:\s+(.+))?/i ) { >>         $self->_seterrstr( $1 || 'unknown error' ); >>         return 0; >> >>     } elsif ( $res =~ m/^\*\s+/ ) { >> >>     }else { >>         $self->_seterrstr("warning unknown return string (id=$id): $res"); >>     } >> >>     return; >> } >> >> Unfortunately, Outlook365 IMAP implementation has been noticed to >> arbitrarily close the connection sending: >> [...re/perl5/Net/IMAP/Simple.pm line 1126 in sub _process_cmd] * BYE >> Connection is closed. 13\r\n >> [...re/perl5/Net/IMAP/Simple.pm line 1277 in sub _cmd_ok] * BYE >> Connection is closed. 13\r\n >> which are thus unparsed and not taken care of. After that you can >> continue to pump commands into IMAP pipeline and after about a fifty >> such commands the script will die without a reason. >> >> I don't know what the patch should be, but at least some _seterrstr >> should be called. >> >> Thanks, >> Roman.
>


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.