-1

I have problem with using POP3 to recieve e-mail from my VPS. In Mail app I'm getting message, that connection failed and I should check login and e-mail anyway, it's good. I try to check it via bash:

telnet mail.inovestudio.com 110
Trying 5.135.147.5... Connected to mail.inovestudio.com. Escape character is '^]'.
+OK Dovecot ready.

USER hello@inovestudio.com
+OK

PASS here_i_put_some_pass** 
Connection closed by foreign host.

Do you have any idea, why it behave like this and how I could fix it? Thank you.

SOLVED: in /etc/dovecot/conf.d/10-auth.conf I use this:

disable_plaintext_auth = yes

mail.log

Nov 10 05:41:33 vps22346 dovecot: auth: Error: BUG: Authentication client sent unknown handshake command: REQUEST?3110993921?677?1?0b0656b72c084511c2988b99b346c1a5
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Authentication server didn't send valid SPID as expected: MECH   PLAIN   plaintext
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Disconnected from auth server, aborting (client-pid=677 client-id=1)
    Nov 10 05:41:33 vps22346 dovecot: pop3-login: Internal login failure (pid=677 id=1) (internal failure, 1 succesful auths): user=<hello@inovestudio.com>, method=LOGIN, rip=188.175.31.165, lip=5.135.147.5, mpid=680, TLS, session=<+fv6UigkNAC8rx+l>
    Nov 10 05:41:33 vps22346 dovecot: auth: Warning: auth client 677 disconnected with 1 pending requests: EOF
    Nov 10 05:41:33 vps22346 dovecot: auth: Error: BUG: Authentication client sent unknown handshake command: REQUEST?602800129?676?1?25bf41ba73464024b67fff41742cba4f
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Authentication server didn't send valid SPID as expected: MECH   PLAIN   plaintext
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Disconnected from auth server, aborting (client-pid=676 client-id=1)
    Nov 10 05:41:33 vps22346 dovecot: pop3-login: Internal login failure (pid=676 id=1) (internal failure, 1 succesful auths): user=<kozusnik@inovestudio.com>, method=LOGIN, rip=188.175.31.165, lip=5.135.147.5, mpid=681, TLS, session=<LPr6UigkMwC8rx+l>
    Nov 10 05:41:33 vps22346 dovecot: auth: Warning: auth client 676 disconnected with 1 pending requests: EOF
    Nov 10 05:41:33 vps22346 dovecot: auth: Error: BUG: Authentication client sent unknown handshake command: REQUEST?1481113601?679?1?6be03e001c9de41da5fc46999f937597
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Authentication server didn't send valid SPID as expected: MECH   PLAIN   plaintext
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Disconnected from auth server, aborting (client-pid=679 client-id=1)
    Nov 10 05:41:33 vps22346 dovecot: pop3-login: Internal login failure (pid=679 id=1) (internal failure, 1 succesful auths): user=<info@inovestudio.com>, method=PLAIN, rip=188.175.31.165, lip=5.135.147.5, mpid=682, TLS, session=<G9D7UigkNQC8rx+l>
    Nov 10 05:41:33 vps22346 dovecot: auth: Warning: auth client 679 disconnected with 1 pending requests: EOF
    Nov 10 05:41:33 vps22346 dovecot: auth: Error: BUG: Authentication client sent unknown handshake command: REQUEST?2768109569?683?1?bd65b7382983d84dbf6d3c710d7bf9d3
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Authentication server didn't send valid SPID as expected: MECH   PLAIN   plaintext
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Disconnected from auth server, aborting (client-pid=683 client-id=1)
    Nov 10 05:41:33 vps22346 dovecot: pop3-login: Internal login failure (pid=683 id=1) (internal failure, 1 succesful auths): user=<hello@inovestudio.com>, method=PLAIN, rip=188.175.31.165, lip=5.135.147.5, mpid=685, TLS, session=</r0AUygkNgC8rx+l>
    Nov 10 05:41:33 vps22346 dovecot: auth: Warning: auth client 683 disconnected with 1 pending requests: EOF
    Nov 10 05:41:33 vps22346 dovecot: auth: Error: BUG: Authentication client sent unknown handshake command: REQUEST?1966735361?684?1?81003e4dfc94424d81de1215228fe809
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Authentication server didn't send valid SPID as expected: MECH   PLAIN   plaintext
    Nov 10 05:41:33 vps22346 dovecot: pop3: Error: Disconnected from auth server, aborting (client-pid=684 client-id=1)
    Nov 10 05:41:33 vps22346 dovecot: pop3-login: Internal login failure (pid=684 id=1) (internal failure, 1 succesful auths): user=<kozusnik@inovestudio.com>, method=PLAIN, rip=188.175.31.165, lip=5.135.147.5, mpid=686, TLS, session=</70AUygkNwC8rx+l>
    Nov 10 05:41:33 vps22346 dovecot: auth: Warning: auth client 684 disconnected with 1 pending requests: EOF
    Nov 10 05:42:26 vps22346 postfix/anvil[509]: statistics: max connection rate 1/60s for (smtps:188.175.31.165) at Nov 10 05:39:06
    Nov 10 05:42:26 vps22346 postfix/anvil[509]: statistics: max connection count 1 for (smtps:188.175.31.165) at Nov 10 05:39:06
    Nov 10 05:42:26 vps22346 postfix/anvil[509]: statistics: max cache size 1 at Nov 10 05:39:06

