adding msmtp-queue-handler depending on off/on status; make msmtp-queue paths configurable; reset counter when queue=0

This commit is contained in:
2016-11-23 12:44:29 +01:00
parent 42e41f3968
commit 3e0ec4d05a
4 changed files with 28 additions and 4 deletions

17
msmtp-handler.sh Executable file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
# If offline, direct mail to msmtp-enqueue.sh
# If online, direct mail to msmtp directly
CURDIR=$(dirname "$(readlink -f "$0")")
source "$CURDIR"/shared-functions.so
mail=$(cat)
par="$@"
if [ "$var_conn" == "off" ]; then
echo "$mail" | $MSMTP_EN $par
else
echo "$mail" | msmtp $par
fi