1
0
mirror of https://codeberg.org/privacy1st/nix-git synced 2025-02-28 11:05:23 +01:00
nix-git/examples/block-opensmtpd-queue.sh

13 lines
349 B
Bash

#!/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