aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto>2005-08-07 22:43:20 +0000
committerrhatto <rhatto>2005-08-07 22:43:20 +0000
commit4b56b64795aa83405b37c8a3149dc3e6e38eecf7 (patch)
tree62edf8df9e00f3a797210f82968bdf4819fe873f
parent081aa42dd6c238c136b8328d1603d337fb192133 (diff)
downloadfirma-4b56b64795aa83405b37c8a3149dc3e6e38eecf7.tar.gz
firma-4b56b64795aa83405b37c8a3149dc3e6e38eecf7.tar.bz2
palas
-rwxr-xr-xCHANGELOG2
-rwxr-xr-xfirma38
2 files changed, 11 insertions, 29 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 33ff8dd..59875f2 100755
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,8 @@
Firma CHANGELOG
---------------
+07/05/2005 -
+
07/05/2005 - 0.3-cvs (rev 1.13) - rhatto
- Firma now uses sendmail or any smtp wrapper directly:
diff --git a/firma b/firma
index 4c65930..2d1e7a3 100755
--- a/firma
+++ b/firma
@@ -131,7 +131,6 @@ function message_list {
# compose and send a message to the list
# $1: subscriber email
# sorry no identation :P
-n=0
echo "$PASSWD
Message from: $FROM
Subject: $SUBJECT
@@ -140,23 +139,12 @@ $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 | 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
-
+$(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
-n=0
echo "$PASSWD
Message from: $FROM
Subject: [BAD SIGNATURE] $SUBJECT
@@ -165,17 +153,7 @@ $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 | 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
-
+$(echo -e "$PASSWD\n${GPG_MESSAGE[@]}" | $GPGDECRYPT 2> /dev/null)" | sed -e 's/=20$//' | $GPGENCRYPT $1 | $MAIL -r $LISTNAME $1
}
function message_list_return {
@@ -259,7 +237,7 @@ function newlist {
chmod 600 $CONFIG
if [ -f $CONFIG ]; then
gpg_args
- echo -e "MAIL=$MAIL\n$MAIL_ARGS\nGPG=$GPG\nGPGDIR=$GPGDIR\nLISTNAME=$LISTNAME\nLISTADMIN=$LISTADMIN\nPASSWD=$PASSWD" > $CONFIG
+ echo -e "MAIL=$MAIL\nGPG=$GPG\nGPGDIR=$GPGDIR\nLISTNAME=$LISTNAME\nLISTADMIN=$LISTADMIN\nPASSWD=$PASSWD" > $CONFIG
echo "now generating your keyring..."
$GPGCOMMAND --gen-key <<EOF
@@ -361,7 +339,6 @@ EOF
}
# main -
-
umask 0777
# command line checking
@@ -384,9 +361,12 @@ if [ "$1" != "-c" -a "$1" != "-h" -a "$1" != "-v" ]; then
fi
fi
-declare -a MESSAGE
-declare -a GPG_MESSAGE
+# declare all vars
declare n
+for array in MESSAGE GPG_MESSAGE LIST_MESSAGE; do
+ declare -a $array
+done
+
export LANG=en_US
# get gpg parameters and check the config
@@ -426,5 +406,5 @@ else
usage
exit 1
fi
-
+
unset MESSAGE; unset GPG_MESSAGE; unset LIST_MESSAGE