Digory’s modification didn’t solve my problem, I was still getting the error-message:
Ooops POP3: premature NOOP OK, NOT an RFC 1939
But the modification was inspirational in actually solving the problem.
The short solution:
My fix; edit wp-includes/class-pop3.php, and change these lines:
107 $this->BANNER = $this->parse_banner($reply);
108 $this->RFC1939 = $this->noop();
To
107 $this->BANNER = $this->parse_banner($reply);
108 return true;
109 $this->RFC1939 = $this->noop();
(Insert line 108: return true;
)
Now, I’m no certified web-geek, and I don’t know php, but here’s what I think:
I had to google on “noop rfc 1939” to try to understand what was happening.
You say noop
to the mail-server, to verify that it conforms to rfc 1939, by verifying that it responds coherently to the noop
request. The code in wp-includes/class-pop3.php apparently assumes that the proper answer is always +OK
, and discards the server if it ever replies otherwise. But the problem here stems from the fact that the conflicting noop
request is sent in the particular authorization state, where the proper answer apparently is -ERR
, as opposed to sending the request in the transaction state, where the proper answer is +OK
.
Actually from reading the rfc 1939, it would appear that you should actually never send noop
during the authorization state, so that is what my modification achieves: It cuts out a strictness test against the mailserver, that apparently isn’t strict itself.
I also developed another – much longer – modification, that modified the code to still carry out the test, but actually expect the right answer : -ERR
.
But since that modification is so much more complex, and achieved the same as the simple solution, and I don’t know for certain which solution is actually the most correct, and I don’t know the particular motivation for performing this strictness test at this point in the mail-transaction, I only offer the simple solution here.
So one could argue that Digory’s modification rectifies a banal syntax-error, while my modification hints at a more conceptual problem with the code. Maybe a problem that should be considered to be a bug worthy of a bug-entry, whereever that is… I’ll go dig that up… maybe.
Cheers, Jakob.