Handle forwards as aliases with local copy

This commit is contained in:
Pierre Jaury
2017-02-02 21:36:50 +01:00
parent 41b1666609
commit 18834de56e
4 changed files with 1 additions and 33 deletions

View File

@@ -22,8 +22,3 @@ if allof (string :is "${extdata.spam_enabled}" "1",
if string :is "${extdata.reply_enabled}" "1" {
vacation :days 1 :subject "${extdata.reply_subject}" "${extdata.reply_body}";
}
if string :is "${extdata.forward_enabled}" "1" {
execute :pipe "forward" "${extdata.forward_destination}";
keep;
}

View File

@@ -1,13 +0,0 @@
#!/bin/bash
# Get the mail content
FILENAME=/tmp/forward-$$
cat > $FILENAME <&0
# Actually send the emails
IFS=',' read -ra RECIPIENTS <<< "$1"
for RECIPIENT in "${RECIPIENTS[@]}"; do
sendmail -S smtp $RECIPIENT < $FILENAME
done
rm $FILENAME