From d1b45945b0bfbe21f628eb8c3965ece0eca900b4 Mon Sep 17 00:00:00 2001 From: "github@kiekerjan.isdronken.nl" Date: Sun, 9 May 2021 21:47:14 +0200 Subject: [PATCH] cleanup --- README.md | 4 +- setup/start.sh | 1 - setup/zpush.sh | 109 ------------------------------------------------- 3 files changed, 2 insertions(+), 112 deletions(-) delete mode 100755 setup/zpush.sh diff --git a/README.md b/README.md index 1033e5d1..da339d0b 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ Modifications are go --------------------- +==================== This is not the original Mail-in-a-Box. See https://github.com/mail-in-a-box/mailinabox for the real deal! Many thanks to [@JoshData](https://github.com/JoshData) and other [contributors](https://github.com/mail-in-a-box/mailinabox/graphs/contributors). I made a number of modifications to the original Mail-in-a-Box, some to fix bugs, some to ease maintenance for my personal installation, to learn and to add functionality. @@ -14,7 +14,7 @@ Functionality changes and additions enable postfix filters, lengthen bantime and findtime * Add fail2ban jails for both above mentioned geoipblocking filters * Add fail2ban filters for web scanners and badbots -* Add xapian full text searching to dovecot +* Add xapian full text searching to dovecot (from https://github.com/grosjo/fts-xapian) * Add rkhunter and chkrootkit * Configure domain names for which only www will be hosted. Edit /etc/miabwwwdomains.conf to configure. * Add some munin plugins diff --git a/setup/start.sh b/setup/start.sh index a4302f2a..4706d5c4 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -117,7 +117,6 @@ source setup/spamassassin.sh source setup/web.sh source setup/webmail.sh source setup/nextcloud.sh -#source setup/zpush.sh source setup/management.sh source setup/munin.sh source setup/additionals.sh diff --git a/setup/zpush.sh b/setup/zpush.sh deleted file mode 100755 index fa564188..00000000 --- a/setup/zpush.sh +++ /dev/null @@ -1,109 +0,0 @@ -#!/bin/bash -# -# Z-Push: The Microsoft Exchange protocol server -# ---------------------------------------------- -# -# Mostly for use on iOS which doesn't support IMAP IDLE. -# -# Although Ubuntu ships Z-Push (as d-push) it has a dependency on Apache -# so we won't install it that way. -# -# Thanks to http://frontender.ch/publikationen/push-mail-server-using-nginx-and-z-push.html. - -source setup/functions.sh # load our functions -source /etc/mailinabox.conf # load global vars - -# Prereqs. - -echo "Installing Z-Push (Exchange/ActiveSync server)..." -apt_install \ - php-soap php-imap libawl-php php-xsl - -phpenmod -v php imap - -# Copy Z-Push into place. -VERSION=2.6.2 -TARGETHASH=f0e8091a8030e5b851f5ba1f9f0e1a05b8762d80 -needs_update=0 #NODOC -if [ ! -f /usr/local/lib/z-push/version ]; then - needs_update=1 #NODOC -elif [[ $VERSION != `cat /usr/local/lib/z-push/version` ]]; then - # checks if the version - needs_update=1 #NODOC -fi -if [ $needs_update == 1 ]; then - # Download - wget_verify "https://github.com/Z-Hub/Z-Push/archive/refs/tags/$VERSION.zip" $TARGETHASH /tmp/z-push.zip - - # Extract into place. - rm -rf /usr/local/lib/z-push /tmp/z-push - unzip -q /tmp/z-push.zip -d /tmp/z-push - mv /tmp/z-push/*/src /usr/local/lib/z-push - rm -rf /tmp/z-push.zip /tmp/z-push - - rm -f /usr/sbin/z-push-{admin,top} - ln -s /usr/local/lib/z-push/z-push-admin.php /usr/sbin/z-push-admin - ln -s /usr/local/lib/z-push/z-push-top.php /usr/sbin/z-push-top - echo $VERSION > /usr/local/lib/z-push/version -fi - -# Configure default config. -sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" /usr/local/lib/z-push/config.php -sed -i "s/define('BACKEND_PROVIDER', .*/define('BACKEND_PROVIDER', 'BackendCombined');/" /usr/local/lib/z-push/config.php -sed -i "s/define('USE_FULLEMAIL_FOR_LOGIN', .*/define('USE_FULLEMAIL_FOR_LOGIN', true);/" /usr/local/lib/z-push/config.php -sed -i "s/define('LOG_MEMORY_PROFILER', .*/define('LOG_MEMORY_PROFILER', false);/" /usr/local/lib/z-push/config.php -sed -i "s/define('BUG68532FIXED', .*/define('BUG68532FIXED', false);/" /usr/local/lib/z-push/config.php -sed -i "s/define('LOGLEVEL', .*/define('LOGLEVEL', LOGLEVEL_ERROR);/" /usr/local/lib/z-push/config.php - -# Configure BACKEND -rm -f /usr/local/lib/z-push/backend/combined/config.php -cp conf/zpush/backend_combined.php /usr/local/lib/z-push/backend/combined/config.php - -# Configure IMAP -rm -f /usr/local/lib/z-push/backend/imap/config.php -cp conf/zpush/backend_imap.php /usr/local/lib/z-push/backend/imap/config.php -sed -i "s%STORAGE_ROOT%$STORAGE_ROOT%" /usr/local/lib/z-push/backend/imap/config.php - -# Configure CardDav -rm -f /usr/local/lib/z-push/backend/carddav/config.php -cp conf/zpush/backend_carddav.php /usr/local/lib/z-push/backend/carddav/config.php - -# Configure CalDav -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 - -# 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 -sed -i "s/PRIMARY_HOSTNAME/$PRIMARY_HOSTNAME/" /usr/local/lib/z-push/autodiscover/config.php -sed -i "s^define('TIMEZONE', .*^define('TIMEZONE', '$(cat /etc/timezone)');^" /usr/local/lib/z-push/autodiscover/config.php - -# Some directories it will use. - -mkdir -p /var/log/z-push -mkdir -p /var/lib/z-push -chmod 750 /var/log/z-push -chmod 750 /var/lib/z-push -chown www-data:www-data /var/log/z-push -chown www-data:www-data /var/lib/z-push - -# Add log rotation - -cat > /etc/logrotate.d/z-push <