title: mailx command giving authentication unsuccessful error even after right credentials
body: <p>I want to send mail using <code>mailx</code> command, in more specific way.</p>
  
  <p>So, I googled how to use <code>mailx</code> command, I searched some questions and answers on stackoverflow, I found common answer for it which is</p>
  
  <p><code>mailx -r "fromAddr" -s "subject" toAddr</code>
  : when i tried this command, it shows me nothing, instead it gone in infinite loop, I guess.</p>
  
  <p>I am seeking information, that which SMTP server is used, what authentication is used, OR from where this command takes default values</p>
  
  <p>Then I write a command <a href="http://www.binarytides.com/linux-mailx-command/" rel="nofollow">by reading this</a> and got the error</p>
  
  <p>I am trying command as follows and getting error (executed with <code>mailx -v</code> option)</p>
  
  <pre><code>$ echo "This is the message body" | mailx -v \
  &gt; -r "abc@domain.com" \
  &gt; -s "hey, this is test" \
  &gt; -S smtp="192.168.XXX.XX:25" \
  &gt; -S smtp-use-starttls \
  &gt; -S smtp-auth=login \
  &gt; -S smtp-auth-user="abc@domain.com" \
  &gt; -S smtp-auth-password="xyz123" \
  &gt; -S ssl-verify=ignore \
  &gt; -S nss-config-dir=/etc/pki/nssdb/ \
  &gt; abc@domain.com
  
  Resolving host 192.168.XXX.XX . . . done.
  Connecting to 192.168.XXX.XX . . . connected.
  220 something.domain.com Microsoft ESMTP MAIL Service ready at (time)
  &gt;&gt;&gt; EHLO localhost.localdomain
  250-something.domain.com Hello [10.XX.XX.XXX]
  250-SIZE 37748736
  250-PIPELINING
  250-DSN
  250-ENHANCEDSTATUSCODES
  250-STARTTLS
  250-X-ANONYMOUSTLS
  250-AUTH
  250-X-EXPS GSSAPI NTLM
  250-8BITMIME
  250-BINARYMIME
  250-CHUNKING
  250 XRDST
  &gt;&gt;&gt; STARTTLS
  220 2.0.0 SMTP server ready
  Error in certificate: Issuer certificate is invalid.
  Comparing DNS name: "something"
  Comparing DNS name: "something.domain.com"
  Comparing common name: "something"
  host certificate does not match "192.168.XXX.XX"
  SSL parameters: cipher=AES-128, keysize=128, secretkeysize=128,
  issuer=CN=something
  subject=CN=something
  &gt;&gt;&gt; EHLO localhost.localdomain
  250-something.domain.com Hello [10.XX.XX.XXX]
  250-SIZE 37748736
  250-PIPELINING
  250-DSN
  250-ENHANCEDSTATUSCODES
  250-AUTH LOGIN
  250-X-EXPS GSSAPI NTLM
  250-8BITMIME
  250-BINARYMIME
  250-CHUNKING
  250 XRDST
  &gt;&gt;&gt; AUTH LOGIN
  334 VXNlcm5hbWU6
  &gt;&gt;&gt; YXV0b21hdGlvbl90ZXN0QG5ld3Rlc3QuY29t
  334 UGFzc3dvcmQ6
  &gt;&gt;&gt; SW5mb3N5czEyMw==
  535 5.7.3 Authentication unsuccessful
  smtp-server: 535 5.7.3 Authentication unsuccessful
  "/home/user-group/user/dead.letter" 11/398
  . . . message not sent.
  </code></pre>
  
  <p>I checked for my credentials, SMTP address for multiple times, they are correct, stil it is showing </p>
  
  <blockquote>
    <p>smtp-server: 535 5.7.3 Authentication unsuccessful</p>
  </blockquote>
  
  <p>I am not the root user</p>
  
  <p>Thanks in advance for any suggestions, idea, which will make command executable.</p>