$item->{spaminfo} = $ref->{info};
$item->{file} = $ref->{file};
- my $basehref = "https://$data->{fqdn}:$data->{port}/quarantine";
+ my $basehref = "$data->{protocol}://$data->{fqdn}:$data->{port}/quarantine";
my $ticket = uri_escape($data->{ticket});
$item->{href} = "$basehref?ticket=$ticket&cselect=$item->{id}&date=$item->{date}";
my $fqdn = $cfg->get('spamquar', 'hostname') //
PVE::Tools::get_fqdn($hostname);
- my $port = 8006;
+ my $port = $cfg->get('spamquar', 'port') // 8006;
+
+ my $protocol = $cfg->get('spamquar', 'protocol') // 'https';
my $global_data = {
- protocol => 'https',
+ protocol => $protocol,
port => $port,
fqdn => $fqdn,
hostname => $hostname,
$data->{pmail} = $creceiver;
$data->{ticket} = PMG::Ticket::assemble_quarantine_ticket($data->{pmail});
my $esc_ticket = uri_escape($data->{ticket});
- $data->{managehref} = "https://$fqdn:$port/quarantine?ticket=${esc_ticket}";
+ $data->{managehref} = "$protocol://$fqdn:$port/quarantine?ticket=${esc_ticket}";
}
push @{$data->{items}}, get_item_data($data, $ref);
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 },
};
}