alerting fixes
[distro-setup] / mail-setup
index 645510a14049d1c0ff8d61e313a1843b75426ed3..c313c46da685e41f4381bcadbb9cee071df3be50 100755 (executable)
@@ -544,7 +544,7 @@ EOF
   cat >$f <<'EOF'
 #!/bin/bash
 cd /etc
-wget -nv -N https://publicsuffix.org/list/public_suffix_list.dat
+wget -q -N https://publicsuffix.org/list/public_suffix_list.dat
 EOF
   chmod 755 $f
 
@@ -566,6 +566,9 @@ EOF
   # internet. I was torn about whether to do this or not, meh.
   pi dovecot-core dovecot-imapd dovecot-sieve dovecot-lmtpd
 
+  for f in /p/c/subdir_files/sieve/*sieve /a/c/subdir_files/sieve/*sieve; do
+    sudo -u $u /a/exe/lnf -T $f $(eval echo ~$u)/sieve/${f##*/}
+  done
   # if we changed 90-sieve.conf and removed the active part of the
   # sieve option, we wouldn\'t need this, but I\'d rather not modify a
   # default config if not needed. This won\'t work as a symlink in /a/c
@@ -837,6 +840,8 @@ for d in /Maildir /root/Maildir; do
   ln -sf -T /m/md/bounces $d
 done
 
+sudo -u $u ln -sf -T /m/.mu /home/$u/.mu
+
 # put spool dir in directory that spans multiple distros.
 # based on http://www.postfix.org/qmgr.8.html and my notes in gnus
 #
@@ -887,9 +892,9 @@ EOF
   cat >/etc/cron.d/mailtest <<EOF
 SHELL=/bin/bash
 # running as user just because no need to run as root
-*/10 * * * *   $u $f
-*/10 * * * *   $u /usr/local/bin/mailtest-check
-*/10 * * * *   root chmod -R g+rw /m/md/bounces
+*/10 * * * *   $u $f 2>&1 | /usr/local/bin/log-once send-test-forward
+*/10 * * * *   $u /usr/local/bin/mailtest-check 2>&1 | /usr/local/bin/log-once -1 send-test-forward
+*/10 * * * *   root chmod -R g+rw /m/md/bounces 2>&1 | /usr/local/bin/log-once -1 bounces-chmod
 EOF
   cp /a/bin/distro-setup/filesystem/usr/local/bin/mailtest-check /usr/local/bin
 else