The mynetworks template_var is written to postfix/main.cf, causing a
postfix restart on every change. Since mynetworks is a hash the order
of the networks potentially changes with every invocation. This shows
quite readily in clustered setups where pmgmirror writes the configs
and checks for changes once every 2 minutes.
fixes #2172
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
}
my $netlist = PVE::INotify::read_file('mynetworks');
- foreach my $cidr (keys %$netlist) {
+ foreach my $cidr (sort keys %$netlist) {
if ($cidr =~ m/^($IPV6RE)\/(\d+)$/) {
push @$mynetworks, "[$1]/$2";
} else {