minor fixes and improvements
[distro-setup] / mail-setup
index 59a122af106ed8aa5ca04c278eaae1a2720a6675..47f5990258ca184d2c5388f6411ce25507f26701 100755 (executable)
@@ -3,7 +3,7 @@
 # Copyright (C) 2019 Ian Kelling
 # SPDX-License-Identifier: AGPL-3.0-or-later
 
-# todo: backup hosts should only allow external mail that is authed and
+# todo:  hosts should only allow external mail that is authed and
 # destined for backup route. it is a minor issue since traffic is
 # limited to the wghole network.
 
@@ -873,12 +873,13 @@ EOF
 rm -fv /etc/exim4/conf.d/retry/37_retry
 
 cat >/etc/exim4/conf.d/retry/17_retry <<'EOF'
-# Retry faster than usual for sending to domains that I send with send-test-forward.
-iankelling.org * F,2d,15m;F,14d,2h
-amnimal.ninja * F,2d,15m;F,14d,2h
-expertpathologyreview.com * F,2d,15m;F,14d,2h
-je.b8.nz * F,2d,15m;F,14d,2h
-zroe.org * F,2d,15m;F,14d,2h
+# Retry fast for my own domains
+iankelling.org * F,1d,10m;F,14d,1h
+amnimal.ninja * F,1d,10m;F,14d,1h
+expertpathologyreview.com * F,1d,10m;F,14d,1h
+je.b8.nz * F,1d,10m;F,14d,1h
+zroe.org * F,1d,10m;F,14d,1h
+eximbackup.b8.nz * F,1d,4m;F,14d,1h
 EOF
 
 
@@ -913,9 +914,10 @@ MAIN_TRUSTED_GROUPS = $u
 # default is 10. when exim has been down for a bit, fsf mailserver
 # will do a big send in one connection, then exim decides to put
 # the messages in the queue instead of delivering them, to avoid
-# spawning too many delivery processes. Pretty sure my system
-# can handle a lot more, but lets go with this.
-smtp_accept_queue_per_connection = 100
+# spawning too many delivery processes. This is the same as the
+# fsfs value. And the corresponding one for how many messages
+# to send out in 1 connection remote_max_parallel = 256
+smtp_accept_queue_per_connection = 500
 
 
 DKIM_CANON = relaxed
@@ -2315,7 +2317,7 @@ data = b@eximbackup.b8.nz
 # alerts avoids potential mail loop. root is already
 # redirected earlier, so that is just being overly cautious.
 local_parts = ! root : ! testignore : ! alerts
-unseen
+unseen = true
 
 backup_copy:
 driver = manualroute
@@ -2850,7 +2852,10 @@ EOF
     test_to="testignore@iankelling.org, testignore@zroe.org, testignore@expertpathologyreview.com, testignore@amnimal.ninja"
     ;;&
   $MAIL_HOST|bk|je)
-    echo '#!/bin/bash' >/usr/local/bin/send-test-forward
+    cat >/usr/local/bin/send-test-forward <<'EOF'
+#!/bin/bash
+exiqgrep -o 260 -i -r '^(testignore@(iankelling\.org|zroe\.org|expertpathologyreview\.com|amnimal\.ninja|je\.b8\.nz)|jtuttle@gnu\.org)$' | xargs /sbin/exim -Mrm >/dev/null
+EOF
     for test_from in ${test_froms[@]}; do
       cat >>/usr/local/bin/send-test-forward <<EOFOUTER
 /usr/sbin/exim -f $test_from -t <<EOF