From: naoki i. <am...@us...> - 2008-04-25 16:27:12
|
Update of /cvsroot/popfile/engine/Proxy In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20326/Proxy Modified Files: NNTP.pm POP3.pm Proxy.pm SMTP.pm Added Files: POP3S.pm Log Message: Change Log 1. UI and POP3 proxy are now able to be connected via SSL 2. New Proxy module 'Proxy::POP3S' (POP3 over SSL) 3. New global options: GLOBAL_cert_file, GLOBAL_key_file, GLOBAL_ca_file 4. New html options: html_https_enabled, html_https_port 5. Secure cookies are used when accessed to the HTTPS server Proxy/POP3S.pm Proxy/POP3.pm Proxy/Proxy.pm UI/HTML.pm UI/HTTP.pm POPFile/Configuration.pm Classifier/Bayes.pm skins/default/pop3s-configuration-panel.thtml skins/default/pop3s-security-panel.thtml tests/Configuration.tst The new Proxy::POP3S module supports connections via SSL. It has following options: pop3s_enabled Enable(=1)/Disable(=0;default) the module pop3s_force_fork Enable(=1)/Disable(=0) forking pop3s_local Allow(=1)/Disallow(=0) connections from remote pop3s_port POP3S proxy port(default:995) pop3s_socks_port SOCKS proxy port pop3s_socks_server SOCKS proxy server pop3s_welcome_string POP3S proxy welcome string The other POP3 options (e.g. pop3_separator) are same as the Proxy::POP3 module. Here's the new options of the UI::HTML module: html_https_enabled Enable(=1)/Disable(=0;default) the HTTPS server html_https_port HTTPS server port(default:8443) The new global options: GLOBAL_cert_file Location of the certification file of the server GLOBAL_key_file Location of the key file of the server GLOBAL_ca_file Location of the CA file NOTE: I've implemented POP3S and the HTTPS in the different way. I've made a new module Proxy::POP3S for POP3S, but I don't make the module for HTTPS. This is because I think making the new module for HTTPS ( UI:HTTPS ? ) is very hard. BUG: Concurrent POP3S connections cause an error in some environment: SSL3 alert write:fatal:bad record mac 7664:error:1408F119:SSL routines:SSL3_GET_RECORD:decryption failed or bad record mac:s3_pkt.c:424: 6. AUTH PLAIN support Proxy/POP3.pm 7. Supress the verbose status messages on the administration tab 8. Add some status messages (administration tab) UI/HTML.pm UI/XMLRPC.pm Proxy/Proxy.pm Proxy/POP3.pm Proxy/NNTP.pm Proxy/SMTP.pm languages/English.msg languages/Nihongo.msg tests/TestPOP3.tst tests/TestHTML.script 9. The message files are no longer cached by the web browser UI/HTTP.pm 10. if html_allow_javascript == 0, don't disable the radio buttons skins/default/administration-page.thtml skins/default/pop3-security-panel.thtml skins/default/nntp-security-local.thtml skins/default/smtp-security-local.thtml skins/default/xmlrpc-local.thtml 11. Minor updates of the skins skins/smtp-chain-server.thtml skins/smtp-chain-server-port.thtml (merged to the above file) skins/pop3-chain-panel.thtml 12. Source code cleanup UI/HTML.pm UI/HTTP.pm UI/XMLRPC.pm Proxy/POP3.pm Proxy/Proxy.pm Proxy/NNTP.pm Proxy/SMTP.pm Classifier/Bayes.pm Classifier/MailParse.pm POPFile/Configuration.pm POPFile/Database.pm POPFile/History.pm POPFile/Loader.pm POPFile/Logger.pm POPFile/Module.pm POPFile/MQ.pm POPFile/Mutex.pm Add some 'PROFILE BLOCK START' and 'PROFILE BLOCK STOP's. These are used by Devel::TestCoverage to get the correct coverage. 13. Add some tests tests/TestBayes.tst Current state of the test suite: TestBayesScript PASS TestBayes PASS TestConfiguration PASS * TestHistory PASS TestHTML PASS * TestHTTP PASS TestIMAP PASS TestInsertScript PASS * TestLogger PASS TestMailParse PASS TestModule PASS TestMQ PASS TestMutex PASS TestPipeScript PASS TestPOP3 PASS TestProxy PASS TestWordMangle PASS TestXMLRPC PASS * : TODO : needs to add tests for multi user support Index: POP3.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v retrieving revision 1.122 retrieving revision 1.123 diff -C2 -d -r1.122 -r1.123 *** POP3.pm 18 Apr 2008 12:48:52 -0000 1.122 --- POP3.pm 25 Apr 2008 16:26:19 -0000 1.123 *************** *** 4,7 **** --- 4,8 ---- use Proxy::Proxy; use Digest::MD5; + use MIME::Base64 qw(decode_base64); @ISA = ("Proxy::Proxy"); *************** *** 83,87 **** # Enabled by default ! $self->config_( 'enabled', 1); # By default we don't fork on Windows --- 84,88 ---- # Enabled by default ! $self->config_( 'enabled', 1 ); # By default we don't fork on Windows *************** *** 106,111 **** # The welcome string from the proxy is configurable ! $self->config_( 'welcome_string', ! "POP3 POPFile ($self->{version_}) server ready" ); return $self->SUPER::initialize(); --- 107,112 ---- # The welcome string from the proxy is configurable ! $self->config_( 'welcome_string', # PROFILE BLOCK START ! "POP3 POPFile ($self->{version_}) server ready" ); # PROFILE BLOCK STOP return $self->SUPER::initialize(); *************** *** 189,198 **** # version number ! $self->tee_( $client, "+OK " . $self->config_( 'welcome_string' ) . ! "$eol" ); # Compile some configurable regexp's once ! my $s = $self->config_( 'separator' ); $s =~ s/(\$|\@|\[|\]|\(|\)|\||\?|\*|\.|\^|\+)/\\$1/; --- 190,199 ---- # version number ! $self->tee_( $client, "+OK " . $self->config_( 'welcome_string' ) . # PROFILE BLOCK START ! "$eol" ); # PROFILE BLOCK STOP # Compile some configurable regexp's once ! my $s = $self->module_config_( 'pop3', 'separator' ); $s =~ s/(\$|\@|\[|\]|\(|\)|\||\?|\*|\.|\^|\+)/\\$1/; *************** *** 238,249 **** if ( $command =~ /$transparent/ ) { ! if ( $self->config_( 'secure_server' ) ne '' ) { ! $token = $self->config_( 'secure_server' ). ":$1"; $self->log_( 2, "Set transparent proxy token : '$token'" ); ! if ( $mail = $self->verify_connected_( $mail, $client, ! $self->config_( 'secure_server' ), ! $self->config_( 'secure_port' ), ! $self->config_( 'secure_ssl' ) ) ) { last if ($self->echo_response_($mail, $client, $command) == 2 ); } else { --- 239,250 ---- if ( $command =~ /$transparent/ ) { ! if ( $self->module_config_( 'pop3', 'secure_server' ) ne '' ) { ! $token = $self->module_config_( 'pop3', 'secure_server' ). ":$1"; $self->log_( 2, "Set transparent proxy token : '$token'" ); ! if ( $mail = $self->verify_connected_( $mail, $client, # PROFILE BLOCK START ! $self->module_config_( 'pop3', 'secure_server' ), ! $self->module_config_( 'pop3', 'secure_port' ), ! $self->module_config_( 'pop3', 'secure_ssl' ) ) ) { # PROFILE BLOCK STOP last if ($self->echo_response_($mail, $client, $command) == 2 ); } else { *************** *** 267,272 **** $port = $ssl?995:110 if ( !defined( $port ) ); ! if ( $mail = $self->verify_connected_( $mail, $client, ! $host, $port, $ssl ) ) { if ( defined( $options ) && ( $options =~ /apop/i ) ) { --- 268,273 ---- $port = $ssl?995:110 if ( !defined( $port ) ); ! if ( $mail = $self->verify_connected_( $mail, $client, # PROFILE BLOCK START ! $host, $port, $ssl ) ) { # PROFILE BLOCK STOP if ( defined( $options ) && ( $options =~ /apop/i ) ) { *************** *** 341,349 **** $self->log_( 2, "digest='$md5hex'" ); ! my ($response, $ok) = $self->get_response_( $mail, $client, ! "APOP $self->{apop_user__} $md5hex", 0, 1 ); ! if ( ( $ok == 1 ) && ! ( $response =~ /$self->{good_response_}/ ) ) { # authentication OK, toss the hello response and --- 342,350 ---- $self->log_( 2, "digest='$md5hex'" ); ! my ($response, $ok) = # PROFILE BLOCK START $self->get_response_( $mail, $client, ! "APOP $self->{apop_user__} $md5hex", 0, 1 ); # PROFILE BLOCK STOP ! if ( ( $ok == 1 ) && # PROFILE BLOCK START ! ( $response =~ /$self->{good_response_}/ ) ) { # PROFILE BLOCK STOP # authentication OK, toss the hello response and *************** *** 360,369 **** } } else { ! last if ($self->echo_response_($mail, $client, ! $command) == 2 ); ! $session = $self->get_session_key_( $token ); ! if ( !defined( $session ) ) { ! $self->tee_( $client, "-ERR Unknown account $token$eol" ); ! last; } } --- 361,372 ---- } } else { ! my $ok = $self->echo_response_( $mail, $client, $command ); ! last if ( $ok == 2 ); ! if ( $ok == 0 ) { ! $session = $self->get_session_key_( $token ); ! if ( !defined( $session ) ) { ! $self->tee_( $client, "-ERR Unknown account $token$eol" ); ! last; ! } } } *************** *** 376,381 **** if ( $command =~ /$apop_command/io ) { ! $self->tee_( $client, ! "-ERR APOP not supported between mail client and POPFile.$eol" ); # TODO: Consider implementing a host:port:username:secret --- 379,384 ---- if ( $command =~ /$apop_command/io ) { ! $self->tee_( $client, # PROFILE BLOCK START ! "-ERR APOP not supported between mail client and POPFile.$eol" ); # PROFILE BLOCK STOP # TODO: Consider implementing a host:port:username:secret *************** *** 388,396 **** if ( $command =~ /AUTH ([^ ]+)/ ) { ! if ( $self->config_( 'secure_server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, ! $self->config_( 'secure_server' ), ! $self->config_( 'secure_port' ), ! $self->config_( 'secure_ssl' ) ) ) { # Loop until we get -ERR or +OK --- 391,413 ---- if ( $command =~ /AUTH ([^ ]+)/ ) { ! if ( $self->module_config_( 'pop3', 'secure_server' ) ne '' ) { ! my $mechanism = $1; ! ! $token = $self->module_config_( 'pop3', 'secure_server' ); ! if ( $self->global_config_( 'single_user' ) != 1 ) { ! if ( $mechanism !~ /^PLAIN$/i ) { ! # TODO : support other mechanisms ! ! # When AUTH command is used, we have to find out who is ! # accessing to POPFile. ! ! $self->tee_( $client, "-ERR AUTH $mechanism is not supported in the multi user mode$eol" ); ! } ! } ! ! if ( $mail = $self->verify_connected_( $mail, $client, # PROFILE BLOCK START ! $self->module_config_( 'pop3', 'secure_server' ), ! $self->module_config_( 'pop3', 'secure_port' ), ! $self->module_config_( 'pop3', 'secure_ssl' ) ) ) { # PROFILE BLOCK STOP # Loop until we get -ERR or +OK *************** *** 402,407 **** --- 419,439 ---- $auth = <$client>; $auth =~ s/(\015|\012)$//g; + + if ( $mechanism =~ /^PLAIN$/i ) { + my ( $authid, $userid, $password ) = + split( "\00", decode_base64( $auth ) ); + $token .= ':' . $userid if ( defined($userid) ); + } + ( $response, $ok ) = $self->get_response_( $mail, $client, $auth ); } + + if ( $response =~ /\+OK/ ) { + $session = $self->get_session_key_( $token ); + if ( !defined( $session ) ) { + $self->tee_( $client, "-ERR Unknown account $token$eol" ); + last; + } + } } else { next; *************** *** 415,423 **** if ( $command =~ /AUTH/ ) { ! if ( $self->config_( 'secure_server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, ! $self->config_( 'secure_server' ), ! $self->config_( 'secure_port' ), ! $self->config_( 'secure_ssl' ) ) ) { my $response = $self->echo_response_($mail, $client, "AUTH" ); last if ( $response == 2 ); --- 447,455 ---- if ( $command =~ /AUTH/ ) { ! if ( $self->module_config_( 'pop3', 'secure_server' ) ne '' ) { ! if ( $mail = $self->verify_connected_( $mail, $client, # PROFILE BLOCK START ! $self->module_config_( 'pop3', 'secure_server' ), ! $self->module_config_( 'pop3', 'secure_port' ), ! $self->module_config_( 'pop3', 'secure_ssl' ) ) ) { # PROFILE BLOCK STOP my $response = $self->echo_response_($mail, $client, "AUTH" ); last if ( $response == 2 ); *************** *** 498,504 **** if ( $2 ne '99999999' ) { ! if ( $self->config_( 'toptoo' ) == 1 ) { ! my $response = ! $self->echo_response_( $mail, $client, "RETR $count" ); last if ( $response == 2 ); if ( $response == 0 ) { --- 530,536 ---- if ( $2 ne '99999999' ) { ! if ( $self->module_config_( 'pop3', 'toptoo' ) == 1 ) { ! my $response = # PROFILE BLOCK START ! $self->echo_response_( $mail, $client, "RETR $count" ); # PROFILE BLOCK STOP last if ( $response == 2 ); if ( $response == 0 ) { *************** *** 507,513 **** # file for later RETR's ! my ( $class, $slot ) = $self->classifier_()->classify_and_modify( ! $session, $mail, $client, 0, '', 0, 0 ); $downloaded{$count} = $slot; --- 539,545 ---- # file for later RETR's ! my ( $class, $slot ) = # PROFILE BLOCK START $self->classifier_()->classify_and_modify( ! $session, $mail, $client, 0, '', 0, 0 ); # PROFILE BLOCK STOP $downloaded{$count} = $slot; *************** *** 518,524 **** # by the RETR ! $response = $self->echo_response_( $mail, $client, ! $command, 1 ); last if ( $response == 2 ); if ( $response == 0 ) { --- 550,556 ---- # by the RETR ! $response = # PROFILE BLOCK START $self->echo_response_( $mail, $client, ! $command, 1 ); # PROFILE BLOCK STOP last if ( $response == 2 ); if ( $response == 0 ) { *************** *** 527,537 **** # saving, echoing to client ! $self->classifier_()->classify_and_modify( ! $session, $mail, $client, 1, $class, $slot, 1 ); } } } else { ! my $response = ! $self->echo_response_( $mail, $client, $command ); last if ( $response == 2 ); if ( $response == 0 ) { --- 559,569 ---- # saving, echoing to client ! $self->classifier_()->classify_and_modify( # PROFILE BLOCK START ! $session, $mail, $client, 1, $class, $slot, 1 ); # PROFILE BLOCK STOP } } } else { ! my $response = # PROFILE BLOCK START ! $self->echo_response_( $mail, $client, $command ); # PROFILE BLOCK STOP last if ( $response == 2 ); if ( $response == 0 ) { *************** *** 550,558 **** 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->config_( 'secure_ssl' ) ) ) ) { my $response = $self->echo_response_($mail, $client, "CAPA" ); last if ( $response == 2 ); --- 582,590 ---- if ( $command =~ /CAPA/i ) { ! if ( $mail || $self->module_config_( 'pop3', 'secure_server' ) ne '' ) { ! if ( $mail || ( $mail = $self->verify_connected_( $mail, $client, # PROFILE BLOCK START ! $self->module_config_( 'pop3', 'secure_server' ), ! $self->module_config_( 'pop3', 'secure_port' ), ! $self->module_config_( 'pop3', 'secure_ssl' ) ) ) ) { # PROFILE BLOCK STOP my $response = $self->echo_response_($mail, $client, "CAPA" ); last if ( $response == 2 ); *************** *** 601,607 **** my $file; ! if ( defined($downloaded{$count}) && ( $file = $self->history_()->get_slot_file( $downloaded{$count} ) ) && ! (open RETRFILE, "<$file") ) { # act like a network stream --- 633,639 ---- my $file; ! if ( defined($downloaded{$count}) && # PROFILE BLOCK START ( $file = $self->history_()->get_slot_file( $downloaded{$count} ) ) && ! (open RETRFILE, "<$file") ) { # PROFILE BLOCK STOP # act like a network stream *************** *** 619,625 **** # Load the last classification ! my ( $id, $from, $to, $cc, $subject, $date, $hash, $inserted, $bucket, $reclassified ) = ! $self->history_()->get_slot_fields( $downloaded{$count}, $session ); if ( $bucket ne 'unknown class' ) { --- 651,657 ---- # Load the last classification ! my ( $id, $from, $to, $cc, $subject, # PROFILE BLOCK START $date, $hash, $inserted, $bucket, $reclassified ) = ! $self->history_()->get_slot_fields( $downloaded{$count}, $session ); # PROFILE BLOCK STOP if ( $bucket ne 'unknown class' ) { *************** *** 766,772 **** if ( $name eq 'pop3_configuration' ) { if ( defined($$form{pop3_port}) ) { ! if ( ( $$form{pop3_port} =~ /^\d+$/ ) && ( $$form{pop3_port} >= 1 ) && ( $$form{pop3_port} < 65536 ) ) { ! $self->config_( 'port', $$form{pop3_port} ); ! $status_message .= sprintf( $$language{Configuration_POP3Update}, $self->config_( 'port' ) ) . "\n"; } else { $error_message .= $$language{Configuration_Error3} . "\n"; --- 798,810 ---- if ( $name eq 'pop3_configuration' ) { if ( defined($$form{pop3_port}) ) { ! if ( ( $$form{pop3_port} =~ /^\d+$/ ) && # PROFILE BLOCK START ! ( $$form{pop3_port} >= 1 ) && ! ( $$form{pop3_port} < 65536 ) ) { # PROFILE BLOCK STOP ! if ( $self->config_( 'port' ) ne $$form{pop3_port} ) { ! $self->config_( 'port', $$form{pop3_port} ); ! $status_message .= sprintf( # PROFILE BLOCK START ! $$language{Configuration_POP3Update}, ! $self->config_( 'port' ) ) . "\n"; # PROFILE BLOCK STOP ! } } else { $error_message .= $$language{Configuration_Error3} . "\n"; *************** *** 776,781 **** if ( defined($$form{pop3_separator}) ) { if ( length($$form{pop3_separator}) == 1 ) { ! $self->config_( 'separator', $$form{pop3_separator} ); ! $status_message .= sprintf( $$language{Configuration_POP3SepUpdate}, $self->config_( 'separator' ) ) . "\n"; } else { $error_message .= $$language{Configuration_Error1} . "\n"; --- 814,823 ---- if ( defined($$form{pop3_separator}) ) { if ( length($$form{pop3_separator}) == 1 ) { ! if ( $self->config_( 'separator' ) ne $$form{pop3_separator} ) { ! $self->config_( 'separator', $$form{pop3_separator} ); ! $status_message .= sprintf( # PROFILE BLOCK START ! $$language{Configuration_POP3SepUpdate}, ! $self->config_( 'separator' ) ) . "\n"; # PROFILE BLOCK STOP ! } } else { $error_message .= $$language{Configuration_Error1} . "\n"; *************** *** 785,797 **** if ( defined($$form{update_pop3_configuration}) ) { if ( $$form{pop3_force_fork} ) { ! $self->config_( 'force_fork', 1 ); } else { ! $self->config_( 'force_fork', 0 ); } } - $status_message =~ s/\n$// if ( defined( $status_message ) ); - $error_message =~ s/\n$// if ( defined( $error_message) ); - return( $status_message, $error_message ); } --- 827,842 ---- if ( defined($$form{update_pop3_configuration}) ) { if ( $$form{pop3_force_fork} ) { ! if ( $self->config_( 'force_fork' ) ne 1 ) { ! $self->config_( 'force_fork', 1 ); ! $status_message .= $$language{Configuration_POPForkEnabled}; ! } } else { ! if ( $self->config_( 'force_fork' ) ne 0 ) { ! $self->config_( 'force_fork', 0 ); ! $status_message .= $$language{Configuration_POPForkDisabled}; ! } } } return( $status_message, $error_message ); } *************** *** 799,808 **** if ( $name eq 'pop3_security' ) { if ( $$form{serveropt_pop3} ) { ! $self->config_( 'local', 0 ); ! $status_message = $$language{Security_ServerModeUpdatePOP3}; } else { ! $self->config_( 'local', 1 ); ! $status_message = $$language{Security_StealthModeUpdatePOP3}; } --- 844,857 ---- if ( $name eq 'pop3_security' ) { if ( $$form{serveropt_pop3} ) { ! if ( $self->config_( 'local' ) ne 0 ) { ! $self->config_( 'local', 0 ); ! $status_message = $$language{Security_ServerModeUpdatePOP3}; ! } } else { ! if ( $self->config_( 'local' ) ne 1 ) { ! $self->config_( 'local', 1 ); ! $status_message = $$language{Security_StealthModeUpdatePOP3}; ! } } *************** *** 812,823 **** if ( $name eq 'pop3_chain' ) { if ( defined( $$form{server} ) ) { ! $self->config_( 'secure_server', $$form{server} ); ! $status_message .= sprintf( $$language{Security_SecureServerUpdate}, $self->config_( 'secure_server' ) ) . "\n"; } if ( defined($$form{sport}) ) { ! if ( ( $$form{sport} =~ /^\d+$/ ) && ( $$form{sport} >= 1 ) && ( $$form{sport} < 65536 ) ) { ! $self->config_( 'secure_port', $$form{sport} ); ! $status_message .= sprintf( $$language{Security_SecurePortUpdate}, $self->config_( 'secure_port' ) ) . "\n"; } else { $error_message .= $$language{Security_Error1}; --- 861,882 ---- if ( $name eq 'pop3_chain' ) { if ( defined( $$form{server} ) ) { ! if ( $self->config_( 'secure_server' ) ne $$form{server} ) { ! $self->config_( 'secure_server', $$form{server} ); ! $status_message .= sprintf( # PROFILE BLOCK START ! $$language{Security_SecureServerUpdate}, ! $self->config_( 'secure_server' ) ) . "\n"; # PROFILE BLOCK STOP ! } } if ( defined($$form{sport}) ) { ! if ( ( $$form{sport} =~ /^\d+$/ ) && # PROFILE BLOCK START ! ( $$form{sport} >= 1 ) && ! ( $$form{sport} < 65536 ) ) { # PROFILE BLOCK STOP ! if ( $self->config_( 'secure_port' ) ne $$form{sport} ) { ! $self->config_( 'secure_port', $$form{sport} ); ! $status_message .= sprintf( # PROFILE BLOCK START ! $$language{Security_SecurePortUpdate}, ! $self->config_( 'secure_port' ) ) . "\n"; # PROFILE BLOCK STOP ! } } else { $error_message .= $$language{Security_Error1}; *************** *** 827,841 **** if ( defined($$form{update_server}) ) { if ( $$form{sssl} ) { ! $self->config_( 'secure_ssl', 1 ); ! $status_message .= $$language{Security_SecureServerUseSSLOn} . "\n"; } else { ! $self->config_( 'secure_ssl', 0 ); ! $status_message .= $$language{Security_SecureServerUseSSLOff} . "\n"; } } - $status_message =~ s/\n$// if ( defined( $status_message ) ); - $error_message =~ s/\n$// if ( defined( $error_message) ); - return( $status_message, $error_message ); } --- 886,901 ---- if ( defined($$form{update_server}) ) { if ( $$form{sssl} ) { ! if ( $self->config_( 'secure_ssl' ) ne 1 ) { ! $self->config_( 'secure_ssl', 1 ); ! $status_message .= $$language{Security_SecureServerUseSSLOn} . "\n"; ! } } else { ! if ( $self->config_( 'secure_ssl' ) ne 0 ) { ! $self->config_( 'secure_ssl', 0 ); ! $status_message .= $$language{Security_SecureServerUseSSLOff} . "\n"; ! } } } return( $status_message, $error_message ); } *************** *** 844,845 **** --- 904,906 ---- } + 1; Index: NNTP.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/NNTP.pm,v retrieving revision 1.45 retrieving revision 1.46 diff -C2 -d -r1.45 -r1.46 *** NNTP.pm 18 Apr 2008 12:41:49 -0000 1.45 --- NNTP.pm 25 Apr 2008 16:26:19 -0000 1.46 *************** *** 95,100 **** # The welcome string from the proxy is configurable ! $self->config_( 'welcome_string', ! "NNTP POPFile ($self->{version_}) server ready" ); if ( !$self->SUPER::initialize() ) { --- 95,100 ---- # The welcome string from the proxy is configurable ! $self->config_( 'welcome_string', # PROFILE BLOCK START ! "NNTP POPFile ($self->{version_}) server ready" ); # PROFILE BLOCK STOP if ( !$self->SUPER::initialize() ) { *************** *** 127,139 **** # item that needs a UI component ! $self->register_configuration_item_( 'configuration', 'nntp_config', 'nntp-configuration.thtml', ! $self ); ! $self->register_configuration_item_( 'security', 'nntp_local', 'nntp-security-local.thtml', ! $self ); if ( $self->config_( 'welcome_string' ) =~ /^NNTP POPFile \(v\d+\.\d+\.\d+\) server ready$/ ) { # PROFILE BLOCK START --- 127,139 ---- # item that needs a UI component ! $self->register_configuration_item_( 'configuration', # PROFILE BLOCK START 'nntp_config', 'nntp-configuration.thtml', ! $self ); # PROFILE BLOCK STOP ! $self->register_configuration_item_( 'security', # PROFILE BLOCK START 'nntp_local', 'nntp-security-local.thtml', ! $self ); # PROFILE BLOCK STOP if ( $self->config_( 'welcome_string' ) =~ /^NNTP POPFile \(v\d+\.\d+\.\d+\) server ready$/ ) { # PROFILE BLOCK START *************** *** 198,203 **** if ( $command =~ /^ *QUIT/i ) { if ( $news ) { ! last if ( $self->echo_response_( $news, $client, $command ) == ! 2 ); close $news; } else { --- 198,203 ---- if ( $command =~ /^ *QUIT/i ) { if ( $news ) { ! last if ( $self->echo_response_( $news, $client, $command ) == # PROFILE BLOCK START ! 2 ); # PROFILE BLOCK STOP close $news; } else { *************** *** 215,220 **** # then be server[:port][/username]) ! my $user_command = '^ *AUTHINFO USER ([^:]+)(:([\d]{1,5}))?(\\' . ! $self->config_( 'separator' ) . '(.+))?'; if ( $command =~ /$user_command/i ) { --- 215,220 ---- # then be server[:port][/username]) ! my $user_command = '^ *AUTHINFO USER ([^:]+)(:([\d]{1,5}))?(\\' . # PROFILE BLOCK START ! $self->config_( 'separator' ) . '(.+))?'; # PROFILE BLOCK STOP if ( $command =~ /$user_command/i ) { *************** *** 227,232 **** if ( $server ne '' ) { ! if ( $news = $self->verify_connected_( $news, $client, ! $server, $port || 119 ) ) { if (defined $username) { --- 227,232 ---- if ( $server ne '' ) { ! if ( $news = $self->verify_connected_( $news, $client, # PROFILE BLOCK START ! $server, $port || 119 ) ) { # PROFILE BLOCK STOP if (defined $username) { *************** *** 236,241 **** # straight to the client ! $self->get_response_( $news, $client, ! 'AUTHINFO USER ' . $username ); $connection_state = "password needed"; } else { --- 236,241 ---- # straight to the client ! $self->get_response_( $news, $client, # PROFILE BLOCK START ! 'AUTHINFO USER ' . $username ); # PROFILE BLOCK STOP $connection_state = "password needed"; } else { *************** *** 250,255 **** } } else { ! $self->tee_( $client, ! "482 Authentication rejected server name not specified in AUTHINFO USER command$eol" ); last; } --- 250,255 ---- } } else { ! $self->tee_( $client, # PROFILE BLOCK START ! "482 Authentication rejected server name not specified in AUTHINFO USER command$eol" ); # PROFILE BLOCK STOP last; } *************** *** 266,271 **** } elsif ( $connection_state eq "password needed" ) { if ($command =~ /^ *AUTHINFO PASS (.*)/i) { ! my ( $response, $ok ) = $self->get_response_( $news, $client, ! $command); if ($response =~ /^281 .*/) { --- 266,271 ---- } elsif ( $connection_state eq "password needed" ) { if ($command =~ /^ *AUTHINFO PASS (.*)/i) { ! my ( $response, $ok ) = $self->get_response_( $news, $client, # PROFILE BLOCK START ! $command); # PROFILE BLOCK STOP if ($response =~ /^281 .*/) { *************** *** 300,311 **** if ( $command =~ /^ *ARTICLE (.*)/i ) { ! my ( $response, $ok ) = $self->get_response_( $news, $client, ! $command); if ( $response =~ /^220 (.*) (.*)$/i) { $count += 1; my ( $class, $history_file ) = ! $self->classifier_()->classify_and_modify( $session, ! $news, $client, 0, '', 0 ); } --- 300,311 ---- if ( $command =~ /^ *ARTICLE (.*)/i ) { ! my ( $response, $ok ) = $self->get_response_( $news, $client, # PROFILE BLOCK START ! $command); # PROFILE BLOCK STOP if ( $response =~ /^220 (.*) (.*)$/i) { $count += 1; my ( $class, $history_file ) = ! $self->classifier_()->classify_and_modify( $session, # PROFILE BLOCK START ! $news, $client, 0, '', 0 ); # PROFILE BLOCK STOP } *************** *** 332,337 **** if ( $ command =~ /^ *(HELP)/i ) { ! my ( $response, $ok ) = $self->get_response_( $news, $client, ! $command); if ( $response =~ /^1\d\d/ ) { $self->echo_to_dot_( $news, $client, 0 ); --- 332,337 ---- if ( $ command =~ /^ *(HELP)/i ) { ! my ( $response, $ok ) = $self->get_response_( $news, $client, # PROFILE BLOCK START ! $command); # PROFILE BLOCK STOP if ( $response =~ /^1\d\d/ ) { $self->echo_to_dot_( $news, $client, 0 ); *************** *** 351,356 **** if ( $command =~ /^ *(IHAVE|POST|XRELPIC)/i ) { ! my ( $response, $ok ) = $self->get_response_( $news, $client, ! $command); # 3xx (300) series response indicates multi-line text --- 351,356 ---- if ( $command =~ /^ *(IHAVE|POST|XRELPIC)/i ) { ! my ( $response, $ok ) = $self->get_response_( $news, $client, # PROFILE BLOCK START ! $command); # PROFILE BLOCK STOP # 3xx (300) series response indicates multi-line text *************** *** 454,473 **** if ( defined $$form{nntp_port} ) { ! if ( ( $$form{nntp_port} =~ /^\d+$/ ) && ( $$form{nntp_port} >= 1 ) && ( $$form{nntp_port} < 65536 ) ) { ! $self->config_( 'port', $$form{nntp_port} ); ! $status = sprintf $$language{Configuration_NNTPUpdate}, $self->config_( 'port' ); ! } else { ! $error = $$language{Configuration_Error3}; ! } } if ( defined $$form{nntp_separator} ) { if ( length($$form{nntp_separator}) == 1 ) { ! $self->config_( 'separator', $$form{nntp_separator} ); ! $status .= "\n" if ( defined( $status ) ); ! $status .= sprintf $$language{Configuration_NNTPSepUpdate}, $self->config_( 'separator' ); } else { ! $error .= "\n" if ( defined( $error ) ); ! $error .= $$language{Configuration_Error1}; } } --- 454,481 ---- if ( defined $$form{nntp_port} ) { ! if ( ( $$form{nntp_port} =~ /^\d+$/ ) && # PROFILE BLOCK START ! ( $$form{nntp_port} >= 1 ) && ! ( $$form{nntp_port} < 65536 ) ) { # PROFILE BLOCK STOP ! if ( $self->config_( 'port' ) ne $$form{nntp_port} ) { ! $self->config_( 'port', $$form{nntp_port} ); ! $status = sprintf( # PROFILE BLOCK START ! $$language{Configuration_NNTPUpdate}, ! $self->config_( 'port' ) ) . "\n"; # PROFILE BLOCK STOP ! } ! } else { ! $error = $$language{Configuration_Error3} . "\n"; ! } } if ( defined $$form{nntp_separator} ) { if ( length($$form{nntp_separator}) == 1 ) { ! if ( $self->config_( 'separator' ) ne $$form{nntp_separator} ) { ! $self->config_( 'separator', $$form{nntp_separator} ); ! $status .= sprintf( # PROFILE BLOCK START ! $$language{Configuration_NNTPSepUpdate}, ! $self->config_( 'separator' ) ) . "\n"; # PROFILE BLOCK STOP ! } } else { ! $error .= $$language{Configuration_Error1} . "\n"; } } *************** *** 475,481 **** if ( defined $$form{update_nntp_configuration} ) { if ( $$form{nntp_force_fork} ) { ! $self->config_( 'force_fork', 1 ); } else { ! $self->config_( 'force_fork', 0 ); } } --- 483,495 ---- if ( defined $$form{update_nntp_configuration} ) { if ( $$form{nntp_force_fork} ) { ! if ( $self->config_( 'force_fork' ) ne 1 ) { ! $self->config_( 'force_fork', 1 ); ! $status .= $$language{Configuration_NNTPForkEnabled}; ! } } else { ! if ( $self->config_( 'force_fork' ) ne 0 ) { ! $self->config_( 'force_fork', 0 ); ! $status .= $$language{Configuration_NNTPForkDisabled}; ! } } } *************** *** 486,494 **** if ( $name eq 'nntp_local' ) { if ( $form->{serveropt_nntp} ) { ! $self->config_( 'local', 0 ); ! $status = $$language{Security_ServerModeUpdateNNTP}; } else { ! $self->config_( 'local', 1 ); ! $status = $$language{Security_StealthModeUpdateNNTP}; } return( $status, $error ); --- 500,512 ---- if ( $name eq 'nntp_local' ) { if ( $form->{serveropt_nntp} ) { ! if ( $self->config_( 'local' ) ne 0 ) { ! $self->config_( 'local', 0 ); ! $status = $$language{Security_ServerModeUpdateNNTP}; ! } } else { ! if ( $self->config_( 'local' ) ne 1 ) { ! $self->config_( 'local', 1 ); ! $status = $$language{Security_StealthModeUpdateNNTP}; ! } } return( $status, $error ); Index: Proxy.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/Proxy.pm,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** Proxy.pm 16 Nov 2006 19:12:51 -0000 1.65 --- Proxy.pm 25 Apr 2008 16:26:20 -0000 1.66 *************** *** 123,133 **** # Open the socket used to receive request for proxy service ! $self->{server__} = IO::Socket::INET->new( Proto => 'tcp', # PROFILE BLOCK START ($self->config_( 'local' ) || 0) == 1 ? (LocalAddr => 'localhost') : (), LocalPort => $self->config_( 'port' ), Listen => SOMAXCONN, Reuse => 1 ); # PROFILE BLOCK STOP ! ! my $name = $self->name(); if ( !defined( $self->{server__} ) ) { --- 123,146 ---- # Open the socket used to receive request for proxy service ! my $name = $self->name(); ! ! if ( $name eq 'pop3s' ) { ! require IO::Socket::SSL; ! # $IO::Socket::SSL::DEBUG = 4; ! $self->{server__} = IO::Socket::SSL->new( Proto => 'tcp', # PROFILE BLOCK START ($self->config_( 'local' ) || 0) == 1 ? (LocalAddr => 'localhost') : (), LocalPort => $self->config_( 'port' ), Listen => SOMAXCONN, + SSL_cert_file => $self->get_user_path_( $self->global_config_( 'cert_file' ) ), + SSL_key_file => $self->get_user_path_( $self->global_config_( 'key_file' ) ), + SSL_ca_file => $self->get_user_path_( $self->global_config_( 'ca_file' ) ), Reuse => 1 ); # PROFILE BLOCK STOP ! } else { ! $self->{server__} = IO::Socket::INET->new( Proto => 'tcp', # PROFILE BLOCK START ! ($self->config_( 'local' ) || 0) == 1 ? (LocalAddr => 'localhost') : (), ! LocalPort => $self->config_( 'port' ), ! Listen => SOMAXCONN, ! Reuse => 1 ); # PROFILE BLOCK STOP ! } if ( !defined( $self->{server__} ) ) { *************** *** 251,255 **** } } ! } else { pipe my $reader, my $writer; --- 264,268 ---- } } ! } else { pipe my $reader, my $writer; *************** *** 283,287 **** $self->SUPER::forked( $writer ); ! close $self->{server__}; } --- 296,300 ---- $self->SUPER::forked( $writer ); ! close $self->{server__} if ( $self->name() ne 'pop3s' ); } *************** *** 453,457 **** if ( $response =~ /$self->{good_response_}/ ) { return 0; ! } else { return 1; } --- 466,470 ---- if ( $response =~ /$self->{good_response_}/ ) { return 0; ! } else { return 1; } *************** *** 477,484 **** my ( $self, $token ) = @_; ! return $self->classifier_()->get_session_key_from_token( $self->{api_session__}, $self->name(), ! $token ); } --- 490,497 ---- my ( $self, $token ) = @_; ! return $self->classifier_()->get_session_key_from_token( # PROFILE BLOCK START $self->{api_session__}, $self->name(), ! $token ); # PROFILE BLOCK STOP } *************** *** 533,539 **** ConnectAddr => $hostname, ConnectPort => $port ); # PROFILE BLOCK STOP ! $self->log_( 0, "Attempting to connect to socks server at " . $self->config_( 'socks_server' ) . ":" ! . ProxyPort => $self->config_( 'socks_port' ) ); } else { if ( $ssl ) { --- 546,552 ---- ConnectAddr => $hostname, ConnectPort => $port ); # PROFILE BLOCK STOP ! $self->log_( 0, "Attempting to connect to socks server at " # PROFILE BLOCK START . $self->config_( 'socks_server' ) . ":" ! . ProxyPort => $self->config_( 'socks_port' ) ); # PROFILE BLOCK STOP } else { if ( $ssl ) { *************** *** 543,549 **** PeerAddr => $hostname, PeerPort => $port ); # PROFILE BLOCK STOP ! $self->log_( 0, "Attempting to connect to SSL server at " ! . "$hostname:$port" ); ! } else { $mail = IO::Socket::INET->new( # PROFILE BLOCK START --- 556,562 ---- PeerAddr => $hostname, PeerPort => $port ); # PROFILE BLOCK STOP ! $self->log_( 0, "Attempting to connect to SSL server at " # PROFILE BLOCK START ! . "$hostname:$port" ); # PROFILE BLOCK STOP ! } else { $mail = IO::Socket::INET->new( # PROFILE BLOCK START *************** *** 551,556 **** PeerAddr => $hostname, PeerPort => $port ); # PROFILE BLOCK STOP ! $self->log_( 0, "Attempting to connect to POP server at " ! . "$hostname:$port" ); } } --- 564,569 ---- PeerAddr => $hostname, PeerPort => $port ); # PROFILE BLOCK STOP ! $self->log_( 0, "Attempting to connect to POP server at " # PROFILE BLOCK START ! . "$hostname:$port" ); # PROFILE BLOCK STOP } } *************** *** 663,669 **** if ( $name eq $me . "_socks_configuration" ) { if ( defined($$form{"$me" . "_socks_port"}) ) { ! if ( ( $$form{"$me" . "_socks_port"} >= 1 ) && ( $$form{"$me" . "_socks_port"} < 65536 ) ) { ! $self->config_( 'socks_port', $$form{"$me" . "_socks_port"} ); ! $status = sprintf( $$language{Configuration_SOCKSPortUpdate}, $self->config_( 'socks_port' ) ); } else { $error = $$language{Configuration_Error8}; --- 676,688 ---- if ( $name eq $me . "_socks_configuration" ) { if ( defined($$form{"$me" . "_socks_port"}) ) { ! if ( ( $$form{"$me" . "_socks_port"} =~ /^\d+$/ ) && # PROFILE BLOCK START ! ( $$form{"$me" . "_socks_port"} >= 1 ) && ! ( $$form{"$me" . "_socks_port"} < 65536 ) ) { # PROFILE BLOCK STOP ! if ( $self->config_( 'socks_port' ) ne $$form{"$me" . "_socks_port"} ) { ! $self->config_( 'socks_port', $$form{"$me" . "_socks_port"} ); ! $status = sprintf( # PROFILE BLOCK START ! $$language{Configuration_SOCKSPortUpdate}, ! $self->config_( 'socks_port' ) ); # PROFILE BLOCK STOP ! } } else { $error = $$language{Configuration_Error8}; *************** *** 672,678 **** if ( defined($$form{"$me" . "_socks_server"}) ) { ! $self->config_( 'socks_server', $$form{"$me" . "_socks_server"} ); ! $status .= "\n" if (defined $status); ! $status .= sprintf( $$language{Configuration_SOCKSServerUpdate}, $self->config_( 'socks_server' ) ); } } --- 691,701 ---- if ( defined($$form{"$me" . "_socks_server"}) ) { ! if ( $self->config_( 'socks_server' ) ne $$form{"$me" . "_socks_server"} ) { ! $self->config_( 'socks_server', $$form{"$me" . "_socks_server"} ); ! $status .= "\n" if (defined $status); ! $status .= sprintf( # PROFILE BLOCK START ! $$language{Configuration_SOCKSServerUpdate}, ! $self->config_( 'socks_server' ) ); # PROFILE BLOCK STOP ! } } } Index: SMTP.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/SMTP.pm,v retrieving revision 1.46 retrieving revision 1.47 diff -C2 -d -r1.46 -r1.47 *** SMTP.pm 18 Apr 2008 12:41:49 -0000 1.46 --- SMTP.pm 25 Apr 2008 16:26:20 -0000 1.47 *************** *** 115,137 **** # item that needs a UI component ! $self->register_configuration_item_( 'configuration', 'smtp_fork_and_port', 'smtp-configuration.thtml', ! $self ); ! $self->register_configuration_item_( 'security', 'smtp_local', 'smtp-security-local.thtml', ! $self ); ! $self->register_configuration_item_( 'chain', 'smtp_server', 'smtp-chain-server.thtml', ! $self ); ! ! $self->register_configuration_item_( 'chain', ! 'smtp_server_port', ! 'smtp-chain-server-port.thtml', ! $self ); if ( $self->config_( 'welcome_string' ) =~ /^SMTP POPFile \(v\d+\.\d+\.\d+\) welcome$/ ) { # PROFILE BLOCK START --- 115,132 ---- # item that needs a UI component ! $self->register_configuration_item_( 'configuration', # PROFILE BLOCK START 'smtp_fork_and_port', 'smtp-configuration.thtml', ! $self ); # PROFILE BLOCK STOP ! $self->register_configuration_item_( 'security', # PROFILE BLOCK START 'smtp_local', 'smtp-security-local.thtml', ! $self ); # PROFILE BLOCK STOP ! $self->register_configuration_item_( 'chain', # PROFILE BLOCK START 'smtp_server', 'smtp-chain-server.thtml', ! $self ); # PROFILE BLOCK STOP if ( $self->config_( 'welcome_string' ) =~ /^SMTP POPFile \(v\d+\.\d+\.\d+\) welcome$/ ) { # PROFILE BLOCK START *************** *** 235,239 **** } ! if ( ( $command =~ /MAIL FROM:/i ) || ( $command =~ /RCPT TO:/i ) || ( $command =~ /VRFY/i ) || --- 230,234 ---- } ! if ( ( $command =~ /MAIL FROM:/i ) || # PROFILE BLOCK START ( $command =~ /RCPT TO:/i ) || ( $command =~ /VRFY/i ) || *************** *** 241,245 **** ( $command =~ /NOOP/i ) || ( $command =~ /HELP/i ) || ! ( $command =~ /RSET/i ) ) { $self->smtp_echo_response_( $mail, $client, $command ); next; --- 236,240 ---- ( $command =~ /NOOP/i ) || ( $command =~ /HELP/i ) || ! ( $command =~ /RSET/i ) ) { # PROFILE BLOCK STOP $self->smtp_echo_response_( $mail, $client, $command ); next; *************** *** 351,357 **** if ( $name eq 'smtp_server' ) { $templ->param( 'smtp_chain_server' => $self->config_( 'chain_server' ) ); - } - - if ( $name eq 'smtp_server_port' ) { $templ->param( 'smtp_chain_port' => $self->config_( 'chain_port' ) ); } --- 346,349 ---- *************** *** 383,399 **** if ( defined($$form{update_smtp_configuration}) ) { if ( $$form{smtp_force_fork} ) { ! $self->config_( 'force_fork', 1 ); } else { ! $self->config_( 'force_fork', 0 ); } } if ( defined($$form{smtp_port}) ) { ! if ( ( $$form{smtp_port} =~ /^\d+$/ ) && ( $$form{smtp_port} >= 1 ) && ( $$form{smtp_port} < 65536 ) ) { ! $self->config_( 'port', $$form{smtp_port} ); ! $status = sprintf( $$language{Configuration_SMTPUpdate}, $self->config_( 'port' ) ); ! } else { $error = $$language{Configuration_Error3}; ! } } return( $status, $error ); --- 375,403 ---- if ( defined($$form{update_smtp_configuration}) ) { if ( $$form{smtp_force_fork} ) { ! if ( $self->config_( 'force_fork' ) ne 1 ) { ! $self->config_( 'force_fork', 1 ); ! $status = $$language{Configuration_SMTPForkEnabled} . "\n"; ! } } else { ! if ( $self->config_( 'force_fork' ) ne 0 ) { ! $self->config_( 'force_fork', 0 ); ! $status = $$language{Configuration_SMTPForkDisabled} . "\n"; ! } } } if ( defined($$form{smtp_port}) ) { ! if ( ( $$form{smtp_port} =~ /^\d+$/ ) && # PROFILE BLOCK START ! ( $$form{smtp_port} >= 1 ) && ! ( $$form{smtp_port} < 65536 ) ) { # PROFILE BLOCK STOP ! if ( $self->config_( 'port' ) ne $$form{smtp_port} ) { ! $self->config_( 'port', $$form{smtp_port} ); ! $status .= sprintf( # PROFILE BLOCK START ! $$language{Configuration_SMTPUpdate}, ! $self->config_( 'port' ) ); # PROFILE BLOCK STOP ! } ! } else { $error = $$language{Configuration_Error3}; ! } } return( $status, $error ); *************** *** 402,410 **** if ( $name eq 'smtp_local' ) { if ( $form->{serveropt_smtp} ) { ! $self->config_( 'local', 0 ); ! $status = $$language{Security_ServerModeUpdateSMTP}; } else { ! $self->config_( 'local', 1 ); ! $status = $$language{Security_StealthModeUpdateSMTP}; } return ( $status, $error ); --- 406,418 ---- if ( $name eq 'smtp_local' ) { if ( $form->{serveropt_smtp} ) { ! if ( $self->config_( 'local' ) ne 0 ) { ! $self->config_( 'local', 0 ); ! $status = $$language{Security_ServerModeUpdateSMTP}; ! } } else { ! if ( $self->config_( 'local' ) ne 1 ) { ! $self->config_( 'local', 1 ); ! $status = $$language{Security_StealthModeUpdateSMTP}; ! } } return ( $status, $error ); *************** *** 413,428 **** if ( $name eq 'smtp_server' ) { if ( defined $$form{smtp_chain_server} ) { ! $self->config_( 'chain_server', $$form{smtp_chain_server} ); ! $status = sprintf( $$language{Security_SMTPServerUpdate}, $self->config_( 'chain_server' ) ); } - return( $status, $error ); - } - if ( $name eq 'smtp_server_port' ) { if ( defined $$form{smtp_chain_server_port} ) { ! if ( ( $$form{smtp_chain_server_port} >= 1 ) && ( $$form{smtp_chain_server_port} < 65536 ) ) { ! $self->config_( 'chain_port', $$form{smtp_chain_server_port} ); ! $status = sprintf( $$language{Security_SMTPPortUpdate}, $self->config_( 'chain_port' ) ) } else { $error = $$language{Security_Error1}; --- 421,443 ---- if ( $name eq 'smtp_server' ) { if ( defined $$form{smtp_chain_server} ) { ! if ( $self->config_( 'chain_server' ) ne $$form{smtp_chain_server} ) { ! $self->config_( 'chain_server', $$form{smtp_chain_server} ); ! $status = sprintf( # PROFILE BLOCK START ! $$language{Security_SMTPServerUpdate}, ! $self->config_( 'chain_server' ) ) . "\n"; # PROFILE BLOCK STOP ! } } if ( defined $$form{smtp_chain_server_port} ) { ! if ( ( $$form{smtp_chain_server_port} =~ /^\d+$/ ) && # PROFILE BLOCK START ! ( $$form{smtp_chain_server_port} >= 1 ) && ! ( $$form{smtp_chain_server_port} < 65536 ) ) { # PROFILE BLOCK STOP ! if ( $self->config_( 'chain_port' ) ne $$form{smtp_chain_server_port} ) { ! $self->config_( 'chain_port', $$form{smtp_chain_server_port} ); ! $status .= sprintf( # PROFILE BLOCK START ! $$language{Security_SMTPPortUpdate}, ! $self->config_( 'chain_port' ) ); # PROFILE BLOCK STOP ! } } else { $error = $$language{Security_Error1}; *************** *** 436,439 **** 1; - - --- 451,452 ---- --- NEW FILE: POP3S.pm --- # POPFILE LOADABLE MODULE 4 package Proxy::POP3S; use Proxy::Proxy; use Proxy::POP3; use Digest::MD5; @ISA = ("Proxy::Proxy"); #@ISA = ("Proxy::POP3"); # ---------------------------------------------------------------------------- # # This module handles proxying the POP3 protocol for POPFile. # # Copyright (c) 2001-2006 John Graham-Cumming # # This file is part of POPFile # # POPFile is free software; you can redistribute it and/or modify it # under the terms of version 2 of the GNU General Public License as # published by the Free Software Foundation. # # POPFile is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES... [truncated message content] |