Versions:

  • Windows XP SP3 32-bit
  • CYGWIN_NT-5.1 2.5.1 (0.297 / 5/3) 2016-04-21 22:12 i686 Cygwin
  • This is perl 5, version 22, subversion 2 (v5.22.2) built for cygwin-thread-multi-64int
  • perl-Authen-SASL-2.16-2
  • perl-Authen-SASL-XS-1.00-1

When installing the perl-Authen-SASL-2.16-2 package, the Cygwin setup-x86.exe installation program warns that it depends on perl-Authen-SASL-XS-1.00-1 . As a result, we have the following debug log fragment:

Net::SMTP::_SSL>>> Net::SMTP::_SSL Net::SMTP::_SSL>>> IO::Socket::SSL(2.027) Net::SMTP::_SSL>>> IO::Socket::IP(0.37) Net::SMTP::_SSL>>> IO::Socket(1.38) Net::SMTP::_SSL>>> IO::Handle(1.35) Net::SMTP::_SSL>>> Exporter(5.72) Net::SMTP::_SSL>>> Net::SMTP(3.05) Net::SMTP::_SSL>>> Net::Cmd(3.05) Net::SMTP::_SSL=GLOB(0x206713a8)<<< 220 smtp3h.mail.yandex.net ESMTP... Net::SMTP::_SSL=GLOB(0x206713a8)>>> EHLO localhost.localdomain Net::SMTP::_SSL=GLOB(0x206713a8)<<< 250-smtp3h.mail.yandex.net Net::SMTP::_SSL=GLOB(0x206713a8)<<< 250-8BITMIME Net::SMTP::_SSL=GLOB(0x206713a8)<<< 250-PIPELINING Net::SMTP::_SSL=GLOB(0x206713a8)<<< 250-SIZE 42991616 Net::SMTP::_SSL=GLOB(0x206713a8)<<< 250-AUTH LOGIN PLAIN XOAUTH2 Net::SMTP::_SSL=GLOB(0x206713a8)<<< 250-DSN Net::SMTP::_SSL=GLOB(0x206713a8)<<< 250 ENHANCEDSTATUSCODES Connected to smtp.yandex.ru at /cygdrive/c/do/scripts/Yotools.pm line 559. Auth'n as user-name... at /cygdrive/c/do/scripts/Yotools.pm line 562. auth() error at /cygdrive/c/do/scripts/Yotools.pm line 564. Net::SMTP::_SSL=GLOB(0x206713a8)>>> QUIT Net::SMTP::_SSL=GLOB(0x206713a8)<<< 221 2.0.0 Closing connection. 

And no diagnostics from Authen::SASL . In the process of finding the cause, Authen::SASL::XS was suspected, which was uninstalled. As a result, it all worked:

 ... Net::SMTP::_SSL=GLOB(0x206715f0)<<< 250-AUTH LOGIN PLAIN XOAUTH2 Net::SMTP::_SSL=GLOB(0x206715f0)<<< 250-DSN Net::SMTP::_SSL=GLOB(0x206715f0)<<< 250 ENHANCEDSTATUSCODES Connected to smtp.yandex.ru at /cygdrive/c/do/scripts/Yotools.pm line 559. Auth'n as user-name... at /cygdrive/c/do/scripts/Yotools.pm line 562. Net::SMTP::_SSL=GLOB(0x206715f0)>>> AUTH LOGIN Net::SMTP::_SSL=GLOB(0x206715f0)<<< 334 VXNlcm5hbWU6 Net::SMTP::_SSL=GLOB(0x206715f0)>>> USER_NAME Net::SMTP::_SSL=GLOB(0x206715f0)<<< 334 UGFzc3dvcmQ6 Net::SMTP::_SSL=GLOB(0x206715f0)>>> PASSWORD Net::SMTP::_SSL=GLOB(0x206715f0)<<< 235 2.7.0 Authentication successful. auth()'d at 'smtp.yandex.ru' as 'user-name' ... 

Authen::SASL POD says:

The framework allows you to be plugged in ...

Authen::SASL::XS , Authen::SASL::Cyrus and Authen::SASL::Perl .

You simply simply do

 use Authen::SASL qw(Perl); 

But I do not want to go into the code of the standard Net::SMTP module, which uses the default plugin ( XS ) for authentication.

In addition, on the module page about the dependence on Authen::SASL::XS does not say.

Google suggested a couple of places ( one , two ) where similar problems are mentioned, states that Authen::SASL::Perl works quite well, and it is recommended to remove Authen::SASL::XS .

I could not get to the Cygwin mailing list, my letter from @mail.ru gone nowhere.

Does he need this module?

    1 answer 1

    Does he need this module?

    If the auto selection works without problems, then good. But you can not delete. I do not know how under Windows and in 5.22, but in 5.18 under Linux in such cases, it often works to specify an alternative version of the module before the module, which depends on it:

     use Authen::SASL::Perl; use Net::SMTP::SSL; # и другие Authen::SASL::* уже не дёргаются 
    • Re-read the description of require and use in the Book in with the Camel . Refreshed that require (which is [called] use ) does not reload the module. I checked in my conditions, everything worked as it should. No intervention in Net::SMTP was required. - hobo-mts
    • And Perl is in Windows / Cygwin - Perl. - hobo-mts
    • I forgot to write, I used: use Authen::SASL qw(Perl); before use Net::SMTP; - hobo-mts
    • Well, there may be differences in the versions of the modules, as a result of differences in the implementations of the choice of alternatives. But if it works, then everything is OK :) - PinkTux