X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;f=mail-setup;h=a026f069efa4e1217a3e5d2245efc82fb047e83a;hb=4b3f043829a57215e1251122a8ab0019b717ca8d;hp=5166faa3a44e1a9009368ee48d9a989cfe3272d2;hpb=802e885e3e7fa3857f8bc4f54c261d5ca76f2454;p=distro-setup diff --git a/mail-setup b/mail-setup index 5166faa..a026f06 100755 --- a/mail-setup +++ b/mail-setup @@ -3,6 +3,12 @@ # Copyright (C) 2019 Ian Kelling # SPDX-License-Identifier: AGPL-3.0-or-later +# todo: setup a logrotate for /var/log/mymain and mypanic + +# todo: setup an alert for bouncing test emails. + +# todo: bounces to my fsf mail can come from fsf@iankelling.org, +# think about making bounces go from the original address. # todo: add a prometheus alert for dovecot. @@ -717,8 +723,12 @@ EOF for unit in ${nn_progs[@]}; do i /etc/systemd/system/$unit.service.d/nn.conf <>/etc/exim4/conf.d/main/000_local <>/etc/myexim4/conf.d/main/000_local-nn <<'EOF' +# this makes it easier to see which exim is doing what +log_file_path = /var/log/exim4/my%s +EOF # If we ever wanted to have a separate spool, # we could do it like this. # cat >>/etc/exim4/conf.d/main/000_local-nn <<'EOF' @@ -2981,6 +3020,9 @@ if [[ -e /nocow ]]; then # without local-fs on exim, we get these kind of errors in paniclog on shutdown: # Failed to create spool file /var/spool/exim4//input//1jCLxz-0008V4-V9-D: Permission denied After=local-fs.target + +[Service] +ExecStartPre=/usr/local/bin/exim-nn-iptables EOF if ! mountpoint -q $sdir; then stopifactive exim4 exim4in @@ -3146,7 +3188,7 @@ EOF ;;& $MAIL_HOST) test_froms=(ian@iankelling.org z@zroe.org iank@gnu.org) - test_to="testignore@expertpathologyreview.com, testignore@je.b8.nz, testignore@amnimal.ninja, jtuttle@gnu.org" + test_tos=(testignore@expertpathologyreview.com testignore@je.b8.nz testignore@amnimal.ninja jtuttle@gnu.org) cat >>/etc/cron.d/mailtest < /etc/exim4/ignore-sent + for t in ${test_tos[@]:1}; do + test_to+=", $t" + echo $t >> /etc/exim4/ignore-sent + done cat >/usr/local/bin/send-test-forward <<'EOF' #!/bin/bash olds=( @@ -3176,7 +3226,7 @@ EOF /usr/sbin/exim -f $test_from -t <