aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto>2006-10-12 14:24:06 +0000
committerrhatto <rhatto>2006-10-12 14:24:06 +0000
commitaa7adf29f5eb261166bd58fdd974a530cfb0906f (patch)
treeda6d2da7005ff09a6e56c52b87a1bdc437e35972
parent8a275ce2e495551b537c6d6d46d9d8e0078697e0 (diff)
downloadfirma-aa7adf29f5eb261166bd58fdd974a530cfb0906f.tar.gz
firma-aa7adf29f5eb261166bd58fdd974a530cfb0906f.tar.bz2
SendListPubkey now using MimeWrapMessage
-rwxr-xr-xfirma38
1 files changed, 5 insertions, 33 deletions
diff --git a/firma b/firma
index 0a7c1b1..dbef48a 100755
--- a/firma
+++ b/firma
@@ -1602,7 +1602,6 @@ function SendListPubkey {
local key
local keys
local keyid
- local boundary
local keyboundary
if [ "$1" == "help" ]; then
@@ -1631,21 +1630,9 @@ function SendListPubkey {
return 1
fi
- recipients="$key"
- boundary="`RandomString 15`"
+ RECIPIENTS="$key"
keyboundary="`RandomString 15`"
- # these are the headers of the message to be sent, so no indentation here
- MESSAGE_HEADERS="\
-From: $LIST_ADDRESS
-Subject: List public key for $LIST_ADDRESS
-To: $recipients
-MIME-Version: 1.0
-Content-Type: multipart/encrypted;
- protocol=\"application/pgp-encrypted\";
- boundary=\"${boundary}\"
-Content-Disposition: inline"
-
# this is the body of the message to be sent, so no indentation here
MESSAGE_BODY="`$GPG --armor --export $LIST_ADDRESS`"
MESSAGE_BODY="\
@@ -1664,30 +1651,15 @@ $MESSAGE_BODY
# now encrypt the message body
MESSAGE_BODY="`echo -e "${PASSPHRASE}\n${MESSAGE_BODY}" | $GPG_ENCRYPT --recipient $recipients`"
- # this is the body of the message to be sent, so no indentation here
- MESSAGE_BODY="\
-This is an OpenPGP/MIME encrypted message (RFC 2440 and 3156)
---$boundary
-Content-Type: application/pgp-encrypted
-Content-Description: PGP/MIME version identification
-
-Version: 1
-
---$boundary
-Content-Type: application/octet-stream; name=\"encrypted.asc\"
-Content-Disposition: inline; filename=\"encrypted.asc\"
-
-${MESSAGE_BODY}
-
---${boundary}--"
-
- AssembleMessage
+ # compose the message
+ MimeWrapMessage
# send message
echo "$MESSAGE" | $MAIL_AGENT $MAIL_AGENT_ARGS $recipients
done
- FixListOwnerShip
+ AdminLog "List pubkey sent to $keys."
+ FixListOwnership
}