I setup Postfix and Dovecot on a new Ubuntu box following these directions.

From a client machine, I validate that POP3 seems to be working

telnet mydomain.com 110
+OK Dovecot ready.
USER me@mydomain.com
PASS mypassword
+OK Logged in.
+OK Logging out.

However, when trying to configure Gmail on the same client to retrieve email via POP3, I get the error

Server denied POP3 access for the given username and password.
Server returned error: "Login failed."

I carefully confirmed that Gmail is configured to use the same POP Server, Port, Username and Password I used when checking the connection with telnet.

What could be causing Gmail to get a "Login failed" message?

2 Answers 2


It turns out that, while DNS changes to point to the new server had propagated to my local box when I did the testing, they had probably not yet propagated to Google.

Retrying the procedure the following day worked just fine.


While I can't help you solve the problem like this, I can help you debug the problem. First thing you need to do is increase the log level of Dovecot:

  • auth_debug_passwords=yes
  • mail_debug=yes

Restart dovecot and try to log in with your Gmail account. You can now see if Gmail tried to log in or not into your dovecot in the log you defined for dovecot (by default this will be /var/log/mail.log I think).

  • +1 for the tip, but it turned out to be something else in my particular case.
    – Eric J.
    Nov 12, 2012 at 16:41

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.