Gmail trying to access hMailServer via POP3 Error

email-servergmailpop3

I just setup a new mail server called hMailServer on a Windows server after switching from Merak. Most users setup access through Gmail to download their messages via POP3. One user, who has a few thousand emails, keeps getting an error:

Error reading mail.
Server returned error "Connection closed by remote host: The other server terminated our connection…."

Once I delete and re-add the account through Gmail, it will download 200 messages, saying XXXX messages remain. Then, about a minute later Gmail gives the Error reading mail warning, with the above error in the "Mail Fetch History". It seems like hMailServer may be rejecting Gmail after 1 attempt?

Below is the hMailServer Status Log:

SENT: +OK POP3
RECEIVED: USER example@example.com
SENT: +OK Send y our password
RECEIVED: PASS ***
SENT: +OK Mailbox locked and ready
RECEIVED: CAPA
SENT: -ERR Invalid command in current state.
RECEIVED: LIST
SENT: +OK 8598 messages (137625842 octets)
SENT: 1 7527[nl]2 1808...
RECEIVED: UIDL
SENT: +OK 8598 messages (1376255842 octets)
RECEIVED: RETR 1
SENT: .
RECEIVED: RETR 2

Can anyone offer any insight into what's going on? Any help is much appreciated.

Best Answer

The

Error reading mail. Server returned error "Connection closed by remote host: The other server terminated our connection...."

message occurs because the server that the gmail is fetching the mail from has limited the requests to retrieve them. The gmail server will keep attempting to fetch emails by itself though, so just ignore the error message and wait it out. It may take up to an hour if there are thousands of emails being fetched but it should work eventually. The remote host will allow it to get another batch (200 at a time).