Handle hostnames with upper-case letters
[webmin.git] / qmailadmin / save_rcpts.cgi
1 #!/usr/local/bin/perl
2 # save_rcpts.cgi
3 # Save the list of accepted domains
4
5 require './qmail-lib.pl';
6 &ReadParseMime();
7
8 if ($in{'rcpts_def'}) {
9         &save_control_file("rcpthosts", undef);
10         }
11 else {
12         $in{'rcpts'} =~ s/\r//g;
13         @dlist = split(/\s+/, $in{'rcpts'});
14         &save_control_file("rcpthosts", \@dlist);
15         }
16 $in{'rcpts2'} =~ s/\r//g;
17 if ($in{'rcpts2'}) {
18         @dlist2 = split(/\s+/, $in{'rcpts2'});
19         &save_control_file("morercpthosts", \@dlist2);
20         &system_logged("$qmail_bin_dir/qmail-newmrh >/dev/null 2>&1");
21         }
22 else {
23         &save_control_file("morercpthosts", undef);
24         }
25 &webmin_log("rcpts", undef, undef, \%in);
26 &redirect("");
27