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); } } }

In reply to STARTTLS Failure by tultalk

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.