[OpenIndiana-discuss] TLS Alerts and status mail problem from OpenIndiana

gea at napp-it.org gea at napp-it.org
Mon Jan 23 12:26:17 UTC 2023


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


More information about the openindiana-discuss mailing list