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

Initial Commit

Initial Commit
This commit is contained in:
kaibae19
2022-04-03 09:33:36 -07:00
parent 3a7de051ee
commit 7167d95564
6 changed files with 76 additions and 51 deletions

View File

@@ -83,6 +83,15 @@ address, so we're suggesting $DEFAULT_PRIMARY_HOSTNAME.
fi
fi
# Are we running an external CalDAV and CardDAV server? This will default the variable NC_HOSTNAME to
# PRIMARY_HOSTNAME unless it is changed. If change, Nextcloud installation is omitted from this setup script
input_box "External Cal/CardDAV server" \
"Are you using an external server for CalDAV and CardDAV (Nextcloud), if so, enter the FQDN of the server. \
IMPORTANT: Changing this from the default will omit the installation of Nextcloud on this system."
$PRIMARY_HOSTNAME \
DAV_HOSTNAME
# If the machine is behind a NAT, inside a VM, etc., it may not know
# its IP address on the public network / the Internet. Ask the Internet
# and possibly confirm with user.

View File

@@ -90,6 +90,7 @@ cat > /etc/mailinabox.conf << EOF;
STORAGE_USER=$STORAGE_USER
STORAGE_ROOT=$STORAGE_ROOT
PRIMARY_HOSTNAME=$PRIMARY_HOSTNAME
DAV_HOSTNAME=$DAV_HOSTNAME
PUBLIC_IP=$PUBLIC_IP
PUBLIC_IPV6=$PUBLIC_IPV6
PRIVATE_IP=$PRIVATE_IP
@@ -108,7 +109,10 @@ source setup/dkim.sh
source setup/spamassassin.sh
source setup/web.sh
source setup/webmail.sh
source setup/nextcloud.sh
# If DAV server hostname is differs from this machine, omit Nextcloud installation
if [ $DAV_HOSTNAME == $PRIMARY_HOSTNAME]; then
source setup/nextcloud.sh
fi
source setup/zpush.sh
source setup/management.sh
source setup/munin.sh

View File

@@ -72,6 +72,12 @@ cp conf/zpush/backend_carddav.php /usr/local/lib/z-push/backend/carddav/config.p
rm -f /usr/local/lib/z-push/backend/caldav/config.php
cp conf/zpush/backend_caldav.php /usr/local/lib/z-push/backend/caldav/config.php
# If user entered an external DAV server, update the Z-Push DAV service configurations with the server name
if [ $DAV_HOSTNAME != $PRIMARY_HOSTNAME ]; then
sed -i "s/127.0.0.1/$DAV_HOSTNAME/" /usr/local/lib/z-push/backend/carddav/config.php
sed -i "s/127.0.0.1/$DAV_HOSTNAME/" /usr/local/lib/z-push/backend/caldav/config.php
fi
# Configure Autodiscover
rm -f /usr/local/lib/z-push/autodiscover/config.php
cp conf/zpush/autodiscover_config.php /usr/local/lib/z-push/autodiscover/config.php