From aa7adf29f5eb261166bd58fdd974a530cfb0906f Mon Sep 17 00:00:00 2001 From: rhatto Date: Thu, 12 Oct 2006 14:24:06 +0000 Subject: SendListPubkey now using MimeWrapMessage --- firma | 38 +++++--------------------------------- 1 file changed, 5 insertions(+), 33 deletions(-) (limited to 'firma') 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 } -- cgit v1.2.3