adding msmtp-queue-handler depending on off/on status; make msmtp-queue paths configurable; reset counter when queue=0
This commit is contained in:
17
msmtp-handler.sh
Executable file
17
msmtp-handler.sh
Executable 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
|
||||
Reference in New Issue
Block a user