From: <jgr...@us...> - 2003-03-25 05:25:04
|
Update of /cvsroot/popfile/engine/Proxy In directory sc8-pr-cvs1:/tmp/cvs-serv20897/Proxy Modified Files: NNTP.pm POP3.pm Proxy.pm SMTP.pm Log Message: Make the UI pluggable; make SMTP, NNTP and POP3 modules register and handle their own configuration UI; factor the HTTP code out of the UI and into own class; implement XML-RPC interface; make test suite allow selection of tests to run; change the way POPFile reports its startup; make the version string work Index: NNTP.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/NNTP.pm,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** NNTP.pm 19 Mar 2003 04:17:12 -0000 1.7 --- NNTP.pm 25 Mar 2003 05:24:55 -0000 1.8 *************** *** 67,70 **** --- 67,85 ---- $self->config_( 'separator', ':'); + # Tell the user interface module that we having a configuration + # item that needs a UI component + + $self->{ui__}->register_configuration_item( 'configuration', + 'nntp_port', + $self ); + + $self->{ui__}->register_configuration_item( 'configuration', + 'nntp_separator', + $self ); + + $self->{ui__}->register_configuration_item( 'security', + 'nntp_local', + $self ); + return 1; } *************** *** 122,126 **** if ($connection_state eq 'username needed') { ! # NOTE: This syntax is ambiguous if the NNTP username is a short (under 5 digit) string (eg, 32123). # If this is the case, run "perl popfile.pl -nntp_separator /" and change your kludged username --- 137,141 ---- if ($connection_state eq 'username needed') { ! # NOTE: This syntax is ambiguous if the NNTP username is a short (under 5 digit) string (eg, 32123). # If this is the case, run "perl popfile.pl -nntp_separator /" and change your kludged username *************** *** 128,132 **** my $user_command = '^ *AUTHINFO USER ([^:]+)(:([\d]{1,5}))?(\\' . $self->config_( 'separator' ) . '(.+))?'; ! if ( $command =~ /$user_command/i ) { my $server = $1; # hey, the port has to be in range at least --- 143,147 ---- my $user_command = '^ *AUTHINFO USER ([^:]+)(:([\d]{1,5}))?(\\' . $self->config_( 'separator' ) . '(.+))?'; ! if ( $command =~ /$user_command/i ) { my $server = $1; # hey, the port has to be in range at least *************** *** 295,296 **** --- 310,416 ---- $self->log_( "NNTP forked child done" ); } + + # --------------------------------------------------------------------------------------------- + # + # configure_item + # + # $name The name of the item being configured, was passed in by the call + # to register_configuration_item + # $language Reference to the hash holding the current language + # $session_key The current session key + # + # Must return the HTML for this item + # --------------------------------------------------------------------------------------------- + + sub configure_item + { + my ( $self, $name, $language, $session_key ) = @_; + + my $body; + + if ( $name eq 'nntp_port' ) { + $body .= "<form action=\"/configuration\">\n"; + $body .= "<label class=\"configurationLabel\" for=\"configPopPort\">$$language{Configuration_NNTPPort}:</label><br />\n"; + $body .= "<input name=\"nntp_port\" type=\"text\" id=\"configPopPort\" value=\"" . $self->config_( 'port' ) . "\" />\n"; + $body .= "<input type=\"submit\" class=\"submit\" name=\"update_nntp_port\" value=\"$$language{Apply}\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } + + # Separator Character widget + if ( $name eq 'nntp_separator' ) { + $body .= "\n<form action=\"/configuration\">\n"; + $body .= "<label class=\"configurationLabel\" for=\"configSeparator\">$$language{Configuration_NNTPSeparator}:</label><br />\n"; + $body .= "<input name=\"nntp_separator\" id=\"configSeparator\" type=\"text\" value=\"" . $self->config_( 'separator' ) . "\" />\n"; + $body .= "<input type=\"submit\" class=\"submit\" name=\"update_nntp_separator\" value=\"$$language{Apply}\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } + + if ( $name eq 'nntp_local' ) { + $body .= "<span class=\"securityLabel\">$$language{Security_NNTP}:</span><br />\n"; + + $body .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\"><tr><td nowrap=\"nowrap\">\n"; + if ( $self->config_( 'local' ) == 1 ) { + $body .= "<form class=\"securitySwitch\" action=\"/security\">\n"; + $body .= "<span class=\"securityWidgetStateOff\">$$language{Security_NoStealthMode}</span>\n"; + $body .= "<input type=\"submit\" class=\"toggleOn\" id=\"securityAcceptPOP3On\" name=\"toggle\" value=\"$$language{ChangeToYes}\" />\n"; + $body .= "<input type=\"hidden\" name=\"nntp_local\" value=\"1\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } else { + $body .= "<form class=\"securitySwitch\" action=\"/security\">\n"; + $body .= "<span class=\"securityWidgetStateOn\">$$language{Yes}</span>\n"; + $body .= "<input type=\"submit\" class=\"toggleOff\" id=\"securityAcceptPOP3Off\" name=\"toggle\" value=\"$$language{ChangeToNo} (Stealth Mode)\" />\n"; + $body .= "<input type=\"hidden\" name=\"nntp_local\" value=\"2\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } + $body .= "</td></tr></table>\n"; + } + + return $body; + } + + # --------------------------------------------------------------------------------------------- + # + # validate_item + # + # $name The name of the item being configured, was passed in by the call + # to register_configuration_item + # $language Reference to the hash holding the current language + # $form Hash containing all form items + # + # Must return the HTML for this item + # --------------------------------------------------------------------------------------------- + + sub validate_item + { + my ( $self, $name, $language, $form ) = @_; + + if ( $name eq 'nntp_port' ) { + if ( defined($$form{nntp_port}) ) { + if ( ( $$form{nntp_port} >= 1 ) && ( $$form{nntp_port} < 65536 ) ) { + $self->config_( 'port', $$form{nntp_port} ); + return '<blockquote>' . sprintf( $$language{Configuration_NNTPUpdate} . '</blockquote>' , $self->config_( 'port' ) ); + } else { + return "<blockquote><div class=\"error01\">$$language{Configuration_Error3}</div></blockquote>"; + } + } + } + + if ( $name eq 'nntp_separator' ) { + if ( defined($$form{nntp_separator}) ) { + if ( length($$form{nntp_separator}) == 1 ) { + $self->config_( 'separator', $$form{separator} ); + return '<blockquote>' . sprintf( $$language{Configuration_NNTPSepUpdate} . '</blockquote>' , $self->config_( 'separator' ) ); + } else { + return "<blockquote>\n<div class=\"error01\">\n$$language{Configuration_Error1}</div>\n</blockquote>\n"; + } + } + } + + if ( $name eq 'nntp_local' ) { + $self->config_( 'local', $$form{nntp_local}-1 ) if ( defined($$form{nntp_local}) ); + } + + return ''; + } + + 1; Index: POP3.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/POP3.pm,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** POP3.pm 8 Mar 2003 00:51:50 -0000 1.49 --- POP3.pm 25 Mar 2003 05:24:55 -0000 1.50 *************** *** 71,74 **** --- 71,97 ---- $self->config_( 'separator', ':' ); + # Tell the user interface module that we having a configuration + # item that needs a UI component + + $self->{ui__}->register_configuration_item( 'configuration', + 'pop3_port', + $self ); + + $self->{ui__}->register_configuration_item( 'configuration', + 'pop3_separator', + $self ); + + $self->{ui__}->register_configuration_item( 'security', + 'pop3_local', + $self ); + + $self->{ui__}->register_configuration_item( 'chain', + 'pop3_secure_server', + $self ); + + $self->{ui__}->register_configuration_item( 'chain', + 'pop3_secure_server_port', + $self ); + return 1; } *************** *** 95,99 **** # Tell the client that we are ready for commands and identify our version number ! $self->tee_( $client, "+OK POP3 POPFile (vTODO.TODO.TODO) server ready$eol" ); # Retrieve commands from the client and process them until the client disconnects or --- 118,122 ---- # Tell the client that we are ready for commands and identify our version number ! $self->tee_( $client, "+OK POP3 POPFile ($self->{version_}) server ready$eol" ); # Retrieve commands from the client and process them until the client disconnects or *************** *** 345,348 **** --- 368,510 ---- $self->log_( "POP3 forked child done" ); + } + + # --------------------------------------------------------------------------------------------- + # + # configure_item + # + # $name The name of the item being configured, was passed in by the call + # to register_configuration_item + # $language Reference to the hash holding the current language + # $session_key The current session key + # + # Must return the HTML for this item + # --------------------------------------------------------------------------------------------- + + sub configure_item + { + my ( $self, $name, $language, $session_key ) = @_; + + my $body; + + # POP3 Listen Port widget + if ( $name eq 'pop3_port' ) { + $body .= "<form action=\"/configuration\">\n"; + $body .= "<label class=\"configurationLabel\" for=\"configPopPort\">$$language{Configuration_POP3Port}:</label><br />\n"; + $body .= "<input name=\"pop3_port\" type=\"text\" id=\"configPopPort\" value=\"" . $self->config_( 'port' ) . "\" />\n"; + $body .= "<input type=\"submit\" class=\"submit\" name=\"update_pop3_port\" value=\"$$language{Apply}\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } + + # Separator Character widget + if ( $name eq 'pop3_separator' ) { + $body .= "\n<form action=\"/configuration\">\n"; + $body .= "<label class=\"configurationLabel\" for=\"configSeparator\">$$language{Configuration_POP3Separator}:</label><br />\n"; + $body .= "<input name=\"pop3_separator\" id=\"configSeparator\" type=\"text\" value=\"" . $self->config_( 'separator' ) . "\" />\n"; + $body .= "<input type=\"submit\" class=\"submit\" name=\"update_pop3_separator\" value=\"$$language{Apply}\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } + + # Accept POP3 from Remote Machines widget + if ( $name eq 'pop3_local' ) { + $body .= "<span class=\"securityLabel\">$$language{Security_POP3}:</span><br />\n"; + + $body .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\"><tr><td nowrap=\"nowrap\">\n"; + if ( $self->config_( 'local' ) == 1 ) { + $body .= "<form class=\"securitySwitch\" action=\"/security\">\n"; + $body .= "<span class=\"securityWidgetStateOff\">$$language{Security_NoStealthMode}</span>\n"; + $body .= "<input type=\"submit\" class=\"toggleOn\" id=\"securityAcceptPOP3On\" name=\"toggle\" value=\"$$language{ChangeToYes}\" />\n"; + $body .= "<input type=\"hidden\" name=\"pop3_local\" value=\"1\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } else { + $body .= "<form class=\"securitySwitch\" action=\"/security\">\n"; + $body .= "<span class=\"securityWidgetStateOn\">$$language{Yes}</span>\n"; + $body .= "<input type=\"submit\" class=\"toggleOff\" id=\"securityAcceptPOP3Off\" name=\"toggle\" value=\"$$language{ChangeToNo} (Stealth Mode)\" />\n"; + $body .= "<input type=\"hidden\" name=\"pop3_local\" value=\"2\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } + $body .= "</td></tr></table>\n"; + } + + # Secure Server widget + if ( $name eq 'pop3_secure_server' ) { + $body .= "<form action=\"/security\">\n"; + $body .= "<label class=\"securityLabel\" for=\"securitySecureServer\">$$language{Security_SecureServer}:</label><br />\n"; + $body .= "<input type=\"text\" name=\"server\" id=\"securitySecureServer\" value=\"" . $self->config_( 'secure_server' ) . "\" />\n"; + $body .= "<input type=\"submit\" class=\"submit\" name=\"update_server\" value=\"$$language{Apply}\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } + + # Secure Port widget + if ( $name eq 'pop3_secure_server_port' ) { + $body .= "<form action=\"/security\">\n"; + $body .= "<label class=\"securityLabel\" for=\"securitySecurePort\">$$language{Security_SecurePort}:</label><br />\n"; + $body .= "<input type=\"text\" name=\"sport\" id=\"securitySecurePort\" value=\"" . $self->config_( 'secure_port' ) . "\" />\n"; + $body .= "<input type=\"submit\" class=\"submit\" name=\"update_sport\" value=\"$$language{Apply}\" />\n"; + $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; + } + + return $body; + } + + # --------------------------------------------------------------------------------------------- + # + # validate_item + # + # $name The name of the item being configured, was passed in by the call + # to register_configuration_item + # $language Reference to the hash holding the current language + # $form Hash containing all form items + # + # Must return the HTML for this item + # --------------------------------------------------------------------------------------------- + + sub validate_item + { + my ( $self, $name, $language, $form ) = @_; + + if ( $name eq 'pop3_port' ) { + if ( defined($$form{pop3_port}) ) { + if ( ( $$form{pop3_port} >= 1 ) && ( $$form{pop3_port} < 65536 ) ) { + $self->config_( 'port', $$form{pop3_port} ); + return '<blockquote>' . sprintf( $$language{Configuration_POP3Update} . '</blockquote>' , $self->config_( 'port' ) ); + } else { + return "<blockquote><div class=\"error01\">$$language{Configuration_Error3}</div></blockquote>"; + } + } + } + + if ( $name eq 'pop3_separator' ) { + if ( defined($$form{pop3_separator}) ) { + if ( length($$form{pop3_separator}) == 1 ) { + $self->config_( 'separator', $$form{separator} ); + return '<blockquote>' . sprintf( $$language{Configuration_POP3SepUpdate} . '</blockquote>' , $self->config_( 'separator' ) ); + } else { + return "<blockquote>\n<div class=\"error01\">\n$$language{Configuration_Error1}</div>\n</blockquote>\n"; + } + } + } + + if ( $name eq 'pop3_local' ) { + $self->config_( 'local', $$form{pop3_local}-1 ) if ( defined($$form{pop3_local}) ); + } + + if ( $name eq 'pop3_secure_server' ) { + $self->config_( 'secure_server', $$form{server} ) if ( defined($$form{server}) ); + return sprintf( "<blockquote>" . $$language{Security_SecureServerUpdate} . "</blockquote>", $self->config_( 'secure_server' ) ) if ( defined($$form{server}) ); + } + + if ( $name eq 'pop3_secure_server_port' ) { + if ( defined($$form{sport}) ) { + if ( ( $$form{sport} >= 1 ) && ( $$form{sport} < 65536 ) ) { + $self->config_( 'secure_port', $$form{sport} ); + return sprintf( "<blockquote>" . $$language{Security_SecurePortUpdate} . "</blockquote>", $self->config_( 'secure_port' ) ) if ( defined($$form{sport}) ); + } else { + return "<blockquote><div class=\"error01\">$$language{Security_Error1}</div></blockquote>"; + } + } + } + + return ''; } Index: Proxy.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/Proxy.pm,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** Proxy.pm 23 Mar 2003 04:04:53 -0000 1.11 --- Proxy.pm 25 Mar 2003 05:24:56 -0000 1.12 *************** *** 92,99 **** if ( !defined( $self->{server__} ) ) { print <<EOM; ! \nCouldn't start the $self->name() proxy because POPFile could not bind to the ! POP3 listen port $self->config_( 'port' ). This could be because there is another service using that port or because you do not have the right privileges on your system (On Unix systems this can happen if you are not root --- 92,101 ---- if ( !defined( $self->{server__} ) ) { + my $port = $self->config_( 'port' ); + my $name = $self->name(); print <<EOM; ! \nCouldn't start the $name proxy because POPFile could not bind to the ! listen port $port. This could be because there is another service using that port or because you do not have the right privileges on your system (On Unix systems this can happen if you are not root Index: SMTP.pm =================================================================== RCS file: /cvsroot/popfile/engine/Proxy/SMTP.pm,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** SMTP.pm 21 Mar 2003 05:33:12 -0000 1.8 --- SMTP.pm 25 Mar 2003 05:24:56 -0000 1.9 *************** *** 68,71 **** --- 68,90 ---- $self->config_( 'local', 1 ); + # Tell the user interface module that we having a configuration + # item that needs a UI component + + $self->{ui__}->register_configuration_item( 'configuration', + 'smtp_port', + $self ); + + $self->{ui__}->register_configuration_item( 'security', + 'smtp_local', + $self ); + + $self->{ui__}->register_configuration_item( 'chain', + 'smtp_server', + $self ); + + $self->{ui__}->register_configuration_item( 'chain', + 'smtp_server_port', + $self ); + return 1; } *************** *** 92,96 **** # Tell the client that we are ready for commands and identify our version number ! $self->tee_( $client, "220 SMTP POPFile (vTODO.TODO.TODO) server ready$eol" ); # Retrieve commands from the client and process them until the client disconnects or --- 111,115 ---- # Tell the client that we are ready for commands and identify our version number ! $self->tee_( $client, "220 SMTP POPFile ($self->{version_}) server ready$eol" ); # Retrieve commands from the client and process them until the client disconnects or *************** *** 109,116 **** if ( $self->config_( 'chain_server' ) ) { if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'chain_server' ), $self->config_( 'chain_port' ) ) ) { ! $self->smtp_echo_response_( $mail, $client, $command ); ! } else { last; --- 128,135 ---- if ( $self->config_( 'chain_server' ) ) { if ( $mail = $self->verify_connected_( $mail, $client, $self->config_( 'chain_server' ), $self->config_( 'chain_port' ) ) ) { ! $self->smtp_echo_response_( $mail, $client, $command ); ! } else { last; *************** *** 200,211 **** # # --------------------------------------------------------------------------------------------- - - - sub smtp_echo_response_ { my ($self, $mail, $client, $command) = @_; my $response = $self->get_response_( $mail, $client, $command ); ! if ( $response =~ /^[23]\d\d-/ ) { $self->echo_to_regexp_($mail, $client, qr/^\d\d\d /, 1); --- 219,227 ---- # # --------------------------------------------------------------------------------------------- sub smtp_echo_response_ { my ($self, $mail, $client, $command) = @_; my $response = $self->get_response_( $mail, $client, $command ); ! if ( $response =~ /^[23]\d\d-/ ) { $self->echo_to_regexp_($mail, $client, qr/^\d\d\d /, 1); *************** *** 214,218 **** } ! 1; --- 230,347 ---- } ! # --------------------------------------------------------------------------------------------- ! # ! # configure_item ! # ! # $name The name of the item being configured, was passed in by the call ! # to register_configuration_item ! # $language Reference to the hash holding the current language ! # $session_key The current session key ! # ! # Must return the HTML for this item ! # --------------------------------------------------------------------------------------------- ! ! sub configure_item ! { ! my ( $self, $name, $language, $session_key ) = @_; ! ! my $body; ! ! if ( $name eq 'smtp_port' ) { ! $body .= "<form action=\"/configuration\">\n"; ! $body .= "<label class=\"configurationLabel\" for=\"configPopPort\">$$language{Configuration_SMTPPort}:</label><br />\n"; ! $body .= "<input name=\"smtp_port\" type=\"text\" id=\"configPopPort\" value=\"" . $self->config_( 'port' ) . "\" />\n"; ! $body .= "<input type=\"submit\" class=\"submit\" name=\"update_smtp_port\" value=\"$$language{Apply}\" />\n"; ! $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; ! } ! ! if ( $name eq 'smtp_local' ) { ! $body .= "<span class=\"securityLabel\">$$language{Security_SMTP}:</span><br />\n"; ! ! $body .= "<table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" summary=\"\"><tr><td nowrap=\"nowrap\">\n"; ! if ( $self->config_( 'local' ) == 1 ) { ! $body .= "<form class=\"securitySwitch\" action=\"/security\">\n"; ! $body .= "<span class=\"securityWidgetStateOff\">$$language{Security_NoStealthMode}</span>\n"; ! $body .= "<input type=\"submit\" class=\"toggleOn\" id=\"securityAcceptPOP3On\" name=\"toggle\" value=\"$$language{ChangeToYes}\" />\n"; ! $body .= "<input type=\"hidden\" name=\"smtp_local\" value=\"1\" />\n"; ! $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; ! } else { ! $body .= "<form class=\"securitySwitch\" action=\"/security\">\n"; ! $body .= "<span class=\"securityWidgetStateOn\">$$language{Yes}</span>\n"; ! $body .= "<input type=\"submit\" class=\"toggleOff\" id=\"securityAcceptPOP3Off\" name=\"toggle\" value=\"$$language{ChangeToNo} (Stealth Mode)\" />\n"; ! $body .= "<input type=\"hidden\" name=\"smtp_local\" value=\"2\" />\n"; ! $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; ! } ! $body .= "</td></tr></table>\n"; ! } ! ! if ( $name eq 'smtp_server' ) { ! $body .= "<form action=\"/security\">\n"; ! $body .= "<label class=\"securityLabel\" for=\"securitySecureServer\">$$language{Security_SMTPServer}:</label><br />\n"; ! $body .= "<input type=\"text\" name=\"smtp_chain_server\" id=\"securitySecureServer\" value=\"" . $self->config_( 'chain_server' ) . "\" />\n"; ! $body .= "<input type=\"submit\" class=\"submit\" name=\"update_smtp_server\" value=\"$$language{Apply}\" />\n"; ! $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; ! } ! ! if ( $name eq 'smtp_server_port' ) { ! $body .= "<form action=\"/security\">\n"; ! $body .= "<label class=\"securityLabel\" for=\"securitySecurePort\">$$language{Security_SMTPPort}:</label><br />\n"; ! $body .= "<input type=\"text\" name=\"smtp_chain_server_port\" id=\"securitySecurePort\" value=\"" . $self->config_( 'chain_port' ) . "\" />\n"; ! $body .= "<input type=\"submit\" class=\"submit\" name=\"update_smtp_server_port\" value=\"$$language{Apply}\" />\n"; ! $body .= "<input type=\"hidden\" name=\"session\" value=\"$session_key\" />\n</form>\n"; ! } ! ! return $body; ! } ! ! # --------------------------------------------------------------------------------------------- ! # ! # validate_item ! # ! # $name The name of the item being configured, was passed in by the call ! # to register_configuration_item ! # $language Reference to the hash holding the current language ! # $form Hash containing all form items ! # ! # Must return the HTML for this item ! # --------------------------------------------------------------------------------------------- ! ! sub validate_item ! { ! my ( $self, $name, $language, $form ) = @_; ! ! if ( $name eq 'smtp_port' ) { ! if ( defined($$form{smtp_port}) ) { ! if ( ( $$form{smtp_port} >= 1 ) && ( $$form{smtp_port} < 65536 ) ) { ! $self->config_( 'port', $$form{smtp_port} ); ! return '<blockquote>' . sprintf( $$language{Configuration_POP3Update} . '</blockquote>' , $self->config_( 'port' ) ); ! } else { ! return "<blockquote><div class=\"error01\">$$language{Configuration_Error3}</div></blockquote>"; ! } ! } ! } ! ! if ( $name eq 'smtp_local' ) { ! $self->config_( 'local', $$form{smtp_local}-1 ) if ( defined($$form{smtp_local}) ); ! } ! ! if ( $name eq 'smtp_server' ) { ! $self->config_( 'chain_server', $$form{smtp_chain_server} ) if ( defined($$form{smtp_chain_server}) ); ! return sprintf( "<blockquote>" . $$language{Security_SMTPServerUpdate} . "</blockquote>", $self->config_( 'chain_server' ) ) if ( defined($$form{smtp_chain_server}) ); ! } ! ! 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} ); ! return sprintf( "<blockquote>" . $$language{Security_SMTPPortUpdate} . "</blockquote>", $self->config_( 'chain_port' ) ) if ( defined($$form{smtp_chain_chain_port}) ); ! } else { ! return "<blockquote><div class=\"error01\">$$language{Security_Error1}</div></blockquote>"; ! } ! } ! } ! ! return ''; ! } 1; |