When I try to execute this: service postfix restart It returns:

[ ok ] Stopping Postfix Mail Transport Agent: postfix. 
[ ok ] Starting Postfix Mail Transport Agent: postfix. 
root@vps22346:/# 2015 Nov 17 09:47:16 vps22346 lda: Fatal: Internal error occurred. Refer to server log for more information.
  • Are you absolutely sure that it is using port 110? Maybe encryption and/or a different port is being used. – mdpc Nov 09 '15 at 21:19
  • If I use port 995, it return "Connection closed by foreign host" when I type USER – user1870556 Nov 09 '15 at 21:24
  • login & password require base64 encoding most of the time, so you need to base64 encode them – Froggiz Nov 09 '15 at 21:55
  • You should see an error about your login failing, rather than a closed connection. Does your network, or your software firewall suite, have a POP3 proxying module that's intercepting your traffic? Port 995 might need SSL (testable with openssl s_client ). – TessellatingHeckler Nov 09 '15 at 22:47
  • 1
    @Froggiz the POP3 protocol expects `USER` and `PASS` to be given cleartext values. No base64 encoding here; like FTP the protocol is too old for that. – roaima Nov 09 '15 at 23:56
  • What do your logs say? – womble Nov 10 '15 at 00:07
  • I put log into my original question. – user1870556 Nov 10 '15 at 04:44
  • The log says it all: the backend authentication seems to be misbehaving. You will need to investigate the dovecot config for this. @Froggiz: `HELO` is SMTP, not POP. – wurtel Nov 10 '15 at 10:25

1 Answers1

3

It seems dovecot is configured to reject non-secure authentication, that is good. To test, use

openssl s_client -connect mail.inovestudio.com:995

You should see a lot of information, but it should end with

+OK Dovecot ready.

and there you can try

USER hello@inovestudio.com
PASS yourcleartextpassword
Law29
  • 3,557
  • 1
  • 16
  • 28
  • When I write PASS ..... it return "closed" – user1870556 Nov 17 '15 at 08:40
  • PASS --> closed indicates that dovecot has a problem validating the credentials. I see that you have edited your question to add a fatal error when launching postfix, and that seems to be the same problem (lda can be dovecot). That error invites you to look at the server logs. You do have your server logs in the question, but not for the time in question. Please provide them, both mail.log and dovecot.log. What procedure did you use to set up postfix+dovecot? There are many good ones but they often differ in details. – Law29 Nov 17 '15 at 13:17