Allow forward to multiple destinations, fixes #34

This commit is contained in:
Pierre Jaury
2016-12-11 19:40:42 +01:00
parent f2ff1eb955
commit 692bcda868
2 changed files with 15 additions and 1 deletions

13
dovecot/sieve/bin/forward Executable file
View File

@@ -0,0 +1,13 @@
#!/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