{"thread":{"id":"36555","subject":"git send-email doesn't work with IPv6 and STARTTLS","startedAt":"2014-04-30T19:43:21Z","lastAt":"2014-05-01T20:55:09Z","messageCount":5,"participants":["Matthias-Christian Ott","Jonathan Nieder","Steffen Ullrich"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"240360","messageId":"53615259.90200@mirix.org","threadId":"36555","inReplyTo":null,"subject":"git send-email doesn't work with IPv6 and STARTTLS","fromName":"Matthias-Christian Ott","fromEmail":"ott@mirix.org","sentAt":"2014-04-30T19:43:21Z","receivedAt":"2014-04-30T19:43:21Z","isPatch":false,"sender":{"key":"ott@mirix.org","avatar":null},"body":"$ git --version\ngit version 1.8.5.5\n\ngit send-email uses Net::SMTP connections that use STARTTLS. Net::SMTP\ndoes not support IPv6. I patched Net:SMTP to use IO::Socket::INET6 and\nit worked.\n\n- Matthias-Christian Ott\n"},{"id":"240412","messageId":"20140501180546.GA9218@google.com","threadId":"36555","inReplyTo":"53615259.90200@mirix.org","subject":"Re: git send-email doesn't work with IPv6 and STARTTLS","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2014-05-01T18:05:46Z","receivedAt":"2014-05-01T18:05:46Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nMatthias-Christian Ott wrote[1]:\n\n> git send-email uses Net::SMTP connections that use STARTTLS. Net::SMTP\n> does not support IPv6. I patched Net:SMTP to use IO::Socket::INET6 and\n> it worked.\n\nThanks for reporting.\n\n 1. What version of Net::SMTP do you use?\n\n 2. Would you be willing to contribute your patch to Net::SMTP upstream,\n    for example by mailing it to bug-libnet@rt.cpan.org with\n    the string \"[rt.cpan.org #93823]\" somewhere in the subject line[2]?\n\nHope that helps,\nJonathan\n\n[1] http://thread.gmane.org/gmane.comp.version-control.git/247769\n[2] https://rt.cpan.org/Public/Bug/Display.html?id=93823\nhttps://rt.cpan.org/NoAuth/RT/CPAN/Usage.html\n"},{"id":"240471","messageId":"5362B226.4080500@mirix.org","threadId":"36555","inReplyTo":"20140501180546.GA9218@google.com","subject":"Re: git send-email doesn't work with IPv6 and STARTTLS","fromName":"Matthias-Christian Ott","fromEmail":"ott@mirix.org","sentAt":"2014-05-01T20:44:22Z","receivedAt":"2014-05-01T20:44:22Z","isPatch":false,"sender":{"key":"ott@mirix.org","avatar":null},"body":"On 05/01/14 20:05, Jonathan Nieder wrote:\n> Hi,\n\nHi,\n\n> Matthias-Christian Ott wrote[1]:\n> \n>> git send-email uses Net::SMTP connections that use STARTTLS. Net::SMTP\n>> does not support IPv6. I patched Net:SMTP to use IO::Socket::INET6 and\n>> it worked.\n> \n> Thanks for reporting.\n> \n>  1. What version of Net::SMTP do you use?\n\nIncluded in Perl:\n\nSummary of my perl5 (revision 5 version 16 subversion 3) configuration:\n\n  Platform:\n    [...]\n    hint=recommended, useposix=true, d_sigaction=define\n    useithreads=undef, usemultiplicity=undef\n    useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef\n    use64bitint=undef, use64bitall=undef, uselongdouble=undef\n    usemymalloc=n, bincompat5005=undef\n  Compiler:\n    [...]\n    intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234\n    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12\n    ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',\nlseeksize=8\n    alignbytes=4, prototype=define\n  Linker and Libraries:\n    [...]\n    libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat\n    perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc\n    [...]\n  Dynamic Linking:\n    [...]\n\n\nCharacteristics of this binary (from libperl):\n  Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV\n                        PERL_MALLOC_WRAP PERL_PRESERVE_IVUV USE_LARGE_FILES\n                        USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE\n                        USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF\n  Locally applied patches:\n\tgentoo/EUMM-RUNPATH - https://bugs.gentoo.org/105054\ncpan/ExtUtils-MakeMaker: drop $PORTAGE_TMPDIR from LD_RUN_PATH\n\tgentoo/EUMM_delete_packlist - Don't install .packlist or perllocal.pod\nfor perl or vendor\n\tgentoo/config_over - Remove -rpath and append LDFLAGS to lddlflags\n\tgentoo/cpan_definstalldirs - Provide a sensible INSTALLDIRS default for\nmodules installed from CPAN.\n\tgentoo/cpanplus_definstalldirs - Configure CPANPLUS to use the site\ndirectories by default.\n\tgentoo/create_libperl_soname - https://bugs.gentoo.org/286840 Set\nlibperl soname\n\tgentoo/drop_fstack_protector - https://bugs.gentoo.org/348557 Don't\nforce -fstack-protector on everyone.\n\tgentoo/enc2xs - https://bugs.gentoo.org/338802 Tweak enc2xs to ignore\nmissing @INC directories\n\tgentoo/mod_paths - Add /etc/perl to @INC\n\tgentoo/patchlevel - List packaged patches for perl-5.16.3(#1) in\npatchlevel.h\n\tgentoo/aix_soname - aix gcc detection and shared library soname support\n\tgentoo/solaris-relocation - Fix lddlflags for solaris\n\tgentoo/opensolars_headers - Add headers for opensolaris\n\tgentoo/cleanup-paths - Cleanup PATH and shrpenv\n\tgentoo/usr_local - Remove /usr/local paths\n\tgentoo/hints_hpux - Fix hpux hints\n\tgentoo/darwin-cc-ld - https://bugs.gentoo.org/297751 darwin: Use $CC to\nlink\n\tgentoo/mint - [perl #89502] Mint fixes\n\tgentoo/interix - Fix interix hints\n\tfixes/maketext-code-execution - [1735f6f] http://bugs.gentoo.org/448632\nFix misparsing of maketext strings.\n\tfixes/cgi-cr-escaping - https://bugs.gentoo.org/443446 CR escaping for\nP3P and Set-Cookie headers\n\tdebian/cpan-missing-site-dirs - https://bugs.gentoo.org/422981 Fix\nCPAN::FirstTime defaults with nonexisting site dirs if a parent is writable\n\n[...]\n\n>  2. Would you be willing to contribute your patch to Net::SMTP upstream,\n>     for example by mailing it to bug-libnet@rt.cpan.org with\n>     the string \"[rt.cpan.org #93823]\" somewhere in the subject line[2]?\n\nI just did s/INET/INET6/g. I don't know Perl, so I guess Seffen Ullrich\ncould help here more than I can.\n\nRegards\nMatthias-Christian\n"},{"id":"240473","messageId":"20140501204814.GA31294@genua.de","threadId":"36555","inReplyTo":"20140501180546.GA9218@google.com","subject":"Re: git send-email doesn't work with IPv6 and STARTTLS","fromName":"Steffen Ullrich","fromEmail":"steffen_ullrich@genua.de","sentAt":"2014-05-01T20:48:14Z","receivedAt":"2014-05-01T20:48:14Z","isPatch":false,"sender":{"key":"steffen_ullrich@genua.de","avatar":null},"body":"\nHi,\n\nNet::SMTP does neither supports SSL nor IPv6.\n\ngit-send-mail does not use Net::SMTP directly for SSL support, but:\n- for direct connections (port 465) it uses Net::SMTP::SSL which just\n  replaces the superclass if Net::SMTP with IO::Socket::SSL and thus\n  implicitly supports IPv6 (because IO::Socket::SSL does)\n- for plain connections with SSL upgrade git-send-mail uses Net::SMTP for\n  the initial connect and then does Net::SMTP::SSL->start_SSL (e.g.\n  inherited from IO::Socket::SSL) to upgrade the socket to SSL.\n\nThe problem here is that Net::SMTP does not support IPv6, but this\nshould be solvable by using Net::INETGlue::INET_is_INET6 before loading\nNet::SMTP.\n\nBut all these tricks are just workarounds for missing IPv6 and SSL support\ndirectly in the Net::SMTP, Net::FTP and Net::POP3.\nI therefore repeat my proposal from RT#93823 (no response yet) to add\ntransparent support for IPv6 and SSL into these modules. By transparent I\nmean that the features are available if the necessary modules are installed\n(e.g. IO::Socket::SSL for SSL and IO::Socket::INET6 or IO::Socket::IP for\nIPv6), but that it works like before if they are not installed.\n\nI don't have these patches yet, but most of the necessary code is already\nthere in Net::SSLGlue and Net::INET6Glue.\nWould you accept and incorporate such patches?\n\nRegards,\nSteffen\n\nOn Thu, May 01, 2014 at 11:05:46AM -0700, Jonathan Nieder <jrnieder@gmail.com> wrote:\n> Hi,\n> \n> Matthias-Christian Ott wrote[1]:\n> \n> > git send-email uses Net::SMTP connections that use STARTTLS. Net::SMTP\n> > does not support IPv6. I patched Net:SMTP to use IO::Socket::INET6 and\n> > it worked.\n> \n> Thanks for reporting.\n> \n>  1. What version of Net::SMTP do you use?\n> \n>  2. Would you be willing to contribute your patch to Net::SMTP upstream,\n>     for example by mailing it to bug-libnet@rt.cpan.org with\n>     the string \"[rt.cpan.org #93823]\" somewhere in the subject line[2]?\n> \n> Hope that helps,\n> Jonathan\n> \n> [1] http://thread.gmane.org/gmane.comp.version-control.git/247769\n> [2] https://rt.cpan.org/Public/Bug/Display.html?id=93823\n> https://rt.cpan.org/NoAuth/RT/CPAN/Usage.html\n\n-- \ngenua\nGesellschaft fuer Netzwerk- und Unix-Administration mbH\nDomagkstrasse 7, 85551 Kirchheim bei Muenchen\ntel +49 89 991950-0, fax -999, www.genua.de\nGeschaeftsfuehrer: Dr. Magnus Harlander, Dr. Michaela Harlander,\nBernhard Schneck. Amtsgericht Muenchen HRB 98238\n"},{"id":"240472","messageId":"20140501205509.GC9218@google.com","threadId":"36555","inReplyTo":"20140501204814.GA31294@genua.de","subject":"Re: git send-email doesn't work with IPv6 and STARTTLS","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2014-05-01T20:55:09Z","receivedAt":"2014-05-01T20:55:09Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nSteffen Ullrich wrote:\n\n> git-send-mail does not use Net::SMTP directly for SSL support, but:\n> - for direct connections (port 465) it uses Net::SMTP::SSL which just\n>   replaces the superclass if Net::SMTP with IO::Socket::SSL and thus\n>   implicitly supports IPv6 (because IO::Socket::SSL does)\n> - for plain connections with SSL upgrade git-send-mail uses Net::SMTP for\n>   the initial connect and then does Net::SMTP::SSL->start_SSL (e.g.\n>   inherited from IO::Socket::SSL) to upgrade the socket to SSL.\n>\n> The problem here is that Net::SMTP does not support IPv6, but this\n> should be solvable by using Net::INETGlue::INET_is_INET6 before loading\n> Net::SMTP.\n\nSounds like a good change, fwiw.  Even after Net::SMTP is fixed, it\nwould be useful as a way to make sure git works well with old versions\nof Net::SMTP too.\n\n> But all these tricks are just workarounds for missing IPv6 and SSL support\n> directly in the Net::SMTP, Net::FTP and Net::POP3.\n> I therefore repeat my proposal from RT#93823 (no response yet) to add\n> transparent support for IPv6 and SSL into these modules. By transparent I\n> mean that the features are available if the necessary modules are installed\n> (e.g. IO::Socket::SSL for SSL and IO::Socket::INET6 or IO::Socket::IP for\n> IPv6), but that it works like before if they are not installed.\n>\n> I don't have these patches yet, but most of the necessary code is already\n> there in Net::SSLGlue and Net::INET6Glue.\n> Would you accept and incorporate such patches?\n\nThanks for a kind offer.  I am not Net::SMTP upstream, but I'd be\nhappy to work with upstream to get such patches applied.\n\nThanks for your work,\nJonathan\n"}]}