From the OP:

my $smtp = Net::SMTPS->new( $server, Port => $server_port, Debug => 1, + doSSL => +$mail_sasl_type) || die "cannot connect to server ${server}"; my $sasl = Authen::SASL->new( mechanism => 'PLAIN', debug => 1, callba +ck => {pas +s => $pass, user => $user}); $smtp->auth( $sasl ) || die "cannot do mail auth";

From the output you posted I see the die statement is where it fails at $smtp->auth( $sasl ) || die [...]. Looking at the auth() method I found the documentation points out a difference in Net::SMTPS and Net::SMTP. You might try to specify the AUTHMETHOD as shown at Net::SMTPS.

METHODS Most of all methods of Net::SMTP are inherited as is, except auth(). auth ( USERNAME, PASSWORD [, AUTHMETHOD]) Attempt SASL authentication through Authen::SASL module. AUTHMETHOD is + your required method of authentication, like 'CRAM-MD5', 'LOGIN', .. +. etc. If your selection does not match the server-offerred AUTH mech +anism, authentication negotiation may fail.

Also, the synopsis for Authen::SASL shows mechanism specified as a list of the choices. You only provide PLAIN but it might be looking for one of the other options shown in your debug output.

SYNOPSIS use Authen::SASL; $sasl = Authen::SASL->new( mechanism => 'CRAM-MD5 PLAIN ANONYMOUS', callback => { pass => \&fetch_password, user => $user, } );

Debug output from Net::SMTPS :

Net::SMTPS=GLOB(0x562fb253e128)<<< 250-AUTH PLAIN LOGIN CRAM-MD5 DIGES +T-MD5

In reply to Re: Net::SMTPS => auth no longer works - Migration from Debian to Docker container by Lotus1
in thread Net::SMTPS => auth no longer works - Migration from Debian to Docker container by initB10r

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.