diff options
author | rhatto <rhatto> | 2005-08-10 16:05:57 +0000 |
---|---|---|
committer | rhatto <rhatto> | 2005-08-10 16:05:57 +0000 |
commit | 5e906be576303f262908ba4e2cecacb789ff359c (patch) | |
tree | 5841fe06b5be10e26f967284badee75177bfac8c /firma | |
parent | 5b6e9794bd413635d3db56516a3b5cde83bfdaf7 (diff) | |
download | firma-5e906be576303f262908ba4e2cecacb789ff359c.tar.gz firma-5e906be576303f262908ba4e2cecacb789ff359c.tar.bz2 |
fixed stuff with LIST_MESSAGE
Diffstat (limited to 'firma')
-rwxr-xr-x | firma | 20 |
1 files changed, 15 insertions, 5 deletions
@@ -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 { |