Skip Menu |
 

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

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

People
Owner: Nobody in particular
Requestors: moritz [...] bunkus.org
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.999 tagged_above=-99.9 required=10 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, SPF_FAIL=0.001] 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-type: text/plain; charset="utf-8"
Message-ID: <87r2wx7m3s.fsf [...] bunkus.org>
X-Virus-Scanned: Debian amavisd-new at bestpractical.com
X-Spam-Score: -1.999
Received: from localhost (localhost [127.0.0.1]) by hipster.bestpractical.com (Postfix) with ESMTP id DA5B824011F for <cpan-bug+net-imap-simple [...] hipster.bestpractical.com>; Sun, 30 Jul 2017 15:40:31 -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 2HeFUlln6Qdz for <cpan-bug+net-imap-simple [...] hipster.bestpractical.com>; Sun, 30 Jul 2017 15:40:30 -0400 (EDT)
Received: from xx1.develooper.com (xx1.develooper.com [207.171.7.115]) by hipster.bestpractical.com (Postfix) with ESMTPS id 090D3240039 for <bug-net-imap-simple [...] rt.cpan.org>; Sun, 30 Jul 2017 15:40:29 -0400 (EDT)
Received: from localhost (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with ESMTP id 36DAF11DE6B for <bug-net-imap-simple [...] rt.cpan.org>; Sun, 30 Jul 2017 12:40:29 -0700 (PDT)
Received: from xx1.develooper.com (xx1.develooper.com [127.0.0.1]) by localhost (Postfix) with SMTP id 18DBD11DA25 for <bug-net-imap-simple [...] rt.cpan.org>; Sun, 30 Jul 2017 12:40:25 -0700 (PDT)
Received: from adara.bunkus.org (adara.bunkus.org [144.76.6.84]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by xx1.develooper.com (Postfix) with ESMTPS id 6305811D87D for <bug-net-imap-simple [...] rt.cpan.org>; Sun, 30 Jul 2017 12:40:01 -0700 (PDT)
Received: from liselle.bunkus.org ([2a01:4f8:190:8147::105:1]:33530) by adara.bunkus.org with esmtps (TLSv1.2:DHE-RSA-AES256-GCM-SHA384:256) (Exim 4.82_1-5b7a7c0-XX) (envelope-from <moritz [...] bunkus.org>) id 1dbu1K-0005GJ-18 for bug-Net-IMAP-Simple [...] rt.cpan.org; Sun, 30 Jul 2017 21:36:59 +0200
Received: from sweet-chili.local (unknown [192.168.191.4]) by liselle.bunkus.org (Postfix) with ESMTPS id 679EF6541E5B for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sun, 30 Jul 2017 21:36:56 +0200 (CEST)
Received: from sweet-chili (localhost [IPv6:::1]) by sweet-chili.local (Postfix) with ESMTPS id 4BD691C0C204 for <bug-Net-IMAP-Simple [...] rt.cpan.org>; Sun, 30 Jul 2017 21:36:55 +0200 (CEST)
Authentication-Results: hipster.bestpractical.com (amavisd-new); dkim=pass header.i= [...] bunkus.org
Delivered-To: cpan-bug+net-imap-simple [...] hipster.bestpractical.com
X-CTCH-Refid: str=0001.0A0B0207.597E355B.0027,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0
Subject: IPv6 with SSL works fine with IO::Socket::SSL
User-Agent: mu4e 0.9.18; emacs 25.2.1
Return-Path: <moritz [...] bunkus.org>
X-RT-Mail-Extension: net-imap-simple
X-Original-To: cpan-bug+net-imap-simple [...] hipster.bestpractical.com
Dkim-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=bunkus.org; s=mail2017070101; t=1501443416; bh=ZE68YdgWfH4nzL0gLHw5CPqE0bPdn/Cxy+zJkm8x+ig=; h=From:To:Subject:Date:From; b=eXn9TeMf88Or7QMoi+h8PLhpDfukuEecbipBSOKWTiKzW9zzMwHixefvx47iwHVah u66u9tlfvq8nk15yh7ZdDKEXLsIhdIar/CUyM5KG3gYcBvsKGV23dpYWQZrVqj9Lfn iMdNMaAvUPUbl/k5s3BYL0z25qJ02puZqTfIXB4NxLz0lv8DNY6Drkii0DZSgDeHXq mMJZQR+SSYE/QJORkv1sJcUNUZdLT1lUG8F6Xe1PDaOeNPLNtjc0tbTWLm4RdF51nw wr964wEulct8kUTylg7ui/pCLu8q8pnOKo+vHxDgWbsHKk2TryeiczRcRnxHIzVMb3 rqW69xhIOKINfqymYgvXTgxdOnLHyG+/4jMGZ+D0tu4zl4EALvc9nN7v4YiSJKMsMw KeaYduaVhqgWNcPmWKHDO5UDgYlxjmaUcu5UQMY5D6+aTdIl9ubiiWcu/gy0t+SmU2 gt9KY1ck28R5uA9avGK4VX6ZRQ2ABdfBnWHjaEdJ0rELs61gVZ3zmd8U/kGIi3rFAR z27M5nXWghc2vJ1ZjM6KPLpJmSxjh5X0i+43nPWjLosn4D2LE3W/R5jrMoMgdF0jIw qn0S2NjZ5B5Es3W69UherZs8xTrcwCpY0Z53OAXkBDTYE+iT165Fr1y4Yqqso3gr6Z 5gWlfy5guITMaGO+3FtiKsdQ=
X-PMX-Spam: Gauge=IIIIIIII, Probability=8%, Report=' HTML_00_01 0.05, HTML_00_10 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1600_1699 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DKIM_SIGNATURE 0, LEGITIMATE_SIGNS 0, MSG_THREAD 0, NO_URI_HTTPS 0, SINGLE_URI_IN_BODY 0, SPF_PASS 0, URI_WITH_PATH_ONLY 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FORWARDED_MSG 0, __FRAUD_MONEY 0, __FRAUD_MONEY_CURRENCY 0, __FRAUD_MONEY_CURRENCY_DOLLAR 0, __FRAUD_MONEY_DENOMINATION 0, __FRAUD_MONEY_VALUE 0, __HAS_FROM 0, __HAS_MSGID 0, __MIME_TEXT_ONLY 0, __MIME_TEXT_P 0, __MIME_TEXT_P1 0, __MIME_VERSION 0, __NO_HTML_TAG_RAW 0, __SANE_MSGID 0, __SINGLE_URI_TEXT 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, __zen.spamhaus.org_ERROR '
Date: Sun, 30 Jul 2017 21:36:55 +0200
X-Spam-Level:
X-Greylist: delayed 166 seconds by postgrey-1.34 at xx1.develooper.com; Sun, 30 Jul 2017 12:40:02 PDT
X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2017.7.30.193016
To: bug-Net-IMAP-Simple [...] rt.cpan.org
From: Moritz Bunkus <moritz [...] bunkus.org>
X-RT-Original-Encoding: ascii
X-RT-Interface: Email
Content-Length: 1639
Download (untitled) / with headers
text/plain 1.6k
Hey, if both "use_ssl" and "use_ipv6" is set, Net::IMAP::Simple carps with an error message that the combination is not supported. However, it does work very well with small modifications to the source. Please remove that error and apply the changes I'll describe below. Reading current IO::Socket::SSL documentation[1] states the following: Show quoted text
> * If IO::Socket::IP with at least version 0.20 is installed it will > use this module as super class, transparently providing IPv6 and > IPv4 support. > * If IO::Socket::INET6 is installed it will use this module as super > class, transparently providing IPv6 and IPv4 support.
Therefore I've redefined Net::IMAP::Simple::_sock_from to test for "use_ssl" first like this (one line, wrapped only for email): sub _sock_from { return $_[0]->{use_ssl} ? 'IO::Socket::SSL' : $_[0]->{use_v6} ? 'IO::Socket::INET6' : 'IO::Socket::INET' } Using the following code works just fine afterwards: ------------------------------------------------------------ my $imap = Net::IMAP::Simple->new( 'the-hostname', port => 993, use_v6 => 1, use_ssl => 1, shutup_about_v6ssl => 1, ); $imap->login('the-user', 'secret'); print join("\n", sort({ $a cmp $b } $imap->mailboxes_subscribed)), "\n"; $imap->quit; ------------------------------------------------------------ So please: a) remove the test for "use_v6 && use_ssl" with the following "carp" in "new" and b) change "_sock_from" as I've shown above. Thanks! Kind regards, mosu [1] http://search.cpan.org/~sullr/IO-Socket-SSL-2.049/lib/IO/Socket/SSL.pod
MIME-Version: 1.0
In-Reply-To: <87r2wx7m3s.fsf [...] bunkus.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: API
References: <87r2wx7m3s.fsf [...] bunkus.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-24291-1501637131-1152.0-0-0 [...] rt.cpan.org>
Message-ID: <rt-4.0.18-24291-1501637131-1136.122653-0-0 [...] rt.cpan.org>
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
From: tlhackque [...] yahoo.com
Content-Length: 286
Download (untitled) / with headers
text/plain 286b
+1 for IPv6 support. However, I suggest IO::Socket::IP, as it will handle IPv4 & IPv6 - automatically selecting the address from those in DNS. use_ipv6 can be used to force IPv6; I suggest 0 = IPv4 only, 1 = IPv6 only and undef = auto. This should be compatible with current usage.
MIME-Version: 1.0
In-Reply-To: <87r2wx7m3s.fsf [...] bunkus.org>
X-Mailer: MIME-tools 5.504 (Entity 5.504)
Content-Disposition: inline
X-RT-Interface: Web
References: <87r2wx7m3s.fsf [...] bunkus.org>
Content-Type: text/plain; charset="utf-8"
Message-ID: <rt-4.0.18-25635-1502390034-1313.122653-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: 2110
These seem like relatively simple changes. I'll +1 that too. Shoot me a PR here if you're completely tired of waiting for me. https://github.com/jettero/net--imap--simple On Sun Jul 30 15:40:33 2017, moritz@bunkus.org wrote: Show quoted text
> Hey, > > if both "use_ssl" and "use_ipv6" is set, Net::IMAP::Simple carps with an > error message that the combination is not supported. However, it does > work very well with small modifications to the source. Please remove > that error and apply the changes I'll describe below. > > Reading current IO::Socket::SSL documentation[1] states the following: >
> > * If IO::Socket::IP with at least version 0.20 is installed it will > > use this module as super class, transparently providing IPv6 and > > IPv4 support. > > * If IO::Socket::INET6 is installed it will use this module as super > > class, transparently providing IPv6 and IPv4 support.
> > Therefore I've redefined Net::IMAP::Simple::_sock_from to test for > "use_ssl" first like this (one line, wrapped only for email): > > sub _sock_from { > return $_[0]->{use_ssl} ? 'IO::Socket::SSL' > : $_[0]->{use_v6} ? 'IO::Socket::INET6' > : 'IO::Socket::INET' > } > > Using the following code works just fine afterwards: > > ------------------------------------------------------------ > my $imap = Net::IMAP::Simple->new( > 'the-hostname', > port => 993, > use_v6 => 1, > use_ssl => 1, > shutup_about_v6ssl => 1, > ); > > $imap->login('the-user', 'secret'); > print join("\n", sort({ $a cmp $b } $imap->mailboxes_subscribed)), "\n"; > $imap->quit; > ------------------------------------------------------------ > > So please: > > a) remove the test for "use_v6 && use_ssl" with the following "carp" > in "new" and > b) change "_sock_from" as I've shown above. > > Thanks! > > Kind regards, > mosu > > [1] http://search.cpan.org/~sullr/IO-Socket-SSL-2.049/lib/IO/Socket/SSL.pod
-- 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.


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.