nix-git/examples/block-opensmtpd-queue.sh

13 lines
349 B
Bash
Raw Permalink Normal View History

2023-11-20 19:12:54 +01:00
#!/usr/bin/env bash
echo -e "Subject: Test\n\nHi there, this is some test." | sendmail -f langbein@mail.de daniel@systemli.org
while :; do
# Note: smtpctl requires root privileges.
queue="$(smtpctl show queue)"
if [ "${queue}" = "" ]; then
break
fi
printf '%s\n' 'Delaying suspend due to non-empty smtpd email queue.'
sleep 5s
done