# Copyright (C) 2019 Ian Kelling
# SPDX-License-Identifier: AGPL-3.0-or-later
+# todo: move mail stuff in distro-end into this file
+
+# todo: fix ipv6 addr for li
+
# todo: create a cronjob to update or warn on expiring dnssec keys
# todo: turn on dnssec validation for dns resolution.
}
soff () {
for service; do
- m systemctl stop $service;
- m systemctl disable $service
+ # ignore services that dont exist
+ if systemctl cat $service &>/dev/null; then
+ m systemctl stop $service;
+ m systemctl disable $service
+ fi
done
}
sre () {
# light version of exim does not have sasl auth support.
-pi exim4 exim4-daemon-heavy spamassassin spf-tools-perl openvpn p0f postgrey pyzor razor jq moreutils
+pi exim4 exim4-daemon-heavy spamassassin spf-tools-perl openvpn p0f postgrey pyzor razor jq moreutils clamav-daemon
# note: pyzor debian readme says you need to run some initialization command
# but its outdated.
# entirely of whitespace".) This is a safe, terse alternative:
clear_report_template
report (_SCORE_ / _REQD_ requ) _TESTSSCORES(,)_ autolearn=_AUTOLEARN
+uridnsbl_skip_domain iankelling.org
+uridnsbl_skip_domain amnimal.ninja
+uridnsbl_skip_domain expertpathologyreview.com
+uridnsbl_skip_domain zroe.org
EOF
# keep your dkim signature intact but add list- headers.
DKIM_SIGN_HEADERS = mime-version:in-reply-to:references:from:date:subject:to
+av_scanner = clamd:/var/run/clamav/clamd.ctl
hostlist iank_trusted = <; \\
# veth0
add_header = X-Spam_report: $spam_report
add_header = X-Spam_action: $spam_action
+
+deny
+# defer_ok = accept messages even if there is a problem with clamav.
+# clamav regularly has fails, we havent had a reported problem with mail
+# not getting through, but this seems better.
+ malware = */defer_ok
+ message = This message was detected as possible malware ($malware_name).
+
+
#accept
# spf = pass:fail:softfail:none:neutral:permerror:temperror
# dmarc_status = reject:quarantine
;;&
$MAIL_HOST)
sstart radicale
- ;;
+ ;;&
+esac
+
+case $HOSTNAME in
+ $MAIL_HOST|bk|je) : ;;
*)
soff radicale mailclean.timer dovecot spamassassin mailvpn mailnn
;;
/b/ds/mailtest-check /b/ds/check-remote-mailqs /usr/local/bin/
;;&
$MAIL_HOST)
- test_from=ian@iankelling.org
+ test_froms=(ian@iankelling.org z@zroe.org)
test_to="testignore@expertpathologyreview.com, testignore@je.b8.nz"
cat >>/etc/cron.d/mailtest <<EOF
EOF
;;&
bk)
- test_from=testignore@expertpathologyreview.com
+ test_froms=(testignore@expertpathologyreview.com ziva@amnimal.ninja)
test_to="testignore@iankelling.org, testignore@je.b8.nz"
;;&
je)
- test_from=testignore@je.b8.nz
+ test_froms=(testignore@je.b8.nz)
test_to="testignore@iankelling.org, testignore@expertpathologyreview.com"
;;&
$MAIL_HOST|bk|je)
- cat >/usr/local/bin/send-test-forward <<EOFOUTER
+ echo '#!/bin/bash' >/usr/local/bin/send-test-forward
+ for test_from in ${test_froms[@]}; do
+ cat >>/usr/local/bin/send-test-forward <<EOFOUTER
#!/bin/bash
/usr/sbin/exim -f $test_from -t <<EOF
From: $test_from
/usr/local/bin/send-test-forward
EOF
EOFOUTER
+ done
m chmod +x /usr/local/bin/send-test-forward
;;
*)