Handle hostnames with upper-case letters
[webmin.git] / dovecot / save_manual.cgi
1 #!/usr/local/bin/perl
2 # Update the manually edited config file
3
4 require './dovecot-lib.pl';
5 &ReadParseMime();
6 &error_setup($text{'manual_err'});
7 $conf = &get_config();
8 @files = &unique(map { $_->{'file'} } @$conf);
9 &indexof($in{'file'}, @files) >= 0 || &error($text{'manual_efile'});
10
11 $in{'data'} =~ s/\r//g;
12 $in{'data'} =~ /\S/ || &error($text{'manual_edata'});
13
14 &open_lock_tempfile(DATA, ">$in{'file'}");
15 &print_tempfile(DATA, $in{'data'});
16 &close_tempfile(DATA);
17
18 &webmin_log("manual", undef, $in{'file'});
19 &redirect("");
20