poppassd.php3 error

Tim Gorter email@teletechnics.com
Fri, 18 May 2001 18:22:24 +0000 (GMT)


Hi guys,

The poppassd.php3 in the tarball with IMP 2.2.4 has a fault that affects my 
server.

The POPPASSD specification notes that the interchange between client and server 
follows this protocol

Appendix A: poppassd
   
    For historical interest, the "poppassd" protocol is described
below:
   
    C: <open connection to port 106>
    S: 200 poppassd (version 1.1) ready.
    C: USER fred
    S: 300 send password
    C: PASS stupid
    S: 200 Hello, fred.
    C: NEWPASS still-stupid
    S: 200 Password changed for fred
    C: QUIT
    S: Goodby.


In the script the test for error it checks the first 3 digits returned from the 
server, which normally is 200 from the above.  All except for the line 
with 'send password' where it is 300.
In poppassd.php3 it checks if it is 200 and thus comes back with the error '300 
send password'

changing the number to 300 from 200 on line 111 solves this.

BUT I note that on later versions of the poppassd deamon running on some 
servers, the code returned is actually 200.

My poppassd deamon is ver 1.0.4
I checked another server running ver 1.2.0 and it returned 200


So I ask, what is the PHP code to check if the return code is either 200 or 
300, as I think it needs to be checked if it is either or?

cheers,
tim.