X-Git-Url: https://iankelling.org/git/?a=blobdiff_plain;ds=sidebyside;f=mail-setup;h=058fb4f52d4d56e4894212a2a1d804d4b36f4a05;hb=f7eaad64a7c5f3bc851f146e1f258d34f398a7d7;hp=b8440fbfc7fc3684678f851273128102a238cfe4;hpb=effc74a288ee7e4d0a83bbf3335ba10f95eb7b8a;p=distro-setup diff --git a/mail-setup b/mail-setup index b8440fb..058fb4f 100755 --- a/mail-setup +++ b/mail-setup @@ -322,7 +322,7 @@ debconf-set-selections </etc/exim4/rcpt_local_acl <<'EOF' @@ -419,7 +419,7 @@ trap 'echo "$0:$LINENO:error: \"$BASH_COMMAND\" returned $?" >&2' ERR [[ $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 @@ -543,8 +543,7 @@ exim4-config exim4/mailname string mail.iankelling.org # 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 @@ -973,6 +972,17 @@ fi 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.