From: rhatto Date: Wed, 10 Aug 2005 16:05:57 +0000 (+0000) Subject: fixed stuff with LIST_MESSAGE X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=5e906be576303f262908ba4e2cecacb789ff359c;p=firma.git fixed stuff with LIST_MESSAGE --- diff --git a/firma b/firma index d6dd140..523695d 100755 --- a/firma +++ b/firma @@ -131,21 +131,27 @@ function message_list { # compose and send a message to the list # $1: subscriber email # sorry no identation :P -echo "$PASSWD + +LIST_MESSAGE=( $(echo "$PASSWD Message from: $FROM Subject: $SUBJECT $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 | sed -e 's/^\(.*\)$/\1\\n/') ) + +# now send the message +echo -e "From: $LISTNAME\nTo: $1\nSubject: none\n\n${LIST_MESSAGE[@]}" | sed -e 's/^ //' | $MAIL $MAIL_ARGS -$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | $MAIL -r $LISTNAME $1 } function message_list_error { # compose and send an error message # sorry no identation :P -echo "$PASSWD + +LIST_MESSAGE=( $(echo "$PASSWD Message from: $FROM Subject: [BAD SIGNATURE] $SUBJECT $DATE @@ -153,7 +159,11 @@ $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 | sed -e 's/^\(.*\)$/\1\\n/') ) + +# now send the message +echo -e "From: $LISTNAME\nTo: $1\nSubject: none\n\n${LIST_MESSAGE[@]}" | sed -e 's/^ //' | $MAIL $MAIL_ARGS + } function message_list_return {