Private
Server IP : 195.201.23.43  /  Your IP : 3.135.229.106
Web Server : Apache
System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64
User : kdecoratie ( 1041)
PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /usr/share/webmin/sendmail/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /usr/share/webmin/sendmail/list_ports.cgi
#!/usr/bin/perl
# Show a list of TCP ports Sendmail uses

require './sendmail-lib.pl';
$access{'ports'} || &error($text{'ports_ecannot'});
&ui_print_header(undef, $text{'ports_title'}, "");

# Get and parse current setting
$conf = &get_sendmailcf();
foreach $dpo (&find_options("DaemonPortOptions", $conf)) {
	local %opts;
	foreach $o (split(/\s*,\s*/, $dpo->[1])) {
		if ($o =~ /^([^=]+)=(\S+)$/) {
			$opts{$1} = $2;
			}
		}
	push(@ports, \%opts);
	}

# Show table of ports
print &ui_form_start("save_ports.cgi");
print &ui_radio("ports_def", @ports ? 0 : 1,
	[ [ 1, $text{'ports_def1'} ], [ 0, $text{'ports_def0'} ] ])."<p>\n";
print &ui_columns_start([
	$text{'ports_name'},
	$text{'ports_addr'},
	$text{'ports_port'},
	$text{'ports_opts'},
	], 100);
$i = 0;
@tds = ( "valign=top", "valign=top", "valign=top" );
@known_opts = ( 'Name', 'Address', 'Port', 'Modifiers', 'Family' );
foreach $p (@ports, { }) {
	@cols = ( );
	foreach $k (@known_opts) {
		$fk = substr($k, 0, 1);
		if ($p->{$fk} && !$p->{$k}) {
			# Using first letter abbreviation only
			$p->{$k} = $p->{$fk};
			delete($p->{$fk});
			}
		}
	if ($p->{'Addr'}) {
		# Some systems use 'Addr' instead of 'Address'
		$p->{'Address'} = $p->{'Addr'};
		delete($p->{'Addr'});
		}
	push(@cols, &ui_textbox("name_$i", $p->{'Name'}, 10));
	push(@cols, &ui_opt_textbox("addr_$i", $p->{'Address'}, 15,
				    $text{'ports_all'}, $text{'ports_ip'}).
		    "<br>\n".
		    $text{'ports_family'}." ".
		    &ui_select("family_$i", $p->{'Family'},
			       [ [ '', $text{'default'} ],
				 [ 'inet', $text{'ports_inet'} ],
				 [ 'inet6', $text{'ports_inet6'} ] ]));
	push(@cols, &ui_opt_textbox("port_$i", $p->{'Port'}, 6,
				    $text{'default'}." (25)"));
	@mods = ( );
	foreach $m (@port_modifier_flags) {
		push(@mods, &ui_checkbox("mod_$i", $m, $text{'ports_mod_'.$m},
					 $p->{'Modifiers'} =~ /$m/));
		}
	push(@cols, &ui_grid_table(\@mods, 2));
	print &ui_columns_row(\@cols, \@tds);

	# Hidden field for other settings
	foreach $k (@known_opts) {
		delete($p->{$k});
		}
	print &ui_hidden("other_$i",
		join(",", map { $_."=".$p->{$_} } keys %$p));
	$i++;
	}
print &ui_columns_end();
print &ui_form_end([ [ undef, $text{'save'} ] ]);

&ui_print_footer("", $text{'index_return'});

Private