Skip Menu |
 

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

Report information
The Basics
Id: 125334
Status: resolved
Priority: 0/
Queue: Net-IMAP-Simple

People
Owner: jettero [...] cpan.org
Requestors: kurt [...] otown.com
Cc:
AdminCc:

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



X-Source:
MIME-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
X-Source-Args:
X-Spam-Status: No, score=-1.12 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, HTML_MESSAGE=0.001, SPF_NEUTRAL=0.779] autolearn=no
X-Mailer: Apple Mail (2.3273)
X-Source-Dir:
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
Message-ID: <7410B8C9-B98A-42EB-9720-11B31D9D5147 [...] otown.com>
Content-Type: multipart/alternative; boundary="Apple-Mail=_16CCA303-2BC5-418F-9368-E4643A4B1B2A"
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Antiabuse: This header was added to track abuse, please include it with any abuse report
X-Antiabuse: Primary Hostname - winter.nocdirect.com
X-Antiabuse: Original Domain - rt.cpan.org
X-Antiabuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse: Sender Address Domain - otown.com
X-Spam-Score: -1.12
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 6D27224031A for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Thu, 17 May 2018 03:28:50 -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 c2jUyyqS-25R for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Thu, 17 May 2018 03:28:49 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id 636EA240310 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Thu, 17 May 2018 03:28:49 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id F258B1202E8 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Thu, 17 May 2018 00:28:47 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 81436120315 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Thu, 17 May 2018 00:28:45 -0700 (PDT)
Received: from winter.nocdirect.com (winter.nocdirect.com [69.73.182.126]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id D42AE11EC2D for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Thu, 17 May 2018 00:28:39 -0700 (PDT)
Received: from [99.10.250.30] (port=61194 helo=[192.168.1.5]) by winter.nocdirect.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from <kurt [...] otown.com>) id 1fJCJq-0005Kc-TL for bug-Net-IMAP-Simple [...] rt.cpan.org; Thu, 17 May 2018 02:23:18 -0400
Delivered-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
Subject: UID question/bug
Return-Path: <kurt [...] otown.com>
X-RT-Mail-Extension: net-imap-simple
X-Original-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
Disposition-Notification-To:
X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' HTML_50_70 0.1, HTML_NO_HTTP 0.1, FROM_NAME_ONE_WORD 0.05, MIME_LOWER_CASE 0.05, SUPERLONG_LINE 0.05, BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTH_SIZE_3000_MORE 0, BODYTEXTP_SIZE_3000_LESS 0, DATE_TZ_NA 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_CTA_URI_FOUND 0, NO_URI_FOUND 0, NO_URI_HTTPS 0, SPF_NEUTRAL 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __FORWARDED_MSG 0, __FRAUD_ANTIABUSE 0, __FRAUD_CONTACT_AGE 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HTML_TAG_DIV 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, __MSGID_APPLEMAIL 0, __SANE_MSGID 0, __TAG_EXISTS_HTML 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __USER_AGENT_APPLEMAIL 0, __X_MAILER_APPLEMAIL 0, __blackholes.mail-abuse.org_TIMEOUT , __zen.spamhaus.org_ERROR '
Date: Thu, 17 May 2018 02:23:16 -0400
X-Authenticated-Sender: winter.nocdirect.com: kurt [...] codewarriors.com
X-Spam-Level:
X-Greylist: delayed 3920 seconds by postgrey-1.34 at xx1.develooper.com; Thu, 17 May 2018 00:28:40 PDT
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2018.4.8.232716
X-Get-Message-Sender-Via: winter.nocdirect.com: authenticated_id: kurt [...] codewarriors.com
To: bug-Net-IMAP-Simple [...] rt.cpan.org
From: Kurt <kurt [...] otown.com>
X-RT-Interface: Email
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 1604
Download (untitled) / with headers
text/plain 1.5k
I modified the example as follows: Show quoted text
> for(my $i = 1; $i <= $nm; $i++){ > if($imap->seen($i)){ > print "*"; > } else { > print " "; > } > my $es = Email::Simple->new(join '', @{ $imap->top($i) } ); > print $es->header('Delivery-date'); > my $uid = $imap->uid("$i"); > print qq{\t$i:$uid\n}; > } > $imap->quit;
Gives the output: *Fri, 20 Oct 2017 23:12:49 -0400 1:1 *Sun, 05 Nov 2017 14:52:59 -0500 2:1 *Sun, 31 Dec 2017 17:28:18 -0500 3:1 *Sun, 31 Dec 2017 17:30:09 -0500 4:1 *Sat, 20 Jan 2018 19:42:42 -0500 5:1 *Sun, 21 Jan 2018 00:34:43 -0500 6:1 *Sun, 18 Feb 2018 00:17:27 -0500 7:1 *Sun, 18 Feb 2018 10:17:21 -0500 8:1 *Mon, 19 Mar 2018 06:00:12 -0400 9:1 *Mon, 26 Mar 2018 11:59:26 -0400 10:1 *Mon, 26 Mar 2018 11:59:32 -0400 11:1 *Thu, 05 Apr 2018 11:59:27 -0400 12:1 *Fri, 06 Apr 2018 11:59:41 -0400 13:1 Not clear why the UID is always 1? Is the UID DERIVED from the message? Or simply assigned during a session? Basically, I’m deleting emails based on age, but since I don’t know how the order of messages is determined (age? size? randomly?) does deleting one change the positions of others in the sequence? It appears that deleting a message only marks a message for deletion, and that the actual deletion only takes place at the END of the session, and that the sequence of messages doesn’t change in between (unless “expunged”?) and that such automatically happens at the end of a session (and if that’s all true, then maybe I don’t even need the UID) - but I’m not sure. Any help would be appreciated. Thanks. Kurt
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 4902
MIME-Version: 1.0
In-Reply-To: <7410B8C9-B98A-42EB-9720-11B31D9D5147 [...] otown.com>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <7410B8C9-B98A-42EB-9720-11B31D9D5147 [...] otown.com>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-31951-1526572645-594.125334-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: 513
Download (untitled) / with headers
text/plain 513b
On Thu May 17 03:28:51 2018, Kurta wrote: Show quoted text
> my $uid = $imap->uid("$i");
The docs indicate this should work, but it really can't. under uid() is a uidsearch, and under that is a search, and that always returns a list or the size of the list in scalar context. If you used my ($uid) = $imap->uid("$i"); you'd be all set. I'll have to fix the docs to reflect this as there's no practical way to fix search so that it returns the first uid match and a one off fix to the uid sub feels like it doesn't make sense.
X-Source:
MIME-Version: 1.0 (Mac OS X Mail 10.3 \(3273\))
X-Spam-Status: No, score=-3.12 tagged_above=-99.9 required=10 tests=[AWL=2.000, BAYES_00=-1.9, FROM_OUR_RT=-4, HTML_MESSAGE=0.001, SPF_NEUTRAL=0.779] autolearn=ham
In-Reply-To: <rt-4.0.18-31951-1526572645-955.125334-6-0 [...] rt.cpan.org>
X-Source-Args:
X-Mailer: Apple Mail (2.3273)
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-Source-Dir:
X-Spam-Flag: NO
X-RT-Interface: API
References: <RT-Ticket-125334 [...] rt.cpan.org> <7410B8C9-B98A-42EB-9720-11B31D9D5147 [...] otown.com> <rt-4.0.18-31951-1526572645-955.125334-6-0 [...] rt.cpan.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
Content-Type: multipart/alternative; boundary="Apple-Mail=_E6603965-6113-4BCD-A91F-0D5F89CC58B7"
Message-ID: <E301851C-4A18-4D62-A28C-CB7BED8D685B [...] otown.com>
X-Antiabuse: This header was added to track abuse, please include it with any abuse report
X-Antiabuse: Primary Hostname - winter.nocdirect.com
X-Antiabuse: Original Domain - rt.cpan.org
X-Antiabuse: Originator/Caller UID/GID - [47 12] / [47 12]
X-Antiabuse: Sender Address Domain - otown.com
X-Spam-Score: -3.12
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id 83B5524031C for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Thu, 17 May 2018 21:47:23 -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 TtaY9yYCRSMZ for <cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com>; Thu, 17 May 2018 21:47:21 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id DFEA124028D for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Thu, 17 May 2018 21:47:20 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 2088B11EDBB for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Thu, 17 May 2018 18:47:20 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id E439811FB6D for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Thu, 17 May 2018 18:47:17 -0700 (PDT)
Received: from winter.nocdirect.com (winter.nocdirect.com [69.73.182.126]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id 42E3E11EDBB for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Thu, 17 May 2018 18:47:10 -0700 (PDT)
Received: from [99.10.250.30] (port=52152 helo=[192.168.1.5]) by winter.nocdirect.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from <kurt [...] otown.com>) id 1fJUUA-0008A7-2F for bug-Net-IMAP-Simple [...] rt.cpan.org; Thu, 17 May 2018 21:47:10 -0400
Delivered-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
Subject: Re: [rt.cpan.org #125334] UID question/bug
Return-Path: <kurt [...] otown.com>
X-Original-To: cpan-bug+Net-IMAP-Simple [...] hipster.bestpractical.com
X-RT-Mail-Extension: net-imap-simple
Disposition-Notification-To:
Date: Thu, 17 May 2018 21:47:08 -0400
X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' HTML_70_90 0.1, HTML_NO_HTTP 0.1, FROM_NAME_ONE_WORD 0.05, MIME_LOWER_CASE 0.05, BODYTEXTH_SIZE_10000_LESS 0, BODYTEXTP_SIZE_3000_LESS 0, BODYTEXTP_SIZE_400_LESS 0, BODY_SIZE_1700_1799 0, BODY_SIZE_2000_LESS 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, NO_URI_HTTPS 0, REFERENCES 0, SPF_NEUTRAL 0, __ANY_URI 0, __BOUNCE_CHALLENGE_SUBJ 0, __BOUNCE_NDR_SUBJ_EXEMPT 0, __CT 0, __CTYPE_HAS_BOUNDARY 0, __CTYPE_MULTIPART 0, __CTYPE_MULTIPART_ALT 0, __DQ_NEG_HEUR 0, __DQ_NEG_IP 0, __FRAUD_ANTIABUSE 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __HAS_FROM 0, __HAS_HTML 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HTML_AHREF_TAG 0, __HTML_TAG_DIV 0, __IN_REP_TO 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, __MSGID_APPLEMAIL 0, __REFERENCES 0, __SANE_MSGID 0, __SUBJ_ALPHA_NEGATE 0, __SUBJ_REPLY 0, __TAG_EXISTS_HTML 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS , __URI_WITHOUT_PATH 0, __USER_AGENT_APPLEMAIL 0, __X_MAILER_APPLEMAIL 0, __blackholes.mail-abuse.org_TIMEOUT , __zen.spamhaus.org_ERROR '
X-Authenticated-Sender: winter.nocdirect.com: kurt [...] codewarriors.com
X-Spam-Level:
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2018.5.18.13916
X-Get-Message-Sender-Via: winter.nocdirect.com: authenticated_id: kurt [...] codewarriors.com
To: bug-Net-IMAP-Simple [...] rt.cpan.org
From: Kurt <kurt [...] otown.com>
RT-Message-ID: <rt-4.0.18-11778-1526608044-173.125334-0-0 [...] rt.cpan.org>
Content-Length: 0
content-type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 205
Download (untitled) / with headers
text/plain 205b
Show quoted text
> On May 17, 2018, at 11:57, Paul Miller via RT <bug-Net-IMAP-Simple@rt.cpan.org> wrote: > > If you used my ($uid) = $imap->uid("$i"); you'd be all set.
Ah-HA! That does it! Thanks for the help. Kurt
content-type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable
X-RT-Original-Encoding: utf-8
Content-Length: 1101


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.