diff --git a/CHANGELOG.md b/CHANGELOG.md index bff4d661..d796970e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,12 +1,28 @@ CHANGELOG ========= +Version 56 (January 19, 2022) +----------------------------- -In Development --------------- +Software updates: -Mail: -* Roundcube's persistent_login plugin update to better support Roundcube 1.5 +* Roundcube updated to 1.5.2 (from 1.5.0), and the persistent_login and CardDAV (to 4.3.0 from 3.0.3) plugins are updated. +* Nextcloud updated to 20.0.14 (from 20.0.8), contacts to 4.0.7 (from 3.5.1), and calendar to 3.0.4 (from 2.2.0). + +Setup: + +* Fixed failed setup if a previous attempt failed while updating Nextcloud. + +Control panel: + +* Fixed a crash if a custom DNS entry is not under a zone managed by the box. +* Fix DNSSEC instructions typo. + +Other: + +* Set systemd journald log retention to 10 days (from no limit) to reduce disk usage. +* Fixed log processing for submission lines that have a sasl_sender or other extra information. +* Fix DNS secondary nameserver refesh failure retry period. Version 55 (October 18, 2021) ----------------------------- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 00e15ec7..953c9016 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,9 +20,9 @@ _If you're seeing an error message about your *IP address being listed in the Sp ### Modifying your `hosts` file -After a while, Mail-in-a-Box will be available at `192.168.50.4` (unless you changed that in your `Vagrantfile`). To be able to use the web-based bits, we recommend to add a hostname to your `hosts` file: +After a while, Mail-in-a-Box will be available at `192.168.56.4` (unless you changed that in your `Vagrantfile`). To be able to use the web-based bits, we recommend to add a hostname to your `hosts` file: - $ echo "192.168.50.4 mailinabox.lan" | sudo tee -a /etc/hosts + $ echo "192.168.56.4 mailinabox.lan" | sudo tee -a /etc/hosts You should now be able to navigate to https://mailinabox.lan/admin using your browser. There should be an initial admin user with the name `me@mailinabox.lan` and the password `12345678`. diff --git a/README.md b/README.md index b80b0f4b..b4cffa55 100644 --- a/README.md +++ b/README.md @@ -119,7 +119,7 @@ Clone this repository and checkout the tag corresponding to the most recent rele $ git clone https://github.com/mail-in-a-box/mailinabox $ cd mailinabox - $ git checkout v55 + $ git checkout v56 Begin the installation. diff --git a/Vagrantfile b/Vagrantfile index aaf7ce9f..da235aca 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -9,7 +9,7 @@ Vagrant.configure("2") do |config| # the machine's box will let anyone log into it. So instead we'll put the # machine on a private network. config.vm.hostname = "mailinabox.lan" - config.vm.network "private_network", ip: "192.168.50.4" + config.vm.network "private_network", ip: "192.168.56.4" config.vm.provision :shell, :inline => <<-SH # Set environment variables so that the setup script does diff --git a/management/dns_update.py b/management/dns_update.py index 1c4e6647..edeaa9c2 100755 --- a/management/dns_update.py +++ b/management/dns_update.py @@ -510,7 +510,7 @@ def write_nsd_zone(domain, zonefile, records, env, force): # @ the PRIMARY_HOSTNAME. Hopefully that's legit. # # For the refresh through TTL fields, a good reference is: - # http://www.peerwisdom.org/2013/05/15/dns-understanding-the-soa-record/ + # https://www.ripe.net/publications/docs/ripe-203 # Time To Refresh – How long in seconds a nameserver should wait prior to checking for a Serial Number # increase within the primary zone file. An increased Serial Number means a transfer is needed to sync diff --git a/management/templates/system-backup.html b/management/templates/system-backup.html index 6cbcc4fa..3075b912 100644 --- a/management/templates/system-backup.html +++ b/management/templates/system-backup.html @@ -5,7 +5,7 @@

Backup Status

-

