title: debugging sendmail AUTH settings on ubuntu 16.10
body: <p>I have been trying to harden a sendmail server, trying to ensure that user has to login using TLS connection to an smtp mail server. My certificates are self signed.</p>
  <p>I can say (where foobar is the name of the server )</p>
  <pre><code>ELHO foo
  250-foobar Hello public [xx.xx.xx.xx], pleased to meet you
  250-ENHANCEDSTATUSCODES
  250-PIPELINING
  250-EXPN
  250-VERB
  250-8BITMIME
  250-SIZE
  250-DSN
  250-ETRN
  250-AUTH DIGEST-MD5 CRAM-MD5 LOGIN PLAIN
  250-DELIVERBY
  250 HELP
  AUTH PLAIN AGRwNDJAc2VydmVyLmRwMjY0Mi5mb3JjZTkuY28udWsAdmFkZXI0Mg==^M
  535 5.7.0 authentication failed
  </code></pre>
  <p>The auth string is generated by</p>
  <pre><code>perl -MMIME::Base64 -e 'print encode_base64(&quot;\000use\@foobar\000password&quot;)enter code here
  </code></pre>
  <p>I have used a copy and paste to ensure that the string is not mistyped.</p>
  <p>The TLS handshake is working, the auth command is supported.  The user code and password are correct.  I am trying to find out why its not working.</p>
  <p>My sendmail.mc</p>
  <pre><code>define(`confAUTH_OPTIONS',`A p')dnl
  define(`confAUTH_MECHANISMS', `EXTERNAL DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
  DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
  define(`CERT_DIR', `MAIL_SETTINGS_DIR`'certs')dnl
  define(`confCACERT_PATH', `CERT_DIR')dnl
  define(`confCACERT', `CERT_DIR/cacert.pem')dnl
  define(`confSERVER_CERT', `CERT_DIR/sendmail-cert.pem')dnl
  define(`confSERVER_KEY', `CERT_DIR/sendmail-key.pem')dnl
  define(`confCLIENT_CERT', `CERT_DIR/sendmail-cert.pem')dnl
  define(`confCLIENT_KEY', `CERT_DIR/sendmail-key.pem')dnl
  </code></pre>
  <p>Any attempt connection is reported as</p>
  <p><code>Jun 11 18:32:23 server sm-mta[30179]: STARTTLS=server, relay=public [84.92.92.26], version=TLSv1.2, verify=NOT, cipher=ECDHE-RSA-AES256-GCM-SHA384, bits=256/256</code></p>
  <p>Any suggestions on what is going wrong or how I get any extra output from sendmail ?</p>