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
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |