From f6f75f6fab33f942064194ee28969c5a5a3fca23 Mon Sep 17 00:00:00 2001 From: Joshua Tauberer Date: Tue, 19 Nov 2019 09:57:27 -0500 Subject: [PATCH 1/4] Don't fail when resolving zone transfer IP addresses since a nameserver may not have an IPv6 address --- management/dns_update.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/management/dns_update.py b/management/dns_update.py index 257deffa..7d053d5e 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -875,11 +875,13 @@ def get_secondary_dns(custom_dns, mode=None): # This is a hostname. Before including in zone xfr lines, # resolve to an IP address. Otherwise just return the hostname. + # It may not resolve to IPv6, so don't throw an exception if it + # doesn't. if not hostname.startswith("xfr:"): if mode == "xfr": - response = dns.resolver.query(hostname+'.', "A") + response = dns.resolver.query(hostname+'.', "A", raise_on_no_answer=False) values.extend(map(str, response)) - response = dns.resolver.query(hostname+'.', "AAAA") + response = dns.resolver.query(hostname+'.', "AAAA", raise_on_no_answer=False) values.extend(map(str, response)) continue values.append(hostname) From ff8170d5ab18eb7d1d131d8f0b9106acc660d132 Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Sat, 23 Nov 2019 13:51:22 +0100 Subject: [PATCH 2/4] Align nextcloud cron job with recommended settings (#1680) --- setup/nextcloud.sh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/setup/nextcloud.sh b/setup/nextcloud.sh index b38e1f65..d2a4a0ce 100755 --- a/setup/nextcloud.sh +++ b/setup/nextcloud.sh @@ -310,12 +310,15 @@ if grep -q apc.enabled=0 /etc/php/7.2/mods-available/apcu.ini; then fi # Set up a cron job for Nextcloud. -cat > /etc/cron.hourly/mailinabox-owncloud << EOF; +cat > /etc/cron.d/mailinabox-nextcloud << EOF; #!/bin/bash # Mail-in-a-Box -sudo -u www-data php -f /usr/local/lib/owncloud/cron.php +*/5 * * * * root sudo -u www-data php -f /usr/local/lib/owncloud/cron.php EOF -chmod +x /etc/cron.hourly/mailinabox-owncloud +chmod +x /etc/cron.d/mailinabox-nextcloud + +# Remove previous hourly cronjob +rm -f /etc/cron.hourly/mailinabox-owncloud # There's nothing much of interest that a user could do as an admin for Nextcloud, # and there's a lot they could mess up, so we don't make any users admins of Nextcloud. From 91638c7fe0a9919a1c0b554d307a6c32a9f1c85d Mon Sep 17 00:00:00 2001 From: Michael Kroes Date: Sat, 23 Nov 2019 13:58:29 +0100 Subject: [PATCH 3/4] Removed the postgrey option that specifies which whitelist file to use. This allows the usage of a .local verion (#1675) --- setup/mail-postfix.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index e39f8aff..75e09a11 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -208,7 +208,7 @@ tools/editconf.py /etc/postfix/main.cf \ # e-mails really latter, delay of greylisting has been set to # 180 seconds (default is 300 seconds). tools/editconf.py /etc/default/postgrey \ - POSTGREY_OPTS=\"'--inet=127.0.0.1:10023 --delay=180 --whitelist-recipients=/etc/postgrey/whitelist_clients'\" + POSTGREY_OPTS=\"'--inet=127.0.0.1:10023 --delay=180'\" # We are going to setup a newer whitelist for postgrey, the version included in the distribution is old From cd62fd9826ac2334a92bb5bf8834982758081ff8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20H=C3=A4hnel?= Date: Sat, 23 Nov 2019 14:04:22 +0100 Subject: [PATCH 4/4] Update usage hint in backup.py (#1662) removed explicit call of the system python, cause the file has a shebang with the mail-in-a-box shipped python. for me the system python complaint, that it is missing some modules --- management/backup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/management/backup.py b/management/backup.py index 11cdbb8a..e1651552 100755 --- a/management/backup.py +++ b/management/backup.py @@ -410,7 +410,7 @@ def list_target_files(config): reason = "The hostname {} cannot be resolved.".format(target.hostname) else: reason = "Unknown error." \ - "Please check running 'python management/backup.py --verify'" \ + "Please check running 'management/backup.py --verify'" \ "from mailinabox sources to debug the issue." raise ValueError("Connection to rsync host failed: {}".format(reason))