Commit graph

1042 commits

Author SHA1 Message Date
Joshua Tauberer
78d71498fa Upgrade from PHP 7.2 to 8.0 for Ubuntu 22.04
* Add the PHP PPA.
* Specify the version when invoking the php CLI.
* Specify the version in package names.
* Update paths to 8.0 (using a variable in the setup scripts).
* Update z-push's php-xsl dependency to php8.0-xml.
* php-json is now built-into PHP.

Although PHP 8.1 is the stock version in Ubuntu 22.04, it's not supported by Nextcloud yet, and it likely will never be supported by the the version of Nextcloud that succeeds the last version of Nextcloud that supports PHP 7.2, and we have to install the next version so that an upgrade is permitted, so skipping to PHP 8.1 may not be easily possible.
2022-07-28 14:02:46 -04:00
Joshua Tauberer
b41a0ad80e Drop some hacks that we needed for Ubuntu 18.04
* certbot's PPA is no longer needed because a recent version is now included in the Ubuntu respository.
* Un-pin b2sdk (reverts 69d8fdef99 and d829d74048).
* Revert boto+s3 workaround for duplicity (partial revert of 99474b348f).
* Revert old "fix boto 2 conflict on Google Compute Engine instances" (cf33be4596) which is probably no longer needed.
2022-07-28 14:02:46 -04:00
Daniel Mabbett
8cb360fe36 Configure nsd listening interfaces before installing nsd so that it does not interfere with bind9 2022-07-28 14:02:46 -04:00
Joshua Tauberer
f534a530d4 Update and drop some package and file names for Ubuntu 22.04
* Fix path to bind9 startup options file in Ubuntu 22.04.
* tinymce has not been a Roundcube requirement recently and is no longer a package in Ubuntu 22.04
* Upgrade Vagrant box to Ubuntu 22.04
2022-07-28 14:02:46 -04:00
Joshua Tauberer
2abcafd670 Update Ubuntu version checks from 18.04 to 22.04 2022-07-28 14:02:44 -04:00
Joshua Tauberer
3c3d62ac27 Version 57a 2022-06-19 08:58:09 -04:00
Joshua Tauberer
d829d74048 Pin b2sdk to version 1.14.1 in the virtualenv also
We install b2sdk in two places: Once globally for duplicity (see
9d8fdef9915127f016eb6424322a149cdff25d7 for #2125) and once in
a virtualenv used by our control panel. The latter wasn't pinned
when the former was but should be to fix new Python compatibility
issues.

Anyone who updated Python packages recently (so anyone who upgraded
Mail-in-a-Box) started encountering these issues.

Fixes #2131.

See https://discourse.mailinabox.email/t/backblaze-b2-backup-not-working-since-v57/9231.
2022-06-18 13:15:59 -04:00
Joshua Tauberer
2aca421415 Version 57 2022-06-12 08:18:42 -04:00
David Duque
a0d44f3d05 v56.5 2022-06-07 11:38:10 +01:00
David Duque
55dbd9d93c Nextcloud user permission fixes 2022-06-07 11:24:12 +01:00
David Duque
3503b5a1f0 Update nextcloud to v23.0.5
* Contacts to v4.1.1
* Calendar to 3.3.1
2022-06-07 11:18:22 +01:00
jbandholz
9004bb6e8e
Add IPV6 addresses to fail2ban ignoreip (#2069)
Update jails.conf to include IPV6 localhost and external ip to ignoreip line.  Update system.sh to include IPV6 address in replacement.  See mail-in-a-box#2066 for details.
2022-06-05 09:40:54 -04:00
m-picc
69d8fdef99
Specify b2sdk version 1.14.1 (#2125)
pin b2sdk version to 1.14.1 to resolve exception that occurs when attempting to use backblaze backups. See https://github.com/mail-in-a-box/mailinabox/issues/2124 for details.
2022-06-05 09:24:32 -04:00
Austin Ewens
eeee712cf3
Switched to using tags over releases for NextCloud contacts/calendar (#2105)
See [mailinabox issue #2088](https://github.com/mail-in-a-box/mailinabox/issues/2088). This also updates the commit hashes to for anyone updating from NextCloud version 17 (as shown in the related issue) since a different hash is used for tags vs releases.

This was tested and verified to work on a setup previously running v0.44 and then updating to the latest version (v56).
2022-05-04 17:09:53 -04:00
David Duque
e5ffae7791 Upgrade Nextcloud to v23.0.4, External User Backend to v3.0.0 2022-04-27 23:22:55 +01:00
David Duque
7df762b46b v56.4 2022-03-29 17:29:20 +01:00
David Duque
f605e55997 Handle the absence of openssh-server
It is not strictly required for us to have sshd installed,
for example on baremetal machines where shell access
is physical-only.

Instead we'll skip certain tasks that depend on sshd if
it is not installed.
2022-03-29 17:14:06 +01:00
David Duque
1fcc1a489b
v56.3 2022-03-22 18:25:36 +00:00
David Duque
fece9355cf
Update NextCloud to v23.0.3 2022-03-22 18:01:51 +00:00
David Duque
a56bb235d7
Upgrade FontAwesome to v6.1.1, Persistent Login Plugin to v5.3.0 2022-03-22 16:41:54 +00:00
David Duque
6602d2c774
Merge from main 2022-02-20 20:45:14 +00:00
David Duque
2cee801002
v56.2 2022-02-18 01:07:01 +00:00
David Duque
d8d742d74d
Update contacts to v4.0.8, cal to v3.0.6 2022-02-18 00:56:26 +00:00
David Duque
4da6f66b94
Update Postfix TLS configuration (#45)
* Update the list of very old ciphers that shouldn't be used at all
* Enforce cipher preference server side
2022-02-18 00:43:13 +00:00
David Duque
51fa2a6fd9
Change the SMTP banner as not to disclose the operating system (which was set to be always 'Debian') 2022-02-17 23:28:20 +00:00
David Duque
deaecbe0d2
Fix nextcloud issue piping stderr to a file 2022-02-17 23:27:45 +00:00
David Duque
56b0fc02da
Install libsasl2-modules (#44)
Required for SMTP relays to work
2022-02-17 23:25:01 +00:00
David Duque
14534fd0cb
Fix nextcloud cleanup typo 2022-01-31 16:10:28 +00:00
David Duque
6b4ee8f576
Merge from main 2022-01-31 00:53:59 +00:00
David Duque
ed886ee934
Admin panel refactoring (#41) 2022-01-31 00:52:22 +00:00
David Duque
16b521c2f0
v56.1 2022-01-24 01:52:48 +00:00
David Duque
6436bad483
Recreate Python env after an in-place OS upgrade
Fixes #42
2022-01-24 01:48:34 +00:00
David Duque
271b03a346
v56.0 2022-01-22 20:00:01 +00:00
David Duque
37a97a394f
Suppress complaints about owncloud not existing (legacy setup code) 2022-01-22 19:58:03 +00:00
David Duque
152d7c39bc
Band-aid fix for B2 backups on Debian 10 2022-01-22 18:53:49 +00:00
David Duque
b622df6b03
Update Software:
- Bootstrap to v4.6.1
- FontAwesome to v5.15.4
- NextCloud Calendar to v3.0.5
- Roundcube Persistent Login to latest commit
2022-01-20 15:49:06 +00:00
David Duque
cd9bd51ed0
Import changes from upstream (v56) 2022-01-20 15:02:16 +00:00
Joshua Tauberer
3a7de051ee Version 56 (January 19, 2022) 2022-01-19 16:59:34 -05:00
Joshua Tauberer
d1d6318862 Set systemd journald log retention to 10 days (from no limit) to reduce disk usage 2022-01-08 09:11:48 -05:00
Joshua Tauberer
34b7a02f4f Update Roundcube to 1.5.2 2022-01-08 09:00:12 -05:00
Joshua Tauberer
a312acc3bc Update to Nextcloud 20.0.8 and update apps 2022-01-08 09:00:12 -05:00
jvolkenant
c92fd02262
Don't die if column already exists on Nextcloud 18 upgrade (#2078) 2021-12-25 10:17:34 -05:00
Ilnahro
50a5cb90bc
Include rsync to the installed basic packages (#2067)
Some VPS providers strip this package from their Ubuntu 18.04 VM images. This will help avoid errors.
2021-11-30 19:50:01 -05:00
David Duque
4812ffd6b3
v55.1 2021-11-17 22:58:33 +00:00
David Duque
faacc1d674
Update to above: Bail only at the second failure. 2021-11-17 22:55:18 +00:00
David Duque
5e66af63f2
Don't bail if pollinate fails 2021-11-17 22:42:45 +00:00
David Duque
972c413b19
nginx: Overhaul upstream directives (#38)
* Add a way for users to specify custom upstream directives via .upstream.conf file;
* MiaB-managed applications and user applications will now use different sockets;
2021-11-17 22:41:36 +00:00
jvolkenant
58b0323b36
Update persistent_login for Roundcube 1.5 (#2055) 2021-11-04 18:59:10 -04:00
David Duque
109267c7b0
v55.0 2021-10-19 21:12:17 +01:00
David Duque
cb7cbe419e
Update external software checksums 2021-10-19 21:08:24 +01:00
David Duque
dab920042e
Update external software 2021-10-19 21:05:19 +01:00
David
856260bf29
Check for lsb_release, and if it doesn't exist, install it 2021-10-19 14:43:01 +01:00
David
f6d7d5689c
Merge v55 from upstream 2021-10-19 14:42:07 +01:00
Joshua Tauberer
65861c68b7 Version 55 2021-10-18 20:40:51 -04:00
Joshua Tauberer
71a7a3e201 Upgrade to Roundcube 1.5 2021-10-18 20:40:51 -04:00
Joshua Tauberer
113b7bd827 Disable SMTPUTF8 in Postfix because Dovecot LMTP doesn't support it and bounces messages that require SMTPUTF8
By not advertising SMTPUTF8 support at the start, senders may opt to transmit recipient internationalized domain names in IDNA form instead, which will be deliverable.

Incoming mail with internationalized domains was probably working prior to our move to Ubuntu 18.04 when postfix's SMTPUTF8 support became enabled by default.

The previous commit is retained because Mail-in-a-Box users might prefer to keep SMTPUTF8 on for outbound mail, if they are not using internationalized domains for email, in which case the previous commit fixes the 'relay access denied' error even if the emails aren't deliverable.
2021-09-24 08:11:36 -04:00
Joshua Tauberer
3e19f85fad Add domain maps from Unicode forms of internationalized domains to their ASCII forms
When an email is received by Postfix using SMTPUTF8 and the recipient domain is a Unicode internationalized domain, it was failing to be delivered (bouncing with 'relay access denied') because our users and aliases tables only store ASCII (IDNA) forms of internationalized domains. In this commit, domain maps are added to the auto_aliases table from the Unicode form of each mail domain to its IDNA form, if those forms are different. The Postfix domains query is updated to look at the auto_aliases table now as well, since it is the only table with Unicode forms of the mail domains.

However, mail delivery is still not working since the Dovecot LMTP server does not support SMTPUTF8, and mail still bounces but with an error that SMTPUTF8 is not supported.
2021-09-24 08:11:36 -04:00
Joshua Tauberer
11e84d0d40 Move automatically generated aliases to a separate database table
They really should never have been conflated with the user-provided aliases.

Update the postfix alias map to query the automatically generated aliases with lowest priority.
2021-09-24 08:11:36 -04:00
drpixie
df46e1311b
Include NSD config files from /etc/nsd/nsd.conf.d/*.conf (#2035)
And write MIAB dns zone config into /etc/nsd/nsd.conf.d/zones.conf. Delete lingering old zones.conf file.

Co-authored-by: Joshua Tauberer <jt@occams.info>
2021-09-24 08:07:40 -04:00
David Duque
4c4cce836e
Merge changes from upstream 2021-09-07 17:08:05 +01:00
Joshua Tauberer
e884c4774f Replace HMAC-based session API keys with tokens stored in memory in the daemon process
Since the session cache clears keys after a period of time, this fixes #1821.

Based on https://github.com/mail-in-a-box/mailinabox/pull/2012, and so:

Co-Authored-By: NewbieOrange <NewbieOrange@users.noreply.github.com>

Also fixes #2029 by not revealing through the login failure error message whether a user exists or not.
2021-09-06 09:23:58 -04:00
Joshua Tauberer
700188c443 Roundcube 1.5 RC 2021-09-06 09:23:58 -04:00
David Duque
09f635c1f9
v0.54.POWER.5 2021-08-26 17:17:56 +01:00
David Duque
d8c77527bd
Debian 11 support (#25) 2021-08-23 02:06:38 +01:00
David Duque
d557885aab
SMTP Relay feature rework (#23) 2021-08-23 02:06:10 +01:00
David
a4c5f14237
Revert nsd changes 2021-08-02 15:02:54 +01:00
David
8b2f7f2e4c
v0.54.POWER.4 2021-07-29 01:42:55 +01:00
David
aae5fb4b74
nsd: Don't rely on private and public ip's being the same 2021-07-29 01:33:49 +01:00
David
fd15b28b3d
bind9: Configure on default/bind9 and default/named 2021-07-29 01:33:24 +01:00
David
e98d830f7f
v0.54.POWER.3 2021-07-04 11:24:11 +01:00
David
9ab5733af4
v0.54.POWER.2 2021-07-03 22:55:12 +01:00
David
8cb60ecad7
Fix script warnings on Ubuntu 2021-07-03 22:50:49 +01:00
David
63081c647a
v0.54.POWER.1 2021-07-03 21:27:01 +01:00
David
b2854c3afb
duplicity on debian 10 runs on python 2 2021-07-03 21:26:07 +01:00
David
dc7bae04c7
Fix pgp.sh complaining about grep 2021-07-03 01:08:40 +01:00
David
b53add2798
Make output from setup scripts a little bit less noisy 2021-07-03 00:46:31 +01:00
David
e1aabc4504
Backups: Alternative imports for legacy path (debian 10) 2021-07-03 00:25:42 +01:00
David
c125f462e1
Add get_os_code helper function to setup scripts 2021-07-02 21:28:25 +01:00
David
3018cdd698
v0.54.POWER.0 2021-06-28 00:17:23 +01:00
David
edfb1cf623
Resolve dovecot deprecations 2021-06-27 23:11:24 +01:00
David
afe7123f70
Merge v0.54 from upstream 2021-06-27 22:24:26 +01:00
Joshua Tauberer
4cb46ea465 v0.54 2021-06-20 15:50:04 -04:00
David Duque
9f9eb920b3
v0.53.POWER.2 2021-05-16 23:20:55 +01:00
David Duque
217b0b51ff
Bad bootstrap script, fixing! 2021-05-16 23:20:20 +01:00
David Duque
f382a55a0a
v0.53.POWER.1 2021-05-16 21:41:37 +01:00
David Duque
483817440e
Fetch updates from upstream 2021-05-16 21:18:40 +01:00
Joshua Tauberer
d510c8ae2a Enable and recommend port 465 for mail submission instead of port 587 (fixes #1849)
Port 465 with "implicit" (i.e. always-on) TLS is a more secure approach than port 587 with explicit (i.e. optional and only on with STARTTLS). Although we reject credentials on port 587 without STARTTLS, by that point credentials have already been sent.
2021-05-15 16:42:14 -04:00
Joshua Tauberer
dbd6dae5ce Fix exit status issue cased by 69fc2fdd 2021-05-08 09:02:48 -04:00
Thomas Urban
3701e05d92
Rewrite envelope from address in sieve forwards (#1949)
Fixes #1946.
2021-05-08 08:30:53 -04:00
jvolkenant
49813534bd
Updated Nextcloud to 20.0.8, contacts to 3.5.1, calendar to 2.2.0 (#1960) 2021-05-08 08:24:04 -04:00
jvolkenant
16e81e1439
Fix to allow for non forced "enforce" MTA_STS_MODE (#1970) 2021-05-08 08:18:49 -04:00
Joshua Tauberer
b7b67e31b7 Merged point release branch for v0.53a
Changed the Z-Push download URL.
2021-05-08 08:14:39 -04:00
Joshua Tauberer
2e7f2835e7 v0.53a 2021-05-08 08:13:37 -04:00
Joshua Tauberer
8a5f9f464a Download Z-Push from alternate site
The old server has been down for a few days.

Solution from https://discourse.mailinabox.email/t/temporary-fix-for-failed-wget-o-tmp-z-push-zip-https-stash-z-hub-io/8028. Fixes #1974.
2021-05-08 07:59:53 -04:00
Joshua Tauberer
69fc2fdd3a Hide spurrious Nextcloud setup output 2021-05-03 19:41:00 -04:00
Joshua Tauberer
9b07d86bf7 Use $(...) notation instead of legacy backtick notation for embedded shell commands
shellcheck reported

    SC2006: Use $(...) notation instead of legacy backticked `...`.

Fixed by applying shellcheck's diff output as a patch.
2021-05-03 19:28:23 -04:00
Joshua Tauberer
ae3feebd80 Fix warnings reported by shellcheck
* SC2068: Double quote array expansions to avoid re-splitting elements.
* SC2186: tempfile is deprecated. Use mktemp instead.
* SC2124: Assigning an array to a string! Assign as array, or use * instead of @ to concatenate.
* SC2102: Ranges can only match single chars (mentioned due to duplicates).
* SC2005: Useless echo? Instead of 'echo $(cmd)', just use 'cmd'.
2021-05-03 19:25:09 -04:00
Joshua Tauberer
2c295bcafd Upgrade the Roundcube persistent login cookie encryption to AES-256-CBC and increase the key length accordingly
This change will force everyone to be logged out of Roundcube since the encryption key and cipher won't match anyone's already-set cookie, but this happens anyway after every Mail-in-a-Box update since we generate a new key each time already.

Fixes #1968.
2021-04-23 17:04:56 -04:00
David Duque
9f13ee6d55
v0.53.POWER.0 2021-04-13 23:02:08 +01:00
David Duque
b9bdf50628
Merge v0.53 from upstream 2021-04-13 16:35:02 +01:00