iankelling.org
/
git
/
distro-setup
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2fab672
)
fix wrongly escaped test cronjob
author
Ian Kelling
<ian@iankelling.org>
Mon, 29 Jul 2019 17:03:39 +0000
(13:03 -0400)
committer
Ian Kelling
<ian@iankelling.org>
Mon, 29 Jul 2019 17:03:39 +0000
(13:03 -0400)
mail-setup
patch
|
blob
|
history
diff --git
a/mail-setup
b/mail-setup
index b79fd8483fa44fd6a0ae9d0bbf56f05ee2d85389..645510a14049d1c0ff8d61e313a1843b75426ed3 100755
(executable)
--- a/
mail-setup
+++ b/
mail-setup
@@
-877,10
+877,17
@@
systemctl enable exim4
if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
if [[ $HOSTNAME == "$MAIL_HOST" ]]; then
+ f=/usr/local/bin/send-test-forward
+ cat >$f <<'EOF'
+#!/bin/bash
+echo body_test | mail -s "primary_test $(date +%s) $(date +%Y-%m-%dT%H:%M:%S%z)" iank@posteo.de
+EOF
+ chmod +x $f
+
cat >/etc/cron.d/mailtest <<EOF
SHELL=/bin/bash
# running as user just because no need to run as root
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
$f
*/10 * * * * $u /usr/local/bin/mailtest-check
*/10 * * * * root chmod -R g+rw /m/md/bounces
EOF
*/10 * * * * $u /usr/local/bin/mailtest-check
*/10 * * * * root chmod -R g+rw /m/md/bounces
EOF