|
Server : Apache/2.2.2 (Fedora) System : Linux App1.pathumtani.go.th 2.6.20-1.2320.fc5smp #1 SMP Tue Jun 12 19:40:16 EDT 2007 i686 User : apache ( 48) PHP Version : 5.2.9 Disable Function : NONE Directory : /proc/self/root/usr/libexec/webmin/sendmail/ |
Upload File : |
#!/usr/bin/perl
# save_relay.cgi
# Save relay domains list
require './sendmail-lib.pl';
&ReadParseMime();
$access{'relay'} || &error($text{'relay_ecannot'});
&error_setup($text{'relay_err'});
&lock_file($config{'sendmail_cf'});
$conf = &get_sendmailcf();
&get_file_or_config($conf, "r", undef, \$rfile);
&lock_file($rfile) if ($rfile);
@dlist = split(/\s+/, $in{'dlist'});
foreach $d (@dlist) {
$d =~ /^[A-z0-9\-\.]+$/ ||
&error(&text('relay_edomain', $d));
}
@dlist = &unique(@dlist);
# Save relay domains
&save_file_or_config($conf, "R", \@dlist);
&flush_file_lines();
&unlock_file($config{'sendmail_cf'});
&unlock_file($rfile) if ($rfile);
&restart_sendmail();
&webmin_log("relay");
&redirect("");