exim4-config exim4/use_split_config boolean true
EOF
-source /a/bin/bash_unpublished/source-semi-priv
+source /a/bin/bash_unpublished/source-state
mkdir -p /etc/exim4/conf.d/{main,transport,auth,router}
cat >/etc/exim4/rcpt_local_acl <<'EOF'
[[ $EUID == 0 ]] || exec sudo "$BASH_SOURCE" "$@"
-f=/a/bin/bash_unpublished/source-semi-priv
+f=/a/bin/bash_unpublished/source-state
if [[ -e $f ]]; then
source $f
fi
# Other destinations for which mail is accepted:
# iank.bid is for testing
# mail.iankelling.org is for machines i own
-exim4-config exim4/dc_other_hostnames string *.iankelling.org;iankelling.org;*iank.bid;iank.bid;*zroe.org;zroe.org;*.b8.nz;b8.nz
-
+exim4-config exim4/dc_other_hostnames string *.iankelling.org;iankelling.org;*iank.bid;iank.bid;*zroe.org;zroe.org;*.b8.nz;b8.nz;*.fsf.org;fsf.org
systemctl restart exim4
systemctl enable exim4
+
+if [[ $HOSTNAME == $MAIL_HOST ]]; then
+ cat >/etc/cron.d/mailtest <<'EOF'
+*/10 * * * * iank echo body_test | mail -s "primary_test $(date +%s) $(date +%Y-%m-%dT%H:%M:%S%z)" iank@posteo.de
+2/10 * * * * root /usr/local/bin/mailtest-check
+EOF
+ cp /a/bin/distro-setup/filesystem/usr/local/bin/mailtest-check /usr/local/bin
+else
+ rm -f /etc/cron.d/mailtest
+fi
+
# MAIL_HOST also does radicale, and easier to start and stop it here
# for when MAIL_HOST changes, so radicale gets the synced files and
# does not stop us from remounting /o.