From 99c960fc563ebf1b1a14d615b7b71f92c2975b8e Mon Sep 17 00:00:00 2001 From: "github@kiekerjan.isdronken.nl" Date: Thu, 6 Jan 2022 22:06:27 +0100 Subject: [PATCH] dkimpy dev and nextcloud installation details --- setup/dkim.sh | 28 ++++++++++++---------------- setup/mail-postfix.sh | 2 +- setup/nextcloud.sh | 8 +++++++- setup/web.sh | 4 ---- 4 files changed, 20 insertions(+), 22 deletions(-) diff --git a/setup/dkim.sh b/setup/dkim.sh index c86f6145..9aa8a6b6 100755 --- a/setup/dkim.sh +++ b/setup/dkim.sh @@ -25,22 +25,18 @@ echo "127.0.0.1" > /etc/dkim/TrustedHosts touch /etc/dkim/KeyTable touch /etc/dkim/SigningTable -if grep -q "ExternalIgnoreList" /etc/dkimpy-milter/dkimpy-milter.conf; then - true # already done #NODOC -else - # Add various configuration options to the end of `dkimpy-milter.conf`. - cat >> /etc/dkimpy-milter/dkimpy-milter.conf << EOF; -Canonicalization relaxed/simple -MinimumKeyBits 1024 -ExternalIgnoreList refile:/etc/dkim/TrustedHosts -InternalHosts refile:/etc/dkim/TrustedHosts -KeyTable refile:/etc/dkim/KeyTable -KeyTableEd25519 refile:/etc/dkim/KeyTableEd25519 -SigningTable refile:/etc/dkim/SigningTable -Socket inet:8892@127.0.0.1 -RequireSafeKeys false -EOF -fi +tools/editconf.py /etc/dkimpy-milter/dkimpy-milter.conf -s \ + "MacroList=daemon_name|ORIGINATING" + "MacroListVerify=daemon_name|VERIFYING" + "Canonicalization=relaxed/simple" + "MinimumKeyBits=1024" + "ExternalIgnoreList=refile:/etc/dkim/TrustedHosts" + "InternalHosts=refile:/etc/dkim/TrustedHosts" + "KeyTable=refile:/etc/dkim/KeyTable" + "KeyTableEd25519=refile:/etc/dkim/KeyTableEd25519" + "SigningTable=refile:/etc/dkim/SigningTable" + "Socket=inet:8892@127.0.0.1" + "RequireSafeKeys=false" # Create a new DKIM key. This creates mail.private and mail.txt # in $STORAGE_ROOT/mail/dkim. The former is the private key and diff --git a/setup/mail-postfix.sh b/setup/mail-postfix.sh index 308e1b53..96f86c45 100755 --- a/setup/mail-postfix.sh +++ b/setup/mail-postfix.sh @@ -92,7 +92,7 @@ tools/editconf.py /etc/postfix/master.cf -s -w \ -o smtpd_sasl_auth_enable=yes -o syslog_name=postfix/submission -o smtpd_milters=inet:127.0.0.1:8892 - -o milter_macro_daemon_name=VERIFYING + -o milter_macro_daemon_name=ORIGINATING -o cleanup_service_name=authclean" \ "submission=inet n - - - - smtpd -o smtpd_sasl_auth_enable=yes diff --git a/setup/nextcloud.sh b/setup/nextcloud.sh index e5bc31e3..5a06fef6 100755 --- a/setup/nextcloud.sh +++ b/setup/nextcloud.sh @@ -16,6 +16,12 @@ apt_install php php-fpm \ php-dev php-gd php-xml php-mbstring php-zip php-apcu php-json \ php-intl php-imagick php-gmp php-bcmath +# Enable apc is required before installing nextcloud 21 +tools/editconf.py /etc/php/$(php_version)/mods-available/apcu.ini -c ';' \ + apc.enable_cli=1 + +restart_service php$(php_version)-fpm + InstallNextcloud() { version=$1 @@ -341,7 +347,7 @@ sudo -u www-data \ | (grep -v "No such app enabled" || /bin/true) # Install interesting apps -installed=$(sudo -u www-data php /usr/local/lib/owncloud/occ app:list | grep 'notes') +installed=$(sudo -u www-data php /usr/local/lib/owncloud/occ app:list | grep "notes") if [ -z "$installed" ]; then sudo -u www-data php /usr/local/lib/owncloud/occ app:install notes diff --git a/setup/web.sh b/setup/web.sh index b2cbaf6b..12133fe2 100755 --- a/setup/web.sh +++ b/setup/web.sh @@ -63,10 +63,6 @@ tools/editconf.py /etc/php/$(php_version)/fpm/php.ini -c ';' \ tools/editconf.py /etc/php/$(php_version)/fpm/pool.d/www.conf -c ';' \ env[PATH]=/usr/local/bin:/usr/bin:/bin \ -# Enable apc is required before installing nextcloud 21 -tools/editconf.py /etc/php/$(php_version)/mods-available/apcu.ini -c ';' \ - apc.enabled=1 - # Configure php-fpm based on the amount of memory the machine has # This is based on the nextcloud manual for performance tuning: https://docs.nextcloud.com/server/17/admin_manual/installation/server_tuning.html # Some synchronisation issues can occur when many people access the site at once.