The box makes an incremental backup each night. By default the backup is stored on the machine itself, but you can also store in on S3-compatible services like Amazon Web Services (AWS).

+

The box makes an incremental backup each night. By default the backup is stored on the machine itself, but you can also store it on S3-compatible services like Amazon Web Services (AWS).

Configuration

diff --git a/setup/additionals.sh b/setup/additionals.sh index d29d86f7..f1b87e4e 100644 --- a/setup/additionals.sh +++ b/setup/additionals.sh @@ -15,12 +15,6 @@ sed -i "s/#\& stop/\& stop/g" /etc/rsyslog.d/20-ufw.conf restart_service rsyslog -# decrease time journal is stored -tools/editconf.py /etc/systemd/journald.conf MaxRetentionSec=2month -tools/editconf.py /etc/systemd/journald.conf MaxFileSec=1week - -hide_output systemctl restart systemd-journald.service - # Create forward for root emails cat > /root/.forward << EOF; administrator@$PRIMARY_HOSTNAME diff --git a/setup/bootstrap.sh b/setup/bootstrap.sh index c7d9622c..0fe4fc44 100644 --- a/setup/bootstrap.sh +++ b/setup/bootstrap.sh @@ -24,7 +24,7 @@ if [ -z "$TAG" ]; then elif [ "$(lsb_release -d | sed 's/.*:\s*//' | sed 's/18\.04\.[0-9]/18.04/' )" == "Ubuntu 18.04 LTS" ]; then # This machine is running Ubuntu 18.04. - TAG=v55 + TAG=v56 elif [ "$(lsb_release -d | sed 's/.*:\s*//' | sed 's/14\.04\.[0-9]/14.04/' )" == "Ubuntu 14.04 LTS" ]; then # This machine is running Ubuntu 14.04. diff --git a/setup/nextcloud.sh b/setup/nextcloud.sh index b0637c12..29ff1214 100755 --- a/setup/nextcloud.sh +++ b/setup/nextcloud.sh @@ -9,6 +9,39 @@ source /etc/mailinabox.conf # load global vars echo "Installing Nextcloud (contacts/calendar)..." +# Nextcloud core and app (plugin) versions to install. +# With each version we store a hash to ensure we install what we expect. + +# Nextcloud core +# -------------- +# * See https://nextcloud.com/changelog for the latest version. +# * Check https://docs.nextcloud.com/server/latest/admin_manual/installation/system_requirements.html +# for whether it supports the version of PHP available on this machine. +# * Since Nextcloud only supports upgrades from consecutive major versions, +# we automatically install intermediate versions as needed. +# * The hash is the SHA1 hash of the ZIP package, which you can find by just running this script and +# copying it from the error message when it doesn't match what is below. +nextcloud_ver=22.2.3 +nextcloud_hash=58d2d897ba22a057aa03d29c762c5306211fefd2 + +# Nextcloud apps +# -------------- +# * Find the most recent tag that is compatible with the Nextcloud version above by +# consulting the ... node at: +# https://github.com/nextcloud-releases/contacts/blob/maaster/appinfo/info.xml +# https://github.com/nextcloud-releases/calendar/blob/master/appinfo/info.xml +# https://github.com/nextcloud/user_external/blob/master/appinfo/info.xml +# * The hash is the SHA1 hash of the ZIP package, which you can find by just running this script and +# copying it from the error message when it doesn't match what is below. +contacts_ver=4.0.7 +contacts_hash=8ab31d205408e4f12067d8a4daa3595d46b513e3 +calendar_ver=3.0.4 +calendar_hash=6fb1e998d307c53245faf1c37a96eb982bbee8ba +user_external_ver=2.1.0 +user_external_hash=6e5afe7f36f398f864bfdce9cad72200e70322aa + +# Clear prior packages and install dependencies from apt. + apt-get purge -qq -y owncloud* # we used to use the package manager apt_install php php-fpm \ @@ -18,8 +51,9 @@ apt_install php php-fpm \ # Enable apc is required before installing nextcloud 21 tools/editconf.py /etc/php/$(php_version)/mods-available/apcu.ini -c ';' \ + apc.enabled=1 \ apc.enable_cli=1 - + restart_service php$(php_version)-fpm InstallNextcloud() { @@ -55,23 +89,11 @@ InstallNextcloud() { # their github repositories. mkdir -p /usr/local/lib/owncloud/apps - contacts_cutoff="3.5.1" # this version was the last posted version on 12/27/2021 that supported the old url format - if [ ${contacts_cutoff//.} -gt ${version_contacts//.} ]; then - wget_verify https://github.com/nextcloud/contacts/releases/download/v$version_contacts/contacts.tar.gz $hash_contacts /tmp/contacts.tgz - else - wget_verify https://github.com/nextcloud-releases/contacts/releases/download/v$version_contacts/contacts-v$version_contacts.tar.gz $hash_contacts /tmp/contacts.tgz - fi - + wget_verify https://github.com/nextcloud-releases/contacts/releases/download/v$version_contacts/contacts-v$version_contacts.tar.gz $hash_contacts /tmp/contacts.tgz tar xf /tmp/contacts.tgz -C /usr/local/lib/owncloud/apps/ rm /tmp/contacts.tgz - calendar_cutoff="2.0.5" # this version was the last posted version on 12/27/2021 that supported the old url format - if [ ${calendar_cutoff//.} -gt ${version_calendar//.} ]; then - wget_verify https://github.com/nextcloud/calendar/releases/download/v$version_calendar/calendar.tar.gz $hash_calendar /tmp/calendar.tgz - else - wget_verify https://github.com/nextcloud-releases/calendar/releases/download/v$version_calendar/calendar.tar.gz $hash_calendar /tmp/calendar.tgz - fi - + wget_verify https://github.com/nextcloud-releases/calendar/releases/download/v$version_calendar/calendar-v$version_calendar.tar.gz $hash_calendar /tmp/calendar.tgz tar xf /tmp/calendar.tgz -C /usr/local/lib/owncloud/apps/ rm /tmp/calendar.tgz @@ -117,16 +139,6 @@ InstallNextcloud() { fi } -# Nextcloud Version to install. Checks are done down below to step through intermediate versions. -nextcloud_ver=22.2.3 -nextcloud_hash=58d2d897ba22a057aa03d29c762c5306211fefd2 -contacts_ver=4.0.7 -contacts_hash=8ab31d205408e4f12067d8a4daa3595d46b513e3 -calendar_ver=3.0.2 -calendar_hash=dcc62633f81c2cb53ce202348c79a0ab5bf4c9a8 -user_external_ver=2.1.0 -user_external_hash=6e5afe7f36f398f864bfdce9cad72200e70322aa - # Current Nextcloud Version, #1623 # Checking /usr/local/lib/owncloud/version.php shows version of the Nextcloud application, not the DB # $STORAGE_ROOT/owncloud is kept together even during a backup. It is better to rely on config.php than @@ -188,16 +200,16 @@ if [ ! -d /usr/local/lib/owncloud/ ] || [[ ! ${CURRENT_NEXTCLOUD_VER} =~ ^$nextc InstallNextcloud 16.0.6 0bb3098455ec89f5af77a652aad553ad40a88819 3.3.0 e55d0357c6785d3b1f3b5f21780cb6d41d32443a 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 0.7.0 555a94811daaf5bdd336c5e48a78aa8567b86437 CURRENT_NEXTCLOUD_VER="16.0.6" fi - if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^16 ]]; then + if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^16 ]]; then InstallNextcloud 17.0.6 50b98d2c2f18510b9530e558ced9ab51eb4f11b0 3.3.0 e55d0357c6785d3b1f3b5f21780cb6d41d32443a 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 0.7.0 555a94811daaf5bdd336c5e48a78aa8567b86437 CURRENT_NEXTCLOUD_VER="17.0.6" - fi - if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^17 ]]; then - # Don't exit the install if this column already exists (see #2076) + fi + if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^17 ]]; then + # Don't exit the install if this column already exists (see #2076) (echo "ALTER TABLE oc_flow_operations ADD COLUMN entity VARCHAR;" | sqlite3 $STORAGE_ROOT/owncloud/owncloud.db 2>/dev/null) || true - InstallNextcloud 18.0.10 39c0021a8b8477c3f1733fddefacfa5ebf921c68 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a - CURRENT_NEXTCLOUD_VER="18.0.10" - fi + InstallNextcloud 18.0.10 39c0021a8b8477c3f1733fddefacfa5ebf921c68 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a + CURRENT_NEXTCLOUD_VER="18.0.10" + fi if [[ ${CURRENT_NEXTCLOUD_VER} =~ ^18 ]]; then InstallNextcloud 19.0.4 01e98791ba12f4860d3d4047b9803f97a1b55c60 3.4.1 aee680a75e95f26d9285efd3c1e25cf7f3bfd27e 2.0.3 9d9717b29337613b72c74e9914c69b74b346c466 1.0.0 3bf2609061d7214e7f0f69dd8883e55c4ec8f50a CURRENT_NEXTCLOUD_VER="19.0.4" diff --git a/setup/system.sh b/setup/system.sh index e52dd049..b6d16f27 100755 --- a/setup/system.sh +++ b/setup/system.sh @@ -75,7 +75,14 @@ then fi fi -# Certbot doesn't require a PPA in Debian +# ### Set log retention policy. + +# Set the systemd journal log retention from infinite to 10 days, +# since over time the logs take up a large amount of space. +# (See https://discourse.mailinabox.email/t/journalctl-reclaim-space-on-small-mailinabox/6728/11.) +tools/editconf.py /etc/systemd/journald.conf MaxRetentionSec=10day + +hide_output systemctl restart systemd-journald.service # ### Update Packages diff --git a/setup/webmail.sh b/setup/webmail.sh index e4ee18c4..d8994895 100755 --- a/setup/webmail.sh +++ b/setup/webmail.sh @@ -28,16 +28,21 @@ apt_install \ # Install Roundcube from source if it is not already present or if it is out of date. # Combine the Roundcube version number with the commit hash of plugins to track # whether we have the latest version of everything. - -VERSION=1.5.0 -HASH=2a9d11d9c10c8e8756120606c47eef702f00fe6d +# For the latest versions, see: +# https://github.com/roundcube/roundcubemail/releases +# https://github.com/mfreiholz/persistent_login/commits/master +# https://github.com/stremlau/html5_notifier/commits/master +# https://github.com/mstilkerich/rcmcarddav/releases +# The easiest way to get the package hashes is to run this script and get the hash from +# the error message. +VERSION=1.5.2 +HASH=208ce4ca0be423cc0f7070ff59bd03588b4439bf PERSISTENT_LOGIN_VERSION=59ca1b0d3a02cff5fa621c1ad581d15f9d642fe8 HTML5_NOTIFIER_VERSION=68d9ca194212e15b3c7225eb6085dbcf02fd13d7 # version 0.6.4+ -CONTEXT_MENU_VERSION=602a3812922fb8f71814eb3b8d91e9b7859aab7e # version 3.2.1 -TWOFACT_COMMIT=a3944c4604fe86fc020847f281beea031e14e58e # master @ 17-10-2021 - CARDDAV_VERSION=4.3.0 CARDDAV_HASH=4ad7df8843951062878b1375f77c614f68bc5c61 +CONTEXT_MENU_VERSION=602a3812922fb8f71814eb3b8d91e9b7859aab7e # version 3.2.1 +TWOFACT_COMMIT=a3944c4604fe86fc020847f281beea031e14e58e # master @ 17-10-2021 UPDATE_KEY=$VERSION:$PERSISTENT_LOGIN_VERSION:$HTML5_NOTIFIER_VERSION:$CARDDAV_VERSION:$CONTEXT_MENU_VERSION:$TWOFACT_COMMIT