default => 1,
},
hostname => {
- description => "Quarantine Host. Usefule if you run a Cluster and want users to connect to a specific host.",
+ description => "Quarantine Host. Useful if you run a Cluster and want users to connect to a specific host.",
type => 'string', format => 'address',
},
+ port => {
+ description => "Quarantine Port. Useful if you have a reverse proxy or port forwarding for the webinterface. Only used for the generated Spam report.",
+ type => 'integer',
+ minimum => 1,
+ maximum => 65535,
+ default => 8006,
+ },
+ protocol => {
+ description => "Quarantine Webinterface Protocol. Useful if you have a reverse proxy for the webinterface. Only used for the generated Spam report.",
+ type => 'string',
+ enum => [qw(http https)],
+ default => 'https',
+ },
mailfrom => {
description => "Text for 'From' header in daily spam report mails.",
type => 'string',
reportstyle => { optional => 1 },
viewimages => { optional => 1 },
allowhrefs => { optional => 1 },
+ port => { optional => 1 },
+ protocol => { optional => 1 },
};
}
my $mynetworks = [ '127.0.0.0/8', '[::1]/128' ];
if (my $int_net_cidr = PMG::Utils::find_local_network_for_ip($int_ip, 1)) {
- push @$mynetworks, $int_net_cidr;
+ if ($int_net_cidr =~ m/^($IPV6RE)\/(\d+)$/) {
+ push @$mynetworks, "[$1]/$2";
+ } else {
+ push @$mynetworks, $int_net_cidr;
+ }
} else {
if ($int_ip =~ m/^$IPV6RE$/) {
- push @$mynetworks, "$int_ip/128";
+ push @$mynetworks, "[$int_ip]/128";
} else {
push @$mynetworks, "$int_ip/32";
}
}
my $netlist = PVE::INotify::read_file('mynetworks');
- push @$mynetworks, keys %$netlist;
+ foreach my $cidr (keys %$netlist) {
+ if ($cidr =~ m/^($IPV6RE)\/(\d+)$/) {
+ push @$mynetworks, "[$1]/$2";
+ } else {
+ push @$mynetworks, $cidr;
+ }
+ }
push @$mynetworks, @$transportnets;
$self->get('mail', 'spf');
$vars->{postfix}->{usepolicy} = $usepolicy;
+ if ($int_ip =~ m/^$IPV6RE$/) {
+ $vars->{postfix}->{int_ip} = "[$int_ip]";
+ } else {
+ $vars->{postfix}->{int_ip} = $int_ip;
+ }
+
my $resolv = PVE::INotify::read_file('resolvconf');
$vars->{dns}->{hostname} = $nodename;