You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mailu/dovecot/sieve/bin/forward

14 lines
249 B
Bash

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