From f234193be4019bb40b50d2973632ce2469f4c0af Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Mon, 20 Dec 2021 22:07:10 -0500 Subject: [PATCH] minor fixes and improvements --- brc2 | 2 +- distro-end | 8 +++++--- mail-setup | 29 +++++++++++++++++------------ 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/brc2 b/brc2 index 0e9736e..9af6424 100644 --- a/brc2 +++ b/brc2 @@ -1181,7 +1181,7 @@ mygajim() { now=$(date +%s) sqlite3 -separator ' ' /p/c/subdir_files/.local/share/gajim/logs.db "select time, message from logs where contact_name = 'iank' and jid_id = 17;" | while read -r time l; do case $time in - ${now:0:3}*) : ;; + 16*) : ;; *) continue ;; esac if ! time_pretty=$(date +%F.%R -d @$time); then diff --git a/distro-end b/distro-end index 117042e..626eb48 100755 --- a/distro-end +++ b/distro-end @@ -713,13 +713,15 @@ RequiredBy=openvpn-server@mail.service EOF ser daemon-reload - # commented, wgmail handles this. - #sgo vpn-mail-forward.service # needed for li's local mail delivery. tu /etc/hosts <<<"10.8.0.4 mail.iankelling.org" + + # wgmail handles this. + #sgo vpn-mail-forward.service + # old: #sgo openvpn-server@mail - ser start wg-quick@wgmail + sgo wg-quick@wgmail # setup let's encrypt cert m web-conf apache2 mail.iankelling.org diff --git a/mail-setup b/mail-setup index 59a122a..47f5990 100755 --- a/mail-setup +++ b/mail-setup @@ -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 <