⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 save_cgs.cgi

📁 Unix下基于Web的管理工具
💻 CGI
字号:
#!/usr/local/bin/perl# save_cgs.cgi# Save sendmail.cg listrequire './sendmail-lib.pl';&ReadParse();$access{'cgs'} || &error($text{'cgs_ecannot'});&error_setup($text{'cgs_err'});$conf = &get_sendmailcf();@dlist = split(/\s+/, $in{'dlist'});foreach $d (@dlist) {	$d =~ /^[A-z0-9\-\.]+$/ ||		&error(&text('cgs_ehost', $d));	&check_ipaddress($d) &&		&error(&text('cgs_eip', $d));	}@dlist = &unique(@dlist);# get old cw directives@old = grep { $_->{'value'} =~ /^G/ } &find_type("C", $conf);if ($in{'cgfile'}) {	# If there is a .cg file, write all domains to it and take any	# out of sendmail.cf	open(CG, "> $in{'cgfile'}");	foreach $d (@dlist) { print CG $d,"\n"; }	close(CG);	}else {	# Stick all domains in sendmail.cf	foreach $d (@dlist) {		push(@new, { 'type' => 'C',			     'values' => [ "G$d" ] });		}	}&save_directives($conf, \@old, \@new);&flush_file_lines();&restart_sendmail();&redirect("");

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -