|
From: <jgr...@us...> - 2003-07-31 23:44:21
|
Update of /cvsroot/popfile/engine/Proxy
In directory sc8-pr-cvs1:/tmp/cvs-serv10287/Proxy
Modified Files:
POP3.pm
Log Message:
Small code cleanups that came about as I was writing the test suite for the module; most of these are replacing last with next so that if we fail to connect to the remote server the client can retry
Index: POP3.pm
===================================================================
RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v
retrieving revision 1.68
retrieving revision 1.69
diff -C2 -d -r1.68 -r1.69
*** POP3.pm 31 Jul 2003 16:32:21 -0000 1.68
--- POP3.pm 31 Jul 2003 23:39:06 -0000 1.69
***************
*** 180,186 ****
next;
}
- } else {
- $self->tee_( $client, "-ERR server name not specified in USER command$eol" );
- last;
}
--- 180,183 ----
***************
*** 191,203 ****
# User is issuing the APOP command to start a session with the remote server
! if ( $command =~ /APOP (.*):((.*):)?(.*) (.*)/i ) {
if ( $mail = $self->verify_connected_( $mail, $client, $1, $3 || 110 ) ) {
! # Pass through the USER command with the actual user name for this server,
# and send the reply straight to the client
$self->echo_response_($mail, $client, "APOP $4 $5" );
} else {
! last;
}
--- 188,200 ----
# User is issuing the APOP command to start a session with the remote server
! if ( $command =~ /APOP (.+?):((.+):)?([^ ]+) (.*)/i ) {
if ( $mail = $self->verify_connected_( $mail, $client, $1, $3 || 110 ) ) {
! # Pass through the APOP command with the actual user name for this server,
# and send the reply straight to the client
$self->echo_response_($mail, $client, "APOP $4 $5" );
} else {
! next;
}
***************
*** 231,235 ****
}
} else {
! last;
}
--- 228,232 ----
}
} else {
! next;
}
***************
*** 249,253 ****
}
} else {
! last;
}
--- 246,250 ----
}
} else {
! next;
}
***************
*** 349,357 ****
if ( $command =~ /CAPA/i ) {
! if ( $self->config_( 'secure_server' ) ne '' ) {
! if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'secure_server' ), $self->config_( 'secure_port' ) ) ) {
$self->echo_to_dot_( $mail, $client ) if ( $self->echo_response_($mail, $client, "CAPA" ) );
} else {
! last;
}
} else {
--- 346,354 ----
if ( $command =~ /CAPA/i ) {
! if ( $mail || $self->config_( 'secure_server' ) ne '' ) {
! if ( $mail || ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'secure_server' ), $self->config_( 'secure_port' ) ) ) ) {
$self->echo_to_dot_( $mail, $client ) if ( $self->echo_response_($mail, $client, "CAPA" ) );
} else {
! next;
}
} else {
***************
*** 481,485 ****
} else {
$self->tee_( $client, "-ERR unknown command or bad syntax$eol" );
! last;
}
}
--- 478,482 ----
} else {
$self->tee_( $client, "-ERR unknown command or bad syntax$eol" );
! next;
}
}
|