tultalk has asked for the wisdom of the Perl Monks concerning the following question:
Hi: Failure below
Searches turn up <554 Security failure as generalized and revealing nothing.
Any suggestions/pointers appreciated
If I don't send second EHLO and let it go through auth it authenticates the username/password and sends the email.
socket_write("AUTH PLAIN " . encode_base64(join("\0", $ +auth->{user}, $auth->{user}, $auth->{password}), $CRLF) ) || return fail("send AUTH PLAIN failed (lost connect +ion?)"); socket_read() || return fail("AUTH PLAIN failed: $server_reply") +;
Exchange w/server
- trying abc.us - connected to abc.us <220-cp15m2.lowesthosting.com ESMTP Exim 4.89_1 #1 Thu, 03 May 2018 09 +:29:03 -0500 <220-We do not authorize the use of this system to transport unsolicit +ed, <220 and/or bulk e-mail. >EHLO abc.us <250-cp15m2.lowesthosting.com Hello cp15.lowesthosting.com [69.41.190. +211] <250-SIZE 52428800 <250-8BITMIME <250-PIPELINING <250-AUTH PLAIN LOGIN <250-CHUNKING <250-STARTTLS <250 HELP >STARTTLS <220 TLS go ahead >EHLO abc.us <554 Security failure
The code producing this is:
unless ( $connected ) { return fail("connect to $smtp failed ($!) no (more) retries!") }; { local $^W = 0; # don't warn on undefined variables # Add info to log variable $log .= "Server: $smtp Port: $port\n" . "From: $fromaddr\n" . "Subject: $mail{Subject}\n" ; } my($oldfh) = select(S); $| = 1; select($oldfh); socket_read() || return fail("Connection error from $smtp on port $port ($_) +"); socket_write("EHLO $smtp$CRLF") || return fail("send EHLO error (lost connection?)"); my $ehlo = socket_read(); if ($ehlo) { $log .= "socket_read ehlo: $ehlo \n"; # parse EHLO response map { s/^\d+[- ]//; my ($k, $v) = split /\s+/, $_, 2; $esmtp{$k} = $v || 1 if $k; } split(/\n/, $ehlo); if ($port == 587) { #Add STARTTLS code socket_write("STARTTLS$CRLF") || return fail("send STARTTLS failed (lost connection?)") +; socket_read() || return fail(" $server_reply"); socket_write("EHLO $smtp$CRLF") || return fail("send EHLO error (lost connection?)"); $ehlo = ""; $ehlo = socket_read(); if ($ehlo) { $log .= "2nd socket_read ehlo: $ehlo \n"; + warn("parse 2nd EHLO response"); map { s/^\d+[- ]//; my ($k, $v) = split /\s+/, $_, 2; $esmtp{$k} = $v || 1 if $k; } split(/\n/, $ehlo); } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: STARTTLS Failure
by jeffenstein (Hermit) on May 04, 2018 at 09:17 UTC | |
by tultalk (Monk) on May 04, 2018 at 12:52 UTC | |
by jeffenstein (Hermit) on May 04, 2018 at 14:03 UTC | |
|
Re: STARTTLS Failure
by tultalk (Monk) on May 03, 2018 at 16:08 UTC | |
by Anonymous Monk on May 04, 2018 at 15:46 UTC | |
by tultalk (Monk) on May 05, 2018 at 16:36 UTC | |
|
Re: STARTTLS Failure
by Anonymous Monk on May 03, 2018 at 17:24 UTC |