| Server IP : 37.9.174.138 / Your IP : 216.73.216.117 Web Server : Apache System : Linux vps6.backend.sk 6.12.100+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.100-1 (2026-07-30) x86_64 User : ftpuser ( 1001) PHP Version : 8.4.24 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/postfix/ |
Upload File : |
#!/usr/bin/perl
# Update a manually edited config file
require './postfix-lib.pl'; ## no critic
use strict;
use warnings;
our (%access, @files, %in, %text);
&error_setup($text{'cmanual_err'});
$access{'manual'} || &error($text{'cmanual_ecannot'});
&ReadParseMime();
# Work out the file
@files = &get_all_config_files();
&indexof($in{'file'}, @files) >= 0 || &error($text{'cmanual_efile'});
$in{'data'} =~ s/\r//g;
if ($in{'file'} eq $files[0]) {
$in{'data'} =~ /\S/ || &error($text{'cmanual_edata'});
}
# Write to it
my $datafh = "DATA";
&open_lock_tempfile($datafh, ">$in{'file'}");
&print_tempfile($datafh, $in{'data'});
&close_tempfile($datafh);
&webmin_log("manual", undef, $in{'file'});
&redirect("");