Many thanks.
A clean reinstall with gcc-7 solved the problem

Gea

On 23/01/2023 13:26, g...@napp-it.org wrote:
I send TLS alerts and status mails via the following Perl script:
(napp-it menu Jobs > TLS > Test

  use Net::SMTP;
  use Authen::SASL qw(Perl);

  my $smtp = Net::SMTP->new("$server",
  SSL => 1,
  #Port => 587,
  Debug => 1,
  Hello => "smtp.gmail.com",
  Timeout => "30",) || die("could not connect to smtp-server");

  $smtp->auth("$user","$pw");

  ####

  $smtp->mail($from);

  $smtp->to($to);
  $smtp->data();
  $smtp->datasend("From: $from\n");
  $smtp->datasend("To: $to\n");

  $smtp->datasend("Subject: Test Email\n");
  $smtp->datasend("\n");
  $smtp->datasend("This is a test email sent over TLS with the STARTTLS
extension.\n");
  $smtp->dataend();
  $smtp->quit;


The needed modules are installed via (accepting setup defaults))

perl -MCPAN -e shell
install CPAN
reload cpan
notest install Net::SSLeay
notest install IO::Socket::SSL
notest install Net::SMTP::TLS
notest install Authen::SASL
exit


When I try to send (ex to smtp.gmail.com) I get the following error(with newest
IO::Socket::SSL):
*To use SSL please install IO::Socket::SSL with version>=2.007 at
/usr/perl5/5.36/lib/Net/SMTP.pm line 68.*


btw
It works on OmniOS (Perl 5.36) and Solaris 11.4.
Maybe the in OI included Net::SMTP is the problem?


Gea
_______________________________________________
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss

On a current, updated system it's already > 2.007:

package IO::Socket::SSL;
our $VERSION = '2.080';

# pkg list library/perl-5/io-socket-ssl-536
library/perl-5/io-socket-ssl-536  2.80-2023.0.0.0    i--

And this test (which is inside Net:SMTP) does not give a message:

# perl -MIO::Socket::SSL
my $ssl_class = eval {
  require IO::Socket::SSL;
  # first version with default CA on most platforms
  no warnings 'numeric';
  IO::Socket::SSL->VERSION(2.007);
} && 'IO::Socket::SSL';

my $nossl_warn = !$ssl_class &&
  'To use SSL please install IO::Socket::SSL with version>=2.007';


_______________________________________________
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss


--
Guenther Ernst Alka
Dipl. Ing (FH)

Rektor-Klaus Str.71
73525 Schw. Gmünd
tel 07171 931393


_______________________________________________
openindiana-discuss mailing list
openindiana-discuss@openindiana.org
https://openindiana.org/mailman/listinfo/openindiana-discuss

Reply via email to