Firma CHANGELOG
---------------
-05/05/2005 - 0.3-cvs - luis
+07/05/2005 - 0.3-cvs (rev 1.13) - rhatto
+
+ - Firma now uses sendmail or any smtp wrapper directly:
+ - Specify your smtp wrapper through MAIL var, eg:
+ MAIL=/usr/sbin/sendmail
+ MAIL=/usr/bin/ssmtp
+ - Command-line arguments passed to the wrapper must
+ be specified in var MAIL_ARGS
+ - Change in functions get_message and get_gpg_message,
+ introducing the variable LINES (total lines of the
+ received message).
+ - New array: LIST_MESSAGE: keeps the encrypted message
+ sent to each subscriber; is needed to the smpt wrapper
+ and will help PGP/MIME handling.
+
+05/05/2005 - 0.3-cvs (rev 1.6) - luis
- New functions: list_admin, choose_uid and version.
- Renamed functions
# 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
$(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 {
$(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 {