I have a laptop running KMail 5.7.3 on Bionic Beaver. I just got a new computer with Eoan Ermine and am trying to set up Kmail 5.11.3 to use the same IMAP server. I set up the IMAP account, tried to view my email, and got this error:

The server for account "IMAP Account 1" refused the supplied username and password. Do you want to go to the settings, have another attempt at logging in, or do nothing?

SASL(-4): no mechanism available: No worthy mechs found

I set it to plain text (which is safe since the server and both clients are in the same house) and ran Wireshark and captured this:

A000001 LOGOUT
* BYE Logging out
A000001 OK Logout completed.

It didn't even try to log in! How do I make it work?


SASL is just a set of authentication mechanisms, which are common to many protocols. It is the modern alternative to protocol specific authentication mechanisms (the LOGIN command in the case of IMAP) and is not the culprit here.

Dovecot has a configuration variable, which disables both LOGIN (you can see the LOGINDISABLED capability in dovecot's banner) and all plaintext SASL mechanisms, unless the connection is encrypted. You can switch it off by modifying:

disable_plaintext_auth = yes


disable_plaintext_auth = no

in /etc/dovecot/conf.d/10-auth.conf and reloading dovecot.

| improve this answer | |
  • Thanks! The comment in that file says "Note that if the remote IP matches the local IP ... plaintext authentication is allowed." I ran the connection over a forwarded port, making the connection appear to come from localhost, and it worked. Now I'll reload Dovecot and see what happens. – Pierre Abbat Jan 1 at 23:02

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.