-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
+if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
+ cat >/etc/cron.d/mailtest <<EOF
+SHELL=/bin/bash
+# running as user just because no need to run as root
+*/10 * * * * $u echo body_test | mail -s "primary_test \$(date +%s) \$(date +%Y-%m-%dT%H:%M:%S%z)" iank@posteo.de
+*/10 * * * * $u /usr/local/bin/mailtest-check
+*/10 * * * * root chmod -R g+rw /m/md/bounces