I'm a programmer, not a sys-admin, but my customer's sys-admins are not being helpful and after much googling I still can't find the answer to this.

My Java application gets the following response from my customer's MS Exchange following EHLO

EHLO PMNDEV3.prd.abc
250-PYTHON3.prd.abc Hello []
250-SIZE 20971520

Note that the 250-AUTH response has no parameters, so my software library (JavaMail) understandably says that it can't authenticate as there are no supported mechanisms advertised per RFC 4954

My question is why is this so? Is there perhaps some other non ESMTP authentication happening that is causing no AUTH mechanisms to be advertised?

  • If folks reach this question on account of a AuthenticationFailedException javax.mail.AuthenticationFailedException: No authentication mechansims supported by both server and client -- the easy workaround is to ensure that the mail.smtp.auth property is false, and thus not attempt to authenticate in a scenario where the server won't accept it. – Charles Duffy Dec 2 '15 at 19:36

The server's probably set up to not allow authentication over a plaintext connection.

What happens if you send AUTH PLAIN after the EHLO? Does it complain about AUTH PLAIN over a clear channel?

  • You are right. The server was set up to not allow authentication. Unfortunately the customer site is a secure environment and all my testing was done at arms length via their local sys-admins. – Glenn Lawrence Apr 1 '14 at 22:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.