2 # Update a manually edited map file
4 require './postfix-lib.pl';
6 &error_setup($text{'manual_err'});
7 $access{'manual'} || &error($text{'manual_ecannot'});
8 @files = &get_maps_files(&get_real_value($in{'map_name'}));
9 &indexof($in{'file'}, @files) >= 0 || &error($text{'manual_efile'});
12 $in{'data'} =~ s/\r//g;
13 &open_lock_tempfile(FILE, ">$in{'file'}");
14 &print_tempfile(FILE, $in{'data'});
15 &close_tempfile(FILE);
18 ®enerate_map_table($in{'map_name'});
21 &webmin_log("manual", $in{'map_name'}.'s', $in{'file'});
22 &redirect_to_map_list($in{'map_name'});