]> git.proxmox.com Git - pmg-api.git/log
pmg-api.git
4 years agoapi/quarantine: mention that one can pass comma-separated list as addresses
Thomas Lamprecht [Mon, 9 Mar 2020 17:10:40 +0000 (18:10 +0100)]
api/quarantine: mention that one can pass comma-separated list as addresses

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi/quarantine: add safer endpoint for user white/blacklist address deletion
Dominik Csapak [Mon, 9 Mar 2020 11:18:16 +0000 (12:18 +0100)]
api/quarantine: add safer endpoint for user white/blacklist address deletion

having the entry as part of the url causes many problems since it can
contain special characters like '/.,' etc., and that can break API
call path-to-method resolution.

Passing it as parameter makes it easier for callers (frontends) and
safer for backend to use

Note that the new api calls overwrites the parameter pattern with '',
so no formatting limits for the entries

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
[ Thomas: improved commit message ]
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: bump versioned dependency of pve-common
Thomas Lamprecht [Mon, 9 Mar 2020 16:36:54 +0000 (17:36 +0100)]
d/control: bump versioned dependency of pve-common

The registration of the 'ldap-simple-attr' format moved over to
pve-common, ensure it's available.

Not a build-depends as section config formats are not checked
currently.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoremove ldap-simple-attr
Dominik Csapak [Fri, 6 Mar 2020 10:05:47 +0000 (11:05 +0100)]
remove ldap-simple-attr

which is now in pve-common

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoAPI: access: whitespace cleanup
Thomas Lamprecht [Mon, 9 Mar 2020 11:16:28 +0000 (12:16 +0100)]
API: access: whitespace cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopmgsh: fix 'help' command
Dominik Csapak [Mon, 9 Mar 2020 09:24:46 +0000 (10:24 +0100)]
pmgsh: fix 'help' command

we changed the RESTEnvironment a while ago to not have the 'hidepw'
parameter anymore, so remove it in pmgsh as well

this fixes executions of 'pmgsh help /path'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agocheck if img tag has actually a 'src' attribute
Dominik Csapak [Wed, 4 Mar 2020 08:42:34 +0000 (09:42 +0100)]
check if img tag has actually a 'src' attribute

otherwise the journal gets flooded with

  Use of uninitialized value in pattern match (m//) [...]

when the user opens a preview which contains img tags without src attribute

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agod/control: bump versioned dependency to pve-common
Thomas Lamprecht [Sat, 7 Mar 2020 18:57:04 +0000 (19:57 +0100)]
d/control: bump versioned dependency to pve-common

to ensure we've the new LDAP module available

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agouse new PVE::LDAP instead of Net::LDAP directly
Dominik Csapak [Fri, 6 Mar 2020 10:05:46 +0000 (11:05 +0100)]
use new PVE::LDAP instead of Net::LDAP directly

for things like connecting/binding/etc.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agofix #2525: encode notifications in UTF-8
Stoiko Ivanov [Mon, 24 Feb 2020 18:16:48 +0000 (19:16 +0100)]
fix #2525: encode notifications in UTF-8

the Notify action is one of the places where we already encode the data as
UTF-8, before writing it to the DB (and decoding it when reading).

as laid out in rt.cpan.org [0] Mime::Body does expect encoded bytes, and not
perl characters.

Tested by creating a notification with the body supplied in #2591 (which is a
duplicate of #2525) and additionally with cyrillic characters in the subject.

A minimal test case is a body consisting of a Euro sign (since its Unicode
codepoint is larger than one byte).

Should the table contain invalid UTF-8 sequences (AFAIU only possible by
direct DB-manipulation) the byte gets replaced with \x{fffd} (Unicode
replacement character).

[0] https://rt.cpan.org/Public/Bug/Display.html?id=105377#txn-1762112

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-by: Dominik Csapak <d.csapak@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix #2622: include all spam levels in total spam statistic
Dominik Csapak [Tue, 3 Mar 2020 08:33:35 +0000 (09:33 +0100)]
fix #2622: include all spam levels in total spam statistic

by using 'LIMIT 10' for the spamlevels, we only got the first
10 spamlevels back from the database. This is only ok if there are
only <= 10 different spamlevels in the database, but not if there are
more, as then the bucket for spamlevel >= 10 missed entries.

The call site of this uses the combined spam count of this query
result for calculating the 'rest' (meaning the mails with spam level
0), but this is obviously wrong if not all spamlevels are counted so
simply return all available levels.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agobump version to 6.1-6
Wolfgang Bumiller [Fri, 28 Feb 2020 10:32:39 +0000 (11:32 +0100)]
bump version to 6.1-6

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoadd pmg-smtp-filter ID to reply
Mira Limbeck [Tue, 18 Feb 2020 15:36:40 +0000 (16:36 +0100)]
add pmg-smtp-filter ID to reply

For the pmg-log-tracker to match the pmg-smtp-filter on a reject, we
need some kind of information. With the addition of the pmg-smtp-filter
ID we can match it the same way we do for an accept.

Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
4 years agoreplace lookup_node_ip with get_ip_from_hostname from pve-common
Thomas Lamprecht [Fri, 21 Feb 2020 13:08:41 +0000 (14:08 +0100)]
replace lookup_node_ip with get_ip_from_hostname from pve-common

besides some irrelevant implementation details 'lookup_node_ip' is
identical to pve-common's get_ip_from_hostname, as they both rely on
'PVE::Tools::getaddrinfo_all' to get the addresses. So just reuse
the one from common instead of shipping a copy here.

The pve-common's one was recently improved by checking not only the
first IP it gets from getaddrinfo_all, but all and only complain if
none of those is a "real WAN (non-local)" IP. This will help
container installations of PMG with DHCP as their network
configuration option, as those often also have a hosts entry from
hostname to loopback addresses. Also, static setups often have both,
WAN and loopback addresses in /etc/hosts - as getaddrinfo_all gives
use them all do not just check the first.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopveversion: track clamav and postgres version
Thomas Lamprecht [Wed, 12 Feb 2020 08:16:23 +0000 (09:16 +0100)]
pveversion: track clamav and postgres version

use postgres-11 as we depend on that one explicitly in d/control too,
so on upgrade we need to adapt it there too anyway.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi/apt: sort package list
Thomas Lamprecht [Wed, 12 Feb 2020 08:16:00 +0000 (09:16 +0100)]
api/apt: sort package list

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 6.1-5
Thomas Lamprecht [Wed, 29 Jan 2020 20:33:59 +0000 (21:33 +0100)]
bump version to 6.1-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: bump versioned dependency to libpve-http-server-perl
Thomas Lamprecht [Wed, 29 Jan 2020 20:31:13 +0000 (21:31 +0100)]
d/control: bump versioned dependency to libpve-http-server-perl

for new extract_auth_value method which replaces extract_auth_cookie,
and change of auth_handler signature.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoensure compatibility with libpve-http-server-perl
Fabian Grünbichler [Tue, 21 Jan 2020 12:54:30 +0000 (13:54 +0100)]
ensure compatibility with libpve-http-server-perl

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agofix postfix template for before-queue filtering
Stoiko Ivanov [Mon, 27 Jan 2020 14:40:13 +0000 (15:40 +0100)]
fix postfix template for before-queue filtering

Introducing before-queue support in e0cbdf9fc98178f97223922f305cc19d6d29262d
missed adapting the relevant settings in the template for 'main.cf'.

Since the settings were overridden in the smtpd instances the error only
shows for locally generated mail (e.g. from cronjobs):

```
warning: connect to transport private/scan: Connection refused
```

Instead of globally setting 'smtpd_proxy_filter' (and associated options) in
'main.cf', as is done for 'content_filter' (for afterqueue filtering), this
patch removes the global 'content_filter' setting. This is done since
'smtp_proxy_filter' only applies to smtp sessions [0] and all incoming smtpd
processes get the setting in 'master.cf.in'.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
[0] see http://www.postfix.org/SMTPD_PROXY_README.html - the proxy speaks
smtp, and it's answers are sent to the sending server.

4 years agod/control: bump versioned dependency for 6.0-11
Thomas Lamprecht [Tue, 28 Jan 2020 20:22:39 +0000 (21:22 +0100)]
d/control: bump versioned dependency for 6.0-11

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoAPI2: Network: add vlan-raw-device && vlan-id options
Alexandre Derumier [Tue, 28 Jan 2020 10:24:32 +0000 (11:24 +0100)]
API2: Network: add vlan-raw-device && vlan-id options

Same than pve-manager

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agobump version to 6.1-4
Thomas Lamprecht [Thu, 23 Jan 2020 12:20:21 +0000 (13:20 +0100)]
bump version to 6.1-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix #1653: parse ipv6 xforward correctly
Dominik Csapak [Wed, 22 Jan 2020 13:26:29 +0000 (14:26 +0100)]
fix #1653: parse ipv6 xforward correctly

postfix prepends an ipv6 address in the xforward message with 'IPv6:'
we did not remove it and our later checks in who objects fail silently.

we now check if the addr is prefixed with this and remove it to
allow the who objects to work.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agofix disclaimer encoding for html entities
Dominik Csapak [Fri, 17 Jan 2020 09:52:47 +0000 (10:52 +0100)]
fix disclaimer encoding for html entities

we also want to encode the disclaimer for text/html parts and not
only for text/plain. while doing this, combine those two cases,
as they differ only by the variable to be encoded

this also fixes a missing charset, which we would ignore, but
should actually be treated as US-ASCII[0] so that an ascii disclaimer
still gets appended

the only (non-rfc-compliant) use case this breaks is if:
* the part has no charet defined (unusual)
* the clients of both the sender and receiver treat a missing charset
  as 'iso-8859-1' (non-rfc-compliant)
* the disclaimer contains characters from 'iso-8859-1' and was added
  to the pmg before encoding this to utf-8 (unlikely)

so i think we can ignore that case

0: https://tools.ietf.org/html/rfc1521

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agodkim: add selector list api call
Stoiko Ivanov [Tue, 14 Jan 2020 18:31:35 +0000 (19:31 +0100)]
dkim: add selector list api call

The fix for #2504 left the GUI with an unsatisfactory UX:
Users can change the selector to any newly created or existing one, but
don't know which ones exist (without looking on the commandline)

By adding a method under '/config/dkim/selectors' which lists all existing
files matching the pattern '/etc/pmg/dkim/.*\.private' the GUI can display
all currently existing selectors.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agofix #2504: do not overwrite existing selector key
Stoiko Ivanov [Tue, 14 Jan 2020 18:31:34 +0000 (19:31 +0100)]
fix #2504: do not overwrite existing selector key

This patch changes the behavior of DKIM selector creation. Instead of blindly
overwriting an already present file, add a force parameter to overwrite it (and
behave like the current code).

Overwriting an existing selector can potentially be quite destructive (e.g.
a setup where the admin has already posted the DNS-record for one selector to
many domains, then wants to quickly experiment with a larger keysize, and tries
to go back to the existing behavior).

The new behavior without force set to true, when a private key for the selector
already exists is to die if the file is either not a private RSA key, or has
the wrong size, or else just set the selector in pmg.conf

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoapi2 : network : add mtu
Alexandre Derumier [Thu, 9 Jan 2020 13:25:15 +0000 (14:25 +0100)]
api2 : network : add mtu

min 1280 to handle ipv6 && ipv4
max 65520 (infinibad support it)

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agoapi2: network: add bond-primary option
Alexandre Derumier [Thu, 9 Jan 2020 13:25:14 +0000 (14:25 +0100)]
api2: network: add bond-primary option

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
4 years agod/control: bump version dependency to doc-generator
Thomas Lamprecht [Fri, 10 Jan 2020 10:48:07 +0000 (11:48 +0100)]
d/control: bump version dependency to doc-generator

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agowrite_transport_map: code cleanup
Thomas Lamprecht [Fri, 10 Jan 2020 10:43:46 +0000 (11:43 +0100)]
write_transport_map: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Originally-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agofollowup: indentation and description improvement
Thomas Lamprecht [Fri, 10 Jan 2020 10:43:14 +0000 (11:43 +0100)]
followup: indentation and description improvement

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
Originally-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoFeature #2438 add support for lmtp delivery to downstream servers
Julian Zehnter [Sun, 5 Jan 2020 14:53:07 +0000 (15:53 +0100)]
Feature #2438 add support for lmtp delivery to downstream servers

new feature lmtp support for simplifying setups
with lmtp capable downstream servers (e.g. dovecot)
Postfix support lmtp out of the box and can now deliver
mails directly to internal mailbox servers without
one more smtp connection

extending the api code for new lmtp option:
Config.pm:
Adding new variable "relayprotocol"
Extending the read_transport_map & write_transport_map
for parsing the /etc/pmg/transport

Transport.pm:
Add new protcol varialbe for smtp/lmtp setting
Generalizing some "SMTP" keywords

Templates:
Adapting the main.cf templates for adding the lmtp keyword

Signed-off-by: Julian Zehnter <pmg-devel@j-z.it>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agobump version to 6.1-3
Thomas Lamprecht [Thu, 28 Nov 2019 10:35:58 +0000 (11:35 +0100)]
bump version to 6.1-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopmgproxy: implement cache workaround
Dominik Csapak [Thu, 28 Nov 2019 10:22:43 +0000 (11:22 +0100)]
pmgproxy: implement cache workaround

we include the version of the packages in the temlate, so that
we  can tell the browser that the file has changed and thus preventing
to load an old gui js file
the index template has to add the version to the get parameter

this is the same logic we use as in PVEs pveproxy

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agobump version to 6.1-2
Thomas Lamprecht [Fri, 22 Nov 2019 11:38:55 +0000 (12:38 +0100)]
bump version to 6.1-2

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoDon't add DKIM signature without domain
Stoiko Ivanov [Fri, 22 Nov 2019 09:40:57 +0000 (10:40 +0100)]
Don't add DKIM signature without domain

When the DKIMSign module fails to determine the domain for signing
(the one added to the header and used for retrieving the publickey record)
the code logs that no signing will take place, but only does not set the
domain - resulting in a generated and added signature with domain 'example.com'

Fixed by returning the success-status from signing_domain and only signing if
it was successful.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agomake clean: ignore non-existing PMG/pmgcfg.pm
Thomas Lamprecht [Tue, 19 Nov 2019 12:37:39 +0000 (13:37 +0100)]
make clean: ignore non-existing PMG/pmgcfg.pm

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 6.1-1
Thomas Lamprecht [Tue, 19 Nov 2019 10:46:48 +0000 (11:46 +0100)]
bump version to 6.1-1

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agocreate pmg-scores.cf unconditionally
Stoiko Ivanov [Mon, 18 Nov 2019 09:03:17 +0000 (10:03 +0100)]
create pmg-scores.cf unconditionally

with the recent addtion of adjustable SA-rule scores, we introduced
'/etc/mail/spamassassin/pmg-scores.cf' as a new file and included it in the
cluster synchronization.

If the file does not exist the `rsync` command complains leading to misleading
errors in the journal.

Unconditionally creating the file (like we do for the already existing
'custom.cf') removes the warnings.

Reported-by: Martin Maurer <martin@proxmox.com>
Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoremove wronlgy commited test code again
Thomas Lamprecht [Fri, 15 Nov 2019 14:57:09 +0000 (15:57 +0100)]
remove wronlgy commited test code again

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoclean: also cleanup generated pmgcfg
Thomas Lamprecht [Fri, 15 Nov 2019 13:02:21 +0000 (14:02 +0100)]
clean: also cleanup generated pmgcfg

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 6.0-10
Thomas Lamprecht [Fri, 15 Nov 2019 12:10:04 +0000 (13:10 +0100)]
bump version to 6.0-10

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: bump versioned dependency of doc-gen
Thomas Lamprecht [Fri, 15 Nov 2019 12:08:17 +0000 (13:08 +0100)]
d/control: bump versioned dependency of doc-gen

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoConfig: Add 'ndr_on_block' to $pmg_service_params
Stoiko Ivanov [Fri, 15 Nov 2019 10:41:15 +0000 (11:41 +0100)]
Config: Add 'ndr_on_block' to $pmg_service_params

The ndr_generation happens inside pmg-smtp-filter, so a change to that setting
should trigger a reload of pmg-smtp-filter.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agosync custom spamassassin scores to the slaves
Dominik Csapak [Thu, 14 Nov 2019 11:18:54 +0000 (12:18 +0100)]
sync custom spamassassin scores to the slaves

and set force_restart for pmg-smtp-filter to 1, so that it gets
restarted on the slaves as well

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoadd SACustom Package and API Calls for custom SpamAssassin scores
Dominik Csapak [Thu, 14 Nov 2019 11:18:53 +0000 (12:18 +0100)]
add SACustom Package and API Calls for custom SpamAssassin scores

this uses our INotify interface to parse and write a custom sa config
in /etc/mail/spamassassin/pmg-scores.cf with a shadow file in
/var/cache/pmg-scores.cf (to track the diff)

add also api calls to create a new/delete/edit/revert/apply those custom
rules

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoimplement force_restart for cluster sync
Dominik Csapak [Thu, 14 Nov 2019 11:18:52 +0000 (12:18 +0100)]
implement force_restart for cluster sync

the 'force_restart' hash was unused, but it is actually necessary to
restart the pmg-smtp-filter if the custom.cf has changed

use it for saving the daemon name that needs to be restarted, this
way we can reuse it in the future to force restart other daemons
or for different reasons if we need to

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoadd support for before queue filtering
Stoiko Ivanov [Thu, 14 Nov 2019 16:35:07 +0000 (17:35 +0100)]
add support for before queue filtering

Support for rejecting mails during the SMTP-dialog with 550 (permanent failure)
instead of seemingly accepting the mail (250 OK) and dropping it if it is
rejected by the rule-system is also known as 'before queue filtering' [0].

This patch adds minimal support for before queue filtering to pmg-smtp-filter.

Since pmg-smtp-filter is currently called via LMTP (and the 'scan' service in
'master.cf') we can adapt the already existing branch dealing with SMTP to
send a 550 selectively.

We can reply with 554 (permfail) if all recepients are blocked.

In the case that some accept the mail, we reply with 250 OK.
Depending on the setting of 'ndr_on_block' we generate ndrs
for all blocking recepients. (This is also the behavior that postfix
has when not enabling receiver verification and the downstream server rejects
recepients).

Configuration of before-queue filtering is done via the
'before_queue_filtering' boolean in the 'mail' section of 'pmg.conf':

the before_queue_filtering flag is used when rendering '/etc/postfix/master.cf'
to adapt the needed config-options for both, inbound and outbound, smtpd
servers. The settings were adapted from [0].

[0] http://www.postfix.org/SMTPD_PROXY_README.html

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoadd support for sending NDRs on Block
Stoiko Ivanov [Thu, 14 Nov 2019 16:35:06 +0000 (17:35 +0100)]
add support for sending NDRs on Block

This patch adds a flag to the mail-section of pmg.conf - 'ndr_on_block',
defaulting to false.

If enabled pmg-smtp-filter replies with 554 (permanent fail) for the recipient
who blocked the mail.

Since pmg-smtp-filter is currently called with LMTP it can respond with a
separate code for each recipient. Postfix records the answers and generates
and sends the NDR to the sender.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoadd generate_ndr to PMG::SMTP
Stoiko Ivanov [Tue, 12 Nov 2019 14:16:13 +0000 (15:16 +0100)]
add generate_ndr to PMG::SMTP

In order to selectively accept and reject mails when multiple recipients
are present for a mail, without silently dropping mails to certain recipients
the sender needs to be informed about those recipients which did not receive
the mail (via a non-delivery report - NDR).

The format of delivery status notifications (of which an ndr is a subset) is
specified in RFC 6522 [0]. The format for the 'message/delivery-status'
MIME-Type is specified in RFC 6533 [1]

The message text was adapted from Postfix' default bounce-messages, however
we do not attach the original mail to the report. This is acceptable by [0]
and makes sense (not sending mail, which is likely spam or a virus, back to the
(potentially faked) sender).

[0] https://tools.ietf.org/html/rfc6522
[1] https://tools.ietf.org/html/rfc6533

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoPMG::Config: refactor dns info collection
Stoiko Ivanov [Tue, 12 Nov 2019 14:16:12 +0000 (15:16 +0100)]
PMG::Config: refactor dns info collection

Create a sub for gathering dns info of the current node (hostname, domainname,
fqdn) - so we can reuse it.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoadd missing use MIME::Entity in PMG::Utils
Stoiko Ivanov [Tue, 12 Nov 2019 14:16:11 +0000 (15:16 +0100)]
add missing use MIME::Entity in PMG::Utils

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agobump version to 6.0-9
Thomas Lamprecht [Wed, 30 Oct 2019 17:38:13 +0000 (18:38 +0100)]
bump version to 6.0-9

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoQuarantine API: extend download call to download whole mails
Dominik Csapak [Wed, 23 Oct 2019 07:36:34 +0000 (09:36 +0200)]
Quarantine API: extend download call to download whole mails

this makes the attachmentid parameter optional and if it is not
given, open the whole mail for download

The permission check, that a quser only is able to get their own
mails/attachments, happens in get_and_check_mail, thus we can add the
quser to the "sufficient permissions" list without opening up the
real permissions the users has.

[Thomas] add permissions info to commit message

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoAPI: Actions: also return if action is editable
Dominik Csapak [Wed, 23 Oct 2019 11:56:06 +0000 (13:56 +0200)]
API: Actions: also return if action is editable

API clients, like our web interface, can usen use this to show if a
action is editable or not, allowing to improve UX.

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agopmgproxy: add proxmox-widget-toolkit css path
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:35 +0000 (19:23 +0200)]
pmgproxy: add proxmox-widget-toolkit css path

With adding DKIM to the GUI the pmx-hint css class (defined in
proxmox-widget-toolkit) is needed in the GUI, therefore the css-file
needs to be available via pmgproxy

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoadd /etc/pmg/dkim to cluster-sync
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:34 +0000 (19:23 +0200)]
add /etc/pmg/dkim to cluster-sync

The clustersync already uses rsync to sync most files (there are excludes
for '*.db', '*~', and the certificates of the node) from the master's
'/etc/pmg' directory to all nodes. Moving files from the syncdir to the node's
actual '/etc/pmg' happen only for explicitly listed files.

This patch adds a second list of explicit directories and adds
'/etc/pmg/templates' and '/etc/pmg/dkim' to that list.

The syncing of all files inside this directory list is done via
`rsync -aq --delete-after`. This is a semantic change to the loop used
for the templates directory, in which only regular files and symlinks were
copied (rsync copies everything recursively).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agosrc/PMG/CLI/pmgconfig.pm: raise error when api returns no dkim_selector
Dietmar Maurer [Wed, 23 Oct 2019 09:43:46 +0000 (11:43 +0200)]
src/PMG/CLI/pmgconfig.pm: raise error when api returns no dkim_selector

Instead of writing a warning about usinag an undefined value.

4 years agopmgconfig: add dkim commands
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:33 +0000 (19:23 +0200)]
pmgconfig: add dkim commands

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoadd DKIM API paths
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:32 +0000 (19:23 +0200)]
add DKIM API paths

A new path is added at /config/dkim with 2 subpaths:
* /config/dkim/domains gives access to the dkimdomains
* /config/dkim/selector gives access to the private key for the configured
  selector

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoadd API2/DKIMSignDomains endpoints
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:31 +0000 (19:23 +0200)]
add API2/DKIMSignDomains endpoints

currently working like RelayDomains

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agorefactor API2::Domains for reuse in DKIMSign
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:30 +0000 (19:23 +0200)]
refactor API2::Domains for reuse in DKIMSign

both DKIM Signed Domains and Relay Domains are lists of domains (DKIMSign falls
back to Relay Domains). By refactoring the method creation we can reuse most
of the code for the handling of DKIMSign domains

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoDKIM sign outbound mail if configured
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:29 +0000 (19:23 +0200)]
DKIM sign outbound mail if configured

The signing is done in the Accept-Action just before the mail gets handed to
the outbound postifx process, thus ensuring that all modifications done by
the rule-system don't invalidate the signature

The PMG::DKIMSign/DKIM::Signer object is not cached, since subsequent calls to
the same object lead to invalid signatures.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoadd PMG::DKIMSign module
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:28 +0000 (19:23 +0200)]
add PMG::DKIMSign module

the module serves 3 purposes:
* it extends Mail::DKIM::Signer:
  * it provides a glue layer between MIME::Entity's output method (which
    expects print and uses \n as line terminator) and Mail::DKIM::Signer's
    PRINT method (which expects \r\n)

* it integrates with PMG's config
  * the domain which should be used for signing is selected based on the
    sender's e-mail address and the DKIM-settings in PMG-configuration
  * it provides a method which takes a MIME::Entity and returns it with
    signature
  * certain headers get oversigned (in order to prevent adding a previously
    non-existing header (e.g. Reply-To) and retaining a valid signature).
    the list of headers which are oversigned is inspired by rspamd's choice [0].
    for rationale see [1,2]

* it provides methods for handling selectors and keys.

[0] https://rspamd.com/doc/modules/dkim_signing.html#sign-headers
[1] https://noxxi.de/research/breaking-dkim-on-purpose-and-by-chance.html
[2] https://github.com/rspamd/rspamd/issues/2136

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoadd DKIM options to PMG::Config
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:27 +0000 (19:23 +0200)]
add DKIM options to PMG::Config

This patch adds a new registered file to PMG::Config: /etc/pmg/dkim/domains.
* It holds a list of domains for which mail will be signed if received on the
  internal port (26).
* The domain of a mail is determined by it's envelope-sender
  (not the From: header)
* If the file does not exist mail is signed for the relay domains as a sensible
  fallback

Additionally it adds 3 new options to the admin section of pmg.conf:
* dkim_sign - whether DKIM signing should be attempted
* dkim_sign_all_mail - wheter the outbound mail should be signed irrespective
  of sender-domain
* dkim_selector - the selector used for signing (a label of the DKIM TXT record
  and present in the signature - thus linking the signature to the used key
  - see RFC6376)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agofix #2371: reload pmg-smtp-filter on config change
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:26 +0000 (19:23 +0200)]
fix #2371: reload pmg-smtp-filter on config change

the external services (postfix, clamav,...) are restarted if their configfile
changes (which Template::Toolkit tells us).

By writing a current-config to '/run/pmg-smtp-filter.cfg' we can use the same
logic to reload it on a config-change affecting it - currently hide_received

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agorefactor reload_rule_db
Stoiko Ivanov [Mon, 21 Oct 2019 17:23:25 +0000 (19:23 +0200)]
refactor reload_rule_db

move the reload of pmg-smtp-filter in a sub in PMG::Utils and call it in
the only place it was used (PMG::DBTools::reload_rule_db).

This is in preparation for fixing #2371 and dkim-signing support.

Additionally an unneeded import was removed from PMG/DBTools.pm

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agobump version to 6.0-8
Thomas Lamprecht [Tue, 22 Oct 2019 05:37:14 +0000 (07:37 +0200)]
bump version to 6.0-8

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agod/control: bump libpve-http-server-perl dependency version 3.0-3
Thomas Lamprecht [Tue, 22 Oct 2019 05:31:04 +0000 (07:31 +0200)]
d/control: bump libpve-http-server-perl dependency version 3.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopurge attachment quarantine with spamlifetime
Dominik Csapak [Thu, 10 Oct 2019 09:22:01 +0000 (11:22 +0200)]
purge attachment quarantine with spamlifetime

so that they get removed with the same lifetime as the spam quarantine

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoDBTools: add new default rule/objects for attachment quarantine
Dominik Csapak [Thu, 10 Oct 2019 09:22:00 +0000 (11:22 +0200)]
DBTools: add new default rule/objects for attachment quarantine

the new rule is disabled by default

also adapt the ruledb test for default rules

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoAPI2/Quarantine: add attachment quarantine api paths
Dominik Csapak [Thu, 10 Oct 2019 09:21:59 +0000 (11:21 +0200)]
API2/Quarantine: add attachment quarantine api paths

this introduces 3 new api paths in /quarantine/

* GET attachment
  lists all mails in the attachment quarantine, similar to the virus one

* GET listattachments
  lists all attachments for a specific mail in the quarantine

* GET download
  serves the attachment of a mail as a download to the user

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoRuleDB/Remove: add attachment quarantine option
Dominik Csapak [Thu, 10 Oct 2019 09:21:58 +0000 (11:21 +0200)]
RuleDB/Remove: add attachment quarantine option

So that users can choose to copy the mail to the attachment quarantine,
if they remove some (or all attachments)

also add 'ldap' parameter to execute (will be called with it in
pmg-smtp-filter) to pass it on to 'quarantine_mail'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoRuleDB/Remove: improve attachment detection for 'remove all'
Dominik Csapak [Thu, 10 Oct 2019 09:21:57 +0000 (11:21 +0200)]
RuleDB/Remove: improve attachment detection for 'remove all'

this patch improves the attachment detection in such a way that
instead of leaving the first part if it has a content-type of
text/* and removing all other parts we now leave the 'real' message, meaning:

* the first text/plain or text/html part if no multipart
* the first text/plain or text/html part if multipart/mixed
* all text/plain and text/html parts of the first multipart/alternative
  (if we did not already see the message)

this way the 'real' message including the text/html alternative
(or the only text/html part if no text/plain was sent) is
left in the message that is being sent to the receiver

also add missing '$rulename' parameter to the recursive call to
'delete_marked_parts'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoAPI2/Quarantine: refactor quarantine listing api
Dominik Csapak [Thu, 10 Oct 2019 09:21:56 +0000 (11:21 +0200)]
API2/Quarantine: refactor quarantine listing api

will be again used for the attachment quarantine

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agoMailQueue: prepare for attachment quarantine
Dominik Csapak [Thu, 10 Oct 2019 09:21:55 +0000 (11:21 +0200)]
MailQueue: prepare for attachment quarantine

create the spooldir for the attachment quarantine, as well as
allow quarantining into it

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
Reviewed-By: Stoiko Ivanov <s.ivanov@proxmox.com>
Tested-By: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agouse the refactored helpers from PMG::MIMEUtils
Dominik Csapak [Thu, 10 Oct 2019 09:21:54 +0000 (11:21 +0200)]
use the refactored helpers from PMG::MIMEUtils

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoadd PMG::MIMEUtils helper package
Dominik Csapak [Thu, 10 Oct 2019 09:21:53 +0000 (11:21 +0200)]
add PMG::MIMEUtils helper package

this package provides some often used MIME funcionality that we use

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoHTTPServer: extend download functionality
Dominik Csapak [Thu, 10 Oct 2019 09:21:52 +0000 (11:21 +0200)]
HTTPServer: extend download functionality

allow object as return value for 'download' api calls
this way, we can give additional information for download apis
(like the content-type and if it should be deleted after)

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agoRuleDB: load_object: do explicit return
Thomas Lamprecht [Tue, 8 Oct 2019 06:17:46 +0000 (08:17 +0200)]
RuleDB: load_object: do explicit return

While perl5 returns the result of the last expression implicitly, if
no explicit return statement is in a submethod's code path, it's much
nicer to do the things explicit most of the times, and a slight
modification could even break this.

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix result verification for invalid mails
Dominik Csapak [Mon, 30 Sep 2019 12:55:30 +0000 (14:55 +0200)]
fix result verification for invalid mails

in case we cannot parse the mail to produce any sensible html/text
output, we got a 'result verification error', instead show 'No Content'

Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
4 years agobump version to 6.0-6
Thomas Lamprecht [Mon, 9 Sep 2019 06:06:18 +0000 (08:06 +0200)]
bump version to 6.0-6

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agofix #2360: cluster: reload pmg-smtp-filter on rulechange
Stoiko Ivanov [Fri, 6 Sep 2019 13:30:15 +0000 (15:30 +0200)]
fix #2360: cluster: reload pmg-smtp-filter on rulechange

When a node detects a change of the rule-database during clustersync,
the database update got done, however the running `pmg-smtp-filter`
instance was not notified of the updated ruleset. Adding a call to
PMG::DBTools::reload_ruledb (like in the API2 paths) fixes the issue.

As this is guarded by a digest change check it'll only reload if the
ruleDB really changed.

We do not pass the currewnt ruleDB instance to the reload method, as
it is only used for "rewrite_postfix_whitelist", which is already
executed through the pmgmirror::cluster_sync call to
PMG::Config->rewrite_config, if needed, so don't do that twice.

Tested by
* creating a 2 node PMG cluster
* adding and removing e-mail-addresses to the Blacklist (which was used in
  a high priority, active rule)
* sending e-mails from those addresses through PMG
* observing the action taken before/after the Rule DB got synced

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoFix #2224: override reference to openspf.org
Stoiko Ivanov [Mon, 2 Sep 2019 15:35:34 +0000 (17:35 +0200)]
Fix #2224: override reference to openspf.org

This is a fix for a small cosmetic issue, which keeps coming up on our various
support-channels:
pmgpolicy as user of 'Mail::SPF::Server' logs lines referencing the (now
defunct) url: http://www.openspf.org/Why

By overriding 'default_authority_explanation' [0] the logs now contain a simple
logmessage without any reference to an external url.

All macros used before are used in the new message as well, so the information
content stays the same.

Given that we are (by far) not the only users of this module I additionally
opened an issue upstream [1] (and linked it to the debian bug-report [2]).

Tested by providing a SPF policy not allowing the ip of the sender in my
testsetup and observing the logs.

[0] https://metacpan.org/pod/Mail::SPF::Server
[1] https://rt.cpan.org/Public/Bug/Display.html?id=130413
[2] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930032

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agobump version to 6.0-5
Thomas Lamprecht [Wed, 28 Aug 2019 12:52:08 +0000 (14:52 +0200)]
bump version to 6.0-5

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi mime: code cleanup
Thomas Lamprecht [Wed, 28 Aug 2019 12:30:56 +0000 (14:30 +0200)]
api mime: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoapi mime: really return mimetypes, not undef
Thomas Lamprecht [Wed, 28 Aug 2019 12:29:23 +0000 (14:29 +0200)]
api mime: really return mimetypes, not undef

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agobump version to 6.0-4
Thomas Lamprecht [Fri, 23 Aug 2019 09:30:59 +0000 (11:30 +0200)]
bump version to 6.0-4

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoclamav config: improve some descriptions
Thomas Lamprecht [Tue, 20 Aug 2019 12:03:44 +0000 (14:03 +0200)]
clamav config: improve some descriptions

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoclose #2324 - improve docs on encrypted archives
Stoiko Ivanov [Mon, 19 Aug 2019 16:32:14 +0000 (18:32 +0200)]
close #2324 - improve docs on encrypted archives

The option for ClamAV 'Block Encrypted Archives and Documents', actually
triggers a Heuristic match from ClamAV, which is used by PMG to rais the
spam score of a message by the value of 'Heuristic Score' configured
at the 'Spam Detector' settings.

Since this has caused confusion (also for myself) a few times already, this
patch tries to address the issue by referring to the other option in the API
description of both properties

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agobump version to 6.0-3
Thomas Lamprecht [Sat, 17 Aug 2019 11:05:47 +0000 (13:05 +0200)]
bump version to 6.0-3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agopmgproxy: add link to extjs for api-viewer
Thomas Lamprecht [Sat, 17 Aug 2019 10:45:12 +0000 (12:45 +0200)]
pmgproxy: add link to extjs for api-viewer

allows us to remove the external loading of extjs from the cloudflare
cdn in pmg-docs easier with having the external hosted version in
mind.

Adapted from the pveproxy version [0] with the same goal.

[0]: https://git.proxmox.com/?p=pve-manager.git;a=commitdiff;h=eb65703b55ce97df59d82404fcdd6f6831658158

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agoimprove csrf backward compatibility
Stoiko Ivanov [Fri, 16 Aug 2019 14:02:23 +0000 (16:02 +0200)]
improve csrf backward compatibility

this patch follows the code in pve-access-control
e149b1c6c9954c07672d63f23f696d5b1e6c11d4)

and should enable us to update pve-common in PMG 5.x along with PVE again.

Tested by:
* logging into PMG (get csrf token)
a) installing only the previous patch:
   * POSTing (with the previously obtained token) -> 401
b) installing previous and this patch
   * POSTing (with the previously obtained token) -> 200

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agouse hmac_sha_256 for csrf token
Oguz Bektas [Fri, 16 Aug 2019 14:02:22 +0000 (16:02 +0200)]
use hmac_sha_256 for csrf token

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agobump version to 6.0-1+3
Thomas Lamprecht [Tue, 13 Aug 2019 13:48:13 +0000 (15:48 +0200)]
bump version to 6.0-1+3

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
4 years agomake journal parsing more robust
Fabian Grünbichler [Fri, 9 Aug 2019 10:17:36 +0000 (12:17 +0200)]
make journal parsing more robust

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoadapt journalctl invocation to buster
Stoiko Ivanov [Fri, 9 Aug 2019 07:07:30 +0000 (09:07 +0200)]
adapt journalctl invocation to buster

With Debian Buster the behavior of `journalctl` has changed when it finds
no entries for a given selection:
* The exit code was 0 in stretch, but is 1 in buster
* The output changed slightly - a header got added

Since PMG::Utils::scan_journal_for_rbl_rejects uses journalctl for reading the
IPs blocked by postscreen it needs to adapt for the new behavior (otherwise
run_command dies because of the exit code 1)

The patch addresses the problem by using the json-output of `journalctl`, which
still exits with 0 if no entries are present . Additionally the json-output
adds the current cursor to the output by default, removing the need to
explicitly scanning for it.(the exit code of 1 was due to '--show-cursor'
without a single result line).

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
4 years agobump version to 6.0-1+2
Fabian Grünbichler [Fri, 9 Aug 2019 07:00:45 +0000 (09:00 +0200)]
bump version to 6.0-1+2

Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
4 years agoadapt clamav.conf.in to new upstream version
Stoiko Ivanov [Thu, 8 Aug 2019 16:09:22 +0000 (18:09 +0200)]
adapt clamav.conf.in to new upstream version

The new version of clamav has changed a few options, which we ship in our
config template - see [0] for the details.
This patch changes all affected options to the new names and additionally
expands the Description of 'archiveblockencrypted' to reflect that the option
is used for both archives _and_ documents.

[0] https://blog.clamav.net/2018/12/clamav-01010-has-been-released.html

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>