From: Ian Kelling Date: Wed, 5 Jul 2023 00:12:51 +0000 (-0400) Subject: mail fixes X-Git-Url: https://iankelling.org/git/?a=commitdiff_plain;h=83a72c65a1a20398c78e41147faa8195adda710c;p=distro-setup mail fixes --- diff --git a/mail-setup b/mail-setup index e7020d7..8da3a65 100755 --- a/mail-setup +++ b/mail-setup @@ -1349,7 +1349,7 @@ u /etc/exim4/conf.d/data_local_acl <<'EOF' # those docs are rather old and I see a 110k spam message # pretty quickly looking through my spam folder. -#warn +warn !hosts = +iank_trusted remove_header = X-Spam_score: X-Spam_score_int : X-Spam_bar : X-Spam_report @@ -2216,23 +2216,25 @@ if [[ $HOSTNAME == bk ]]; then ### begin composer install # https://getcomposer.org/doc/faqs/how-to-install-composer-programmatically.md - # cd $(mktemp -d) - # sum="$(wget -q -O - https://composer.github.io/installer.sig)" - # m php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" - # if [[ $sum != $(php -r "echo hash_file('sha384', 'composer-setup.php');") ]]; then - # echo 'ERROR: Invalid composer installer checksum' >&2 - # rm -fv composer-setup.php - # exit 1 - # fi - # m php composer-setup.php --quiet - # rm -fv composer-setup.php - # m mv composer.phar /usr/local/bin - - # the above method gets composer2, carddav plugin at least doesnt work with that - # yet, it was just released 10-24-2020. - m cd /usr/local/bin - m wget -nv -N https://getcomposer.org/composer-1.phar - chmod +x composer-1.phar + cd /usr/local/bin + EXPECTED_CHECKSUM="$(php -r 'copy("https://composer.github.io/installer.sig", "php://stdout");')" + php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" + ACTUAL_CHECKSUM="$(php -r "echo hash_file('sha384', 'composer-setup.php');")" + + if [ "$EXPECTED_CHECKSUM" != "$ACTUAL_CHECKSUM" ] + then + >&2 echo 'ERROR: Invalid installer checksum' + rm composer-setup.php + exit 1 + fi + + php composer-setup.php --quiet + rm composer-setup.php + + # based on error when running composer + mkdir /var/www/.composer + chown www-data:www-data /var/www/.composer + ### end composer install rcdirs=(/usr/local/lib/rcexpertpath /usr/local/lib/rcninja) @@ -2391,7 +2393,7 @@ EOF verf=$rcdir/plugins/carddav/myversion upgrade=false install=false - v=4.0.0 + v=5.0.1 if [[ -e $verf ]]; then if [[ $(cat $verf) != "$v" ]]; then install=true @@ -2403,16 +2405,16 @@ EOF if $install; then m rm -rf $rcdir/plugins/carddav tmpd=$(mktemp -d) - m wget -nv -O $tmpd/t.tgz https://github.com/blind-coder/rcmcarddav/releases/download/v$v/carddav-v$v.tgz + m wget -nv -O $tmpd/t.tgz https://github.com/blind-coder/rcmcarddav/releases/download/v$v/carddav-v$v.tar.gz cd $rcdir/plugins tar xzf $tmpd/t.tgz rm -rf $tmpd m chown -R www-data:www-data $rcdir/plugins/carddav m cd $rcdir/plugins/carddav if $upgrade; then - m sudo -u www-data composer-1.phar update --no-dev + m sudo -u www-data composer.phar update --no-dev else - m sudo -u www-data composer-1.phar install --no-dev + m sudo -u www-data composer.phar install --no-dev fi m chown -R root:root $rcdir/plugins/carddav echo $v >$verf @@ -2662,7 +2664,13 @@ fi ncbase=$1 cd /var/www/$ncbase # https://docs.nextcloud.com/server/22/admin_manual/maintenance/update.html?highlight=updater+phar +# the docs claim this is all you need, which is not true. +# You will go to the web ui and it will say that you need to click a button to update, +# or that you can run occ upgrade m php /var/www/$ncbase/updater/updater.phar -n +# throw a sleep in just because who knows what else is undocumented +sleep 5 +./occ upgrade EOFOUTER chmod +x /usr/local/bin/ncup @@ -2865,6 +2873,9 @@ EOF # ** $MAIL_HOST|bk) $MAIL_HOST|bk) + cat >>/etc/exim4/update-exim4.conf.conf <