1
0
mirror of https://github.com/mail-in-a-box/mailinabox.git synced 2026-03-12 17:07:23 +01:00

Merge branch 'master' into jammyjellyfish2204

# Conflicts:
#	setup/management.sh
#	setup/mods.available/connect-nextcloud-to-miab.sh
#	setup/start.sh
#	setup/webmail.sh
#	tests/lib/carddav.sh
#	tests/lib/system.sh
#	tests/system-setup/setup-defaults.sh
#	tests/system-setup/setup-funcs.sh
#	tests/system-setup/upgrade.sh
This commit is contained in:
downtownallday
2022-09-05 10:17:17 -04:00
20 changed files with 494 additions and 17 deletions

View File

@@ -589,6 +589,15 @@ apply_access_control() {
ldapmodify -Q -Y EXTERNAL -H ldapi:/// >/dev/null <<EOF
dn: $cdn
replace: olcAccess
# the next line is for nextcloud to be able to change user account
# passwords. remove it when nextcloud server issue #18406 is fixed
olcAccess: to dn.subtree="${LDAP_USERS_BASE}" attrs=userPassword
by dn.exact="cn=management,${LDAP_SERVICES_BASE}" write
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read
by dn.exact="cn=nextcloud,${LDAP_SERVICES_BASE}" write
by self =wx
by anonymous auth
by * none
olcAccess: to attrs=userPassword
by dn.exact="cn=management,${LDAP_SERVICES_BASE}" write
by dn.exact="gidNumber=0+uidNumber=0,cn=peercred,cn=external,cn=auth" read

View File

@@ -386,7 +386,7 @@ install_app() {
if [ ! -x /usr/bin/sudo ]; then
say "WARNING: sudo is not installed: Unable to run occ to check and/or install Nextcloud app \"$app\"."
elif [ -z "$(sudo -E -u www-data php $NCDIR/occ app:list | grep -F $app:)" ]; then
elif [ -z "$(sudo -E -u www-data php $NCDIR/occ app:list | grep -F "${app}:")" ]; then
say_verbose "Install app '$app'"
sudo -E -u www-data php $NCDIR/occ app:install $app
[ $? -ne 0 ] && die "Unable to install Nextcloud app '$app'"

View File

@@ -168,7 +168,9 @@ fi
if [ -d "${LOCAL_MODS_DIR:-local}" ]; then
for mod in $(ls "${LOCAL_MODS_DIR:-local}" | grep -v '~$'); do
if [ -x ${LOCAL_MODS_DIR:-local}/$mod ]; then
${LOCAL_MODS_DIR:-local}/$mod |& sed -e "s/^/mod(${mod%%.*}): /"
echo ""
echo "Running mod: ${LOCAL_MODS_DIR:-local}/$mod"
${LOCAL_MODS_DIR:-local}/$mod
fi
done
fi

View File

@@ -41,7 +41,7 @@ apt_install php${PHP_VER}-ldap
# the error message.
VERSION=1.6-rc
HASH=c44c683a06117162f4fccf5bd5883d4ed3595e45
PERSISTENT_LOGIN_VERSION=59ca1b0d3a02cff5fa621c1ad581d15f9d642fe8
PERSISTENT_LOGIN_VERSION=version-5.3.0
HTML5_NOTIFIER_VERSION=68d9ca194212e15b3c7225eb6085dbcf02fd13d7 # version 0.6.4+
CARDDAV_VERSION=4.4.1
CARDDAV_VERSION_AND_VARIANT=4.4.1-roundcube16
@@ -203,6 +203,15 @@ cat > ${RCM_PLUGIN_DIR}/carddav/config.inc.php <<EOF;
?>
EOF
# Configure persistent_login (required database tables are created
# later in this script)
cat > ${RCM_PLUGIN_DIR}/persistent_login/config.inc.php <<EOF
<?php
/* Do not edit. Written by Mail-in-a-Box. Regenerated on updates. */
\$rcmail_config['ifpl_use_auth_tokens'] = true; # enable AuthToken cookies
?>
EOF
# Create writable directories.
mkdir -p /var/log/roundcubemail /var/tmp/roundcubemail $STORAGE_ROOT/mail/roundcube
chown -R www-data.www-data /var/log/roundcubemail /var/tmp/roundcubemail $STORAGE_ROOT/mail/roundcube
@@ -243,6 +252,19 @@ php$PHP_VER ${RCM_DIR}/bin/updatedb.sh --dir ${RCM_DIR}/SQL --package roundcube
chown www-data:www-data $STORAGE_ROOT/mail/roundcube/roundcube.sqlite
chmod 664 $STORAGE_ROOT/mail/roundcube/roundcube.sqlite
# Create persistent login plugin's database tables
sqlite3 $STORAGE_ROOT/mail/roundcube/roundcube.sqlite < ${RCM_PLUGIN_DIR}/persistent_login/sql/sqlite.sql
# Enable PHP modules.
phpenmod -v $PHP_VER imap ldap
restart_service php$PHP_VER-fpm
# Periodically clean the roundcube database (see roundcubemail/INSTALL)
cat > /etc/cron.daily/mailinabox-roundcubemail << EOF
#!/bin/bash
# Mail-in-a-Box
# Clean up the roundcube database
cd $RCM_DIR && bin/cleandb.sh >/dev/null
EOF
chmod +x /etc/cron.daily/mailinabox-roundcubemail