MESSAGE[$n]="$STDIN\n"
((++n))
done
+ echo $n
}
function get_gpg_message {
signal=0
- x=0
+ x=0; n=$1
for ((count=0;count<=n;count++)); do
if [[ $signal == "0" ]] && [[ "$(echo "${MESSAGE[$count]}" | grep -v -e "-----BEGIN PGP MESSAGE-----")" == "" ]]; then
GPG_MESSAGE[$x]=${MESSAGE[$count]}
function process_message {
# process a message sent to the list
- get_message
- get_message_headers
- get_gpg_message
+ lines=`get_message`
+ get_message_headers
+ get_gpg_message $lines
# if signature is Good, encrypt and send it for each list subscriber
# todo: declare a function to decrypt, re-encrypt and send the list messages