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

📄 save_trusts.cgi

📁 Unix下基于Web的管理工具
💻 CGI
字号:
#!/usr/local/bin/perl# save_trusts.cgi# Save trusted users listrequire './sendmail-lib.pl';&ReadParse();$access{'trusts'} || &error($text{'trusts_ecannot'});&error_setup($text{'trusts_err'});$conf = &get_sendmailcf();@tlist = split(/\s+/, $in{'tlist'});foreach $u (@tlist) {	@uinfo = getpwnam($u);	@uinfo || &error(&text('trusts_euser', $u));	}@tlist = &unique(@tlist);# get old T directives@old = &find_type("T", $conf);if ($in{'ctfile'}) {	# If there is a .ct file, write all users to it and take any	# out of sendmail.cf	open(CT, "> $in{'ctfile'}");	foreach $u (@tlist) { print CT $u,"\n"; }	close(CT);	}else {	# Stick all users in sendmail.cf	foreach $u (@tlist) {		push(@new, { 'type' => 'T',			     'values' => [ $u ] });		}	}&save_directives($conf, \@old, \@new);&flush_file_lines();&restart_sendmail();&redirect("");

⌨️ 快捷键说明

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