aboutsummaryrefslogtreecommitdiff
path: root/firma
diff options
context:
space:
mode:
Diffstat (limited to 'firma')
-rwxr-xr-xfirma26
1 files changed, 24 insertions, 2 deletions
diff --git a/firma b/firma
index e81b6f3..e992a54 100755
--- a/firma
+++ b/firma
@@ -136,6 +136,8 @@ function message_list {
# compose and send a message to the list
# $1: subscriber email
# sorry no identation :P
+n=0
+unset LIST_MESSAGE
echo "$PASSWD
Message from: $FROM
Subject: $SUBJECT
@@ -144,7 +146,17 @@ $DATE
$(get_gpg_stderr | grep -F 'gpg: Signature made')
$(get_gpg_stderr | grep -F 'gpg: Good signature from')
-$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | $MAIL -r $LISTNAME $1
+$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | while read STDIN; do
+ LIST_MESSAGE[$n]="$STDIN\n"
+ ((++n))
+done
+
+echo -e "From: $LISTNAME
+To: $1
+Subject: none
+
+$(echo -e "${LIST_MESSAGE[@]}")" | $MAIL $MAIL_ARGS
+
}
function message_list_error {
@@ -158,7 +170,17 @@ $DATE
$(get_gpg_stderr | grep -F 'gpg: Signature made')
$(get_gpg_stderr | grep -F 'gpg: BAD signature from')
-$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | $MAIL -r $LISTNAME $1
+$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | while read STDIN; do
+ LIST_MESSAGE[$n]="$STDIN\n"
+ ((++n))
+done
+
+echo -e "From: $LISTNAME
+To: $1
+Subject: none
+
+$(echo -e "${LIST_MESSAGE[@]}")" | $MAIL $MAIL_ARGS
+
}
function message_list_return {