Hi!
Thomas Roessler <[EMAIL PROTECTED]> wrote:
> On 1999-01-20 11:50:24 +0100, Daniel González Gasull wrote:
>
> > -----BEGIN PGP SIGNED MESSAGE-----
>
> > I have developed MuttEdit.ksh v1.0. It is in the
> > attachment of this message.
>
> Oh yeah, un-tagged PGP messages. How I love them. (Please, use at
> least application/pgp for the body parts in question.
This is what I want to *avoid*.
> What you're generating currently is just unusable.
It is *not* thought for sending PGP unMIMEd messages
to PGP/MIME users. It is for backwards compatibility
with PGP users that are still using PGP unMIMEd MUAs.
FYI, I *DO* think that PGP/MIME is a *very good* idea.
And Mutt is the less sucking MUA I've ever used.
Danke. But, AFAIK, some people can't read PGP/MIME
messages yet. Please, read the FAQ that is included
in my script.
> BTW, the script itself wasn't signed at all.)
BTW, how to sign attachments within Mutt? 8-)
> Anyway, I'd like to suggest you change the name of
> your script: There is an editor named "the mutt
> editor" which is completely unrelated to our MUA.
> Your script's name is begging for confusion.
Ok. Done. Now the name of my script is unMIME-Mutt.
I think it's more significant. The version 1.1 is
attached. A bug has been fixed and the name of the
script changed.
This message is PGP/MIME signed (because I think it's
a very good idea :-)
C U L8R.
--
___
Daniel González Gasull __|_|__ "Un sólo muerto es
mailto:[EMAIL PROTECTED] (o o) ya demasiado."
PGP RSA key 1024/EEA93A69 ( - ) -- Nelson Mandela
( . )
( . )
(_________)
> Hi! I'm Signature Virus 99! Copy me into your signature and join the fun!
#!/bin/ksh
# unmime-mutt.ksh
# ______ _____ ______ _______ ______
# | ___ \ (_____)| ___ \ (_______) | ___ \ _ _
# _ _ ____ | | _ | | _ | | _ | | _____ ___ | | _ | | _ _ | |_ | |_
#| | | || _ \ | || || | | | | || || || ___)(___)| || || || | | || _)| _)
#| |_| || | | || || || | _| |_ | || || || |_____ | || || || |_| || |__| |__
# \____||_| |_||_||_||_|(_____)|_||_||_||_______) |_||_||_| \____| \___)\___)
#
# unMIME-Mutt v1.1
# For sending unMIMEd PGP messages with Mutt.
# Autor: Daniel González Gasull <[EMAIL PROTECTED]>
# http://gasull.home.ml.org
# PGP RSA key 1024/EEA93A69
###
set -u
umask 077
### COPYING: GPL
### REQUIRED:
# /bin/ksh
# Mutt
# formail
# PGP 2.x
###
### INSTALL:
# Put unMIME-Mutt in your $PATH.
# $ chmod 700 unmime-mutt.ksh
# Put in your .muttrc the 3 following UNCOMMENTED lines:
# set editor="unmime-mutt.ksh|"
# set set edit_headers
# send-hook . unmy_hdr PGP
# Put here the real editor you like:
real_edit="/usr/bin/joe -asis -force -marking -pg 1 -rmargin 55 -wordwrap"
# If you wanna add a comment to your ASCII armor:
comment="Get my PGP key: http://www.arquired.es/users/dani/gasullkey.asc"
# EncryptToSelf is ON by default:
encrypttoself="on"
###
### USAGE:
# Hi cipherpunks!
# With unMIME-Mutt you can choose whether or not MIME or unMIME sign and/or
# encrypt the message from the menu after you edit the message, or inside
# the editor in the PGP: header:
#
# PGP: Clear -> Nothing. Plain message.
# PGP: s -> PGP/MIME sign
# PGP: e -> PGP/MIME encrypt
# PGP: es -> both (PGP/MIME encrypt and sign)
# PGP: us -> PGP unMIMEd clearsign
# PGP: ue -> PGP unMIMEd encrypt
# PGP: ues -> both (PGP unMIMEd encrypt and clearsign)
#
# Now you can configure your .muttrc with, e.g.:
# send-hook . my_hdr PGP: Clear
# send-hook '~t [EMAIL PROTECTED]' "my_hdr PGP: ues"
###
### FAQ:
# Q: Why unMIME-Mutt? Mutt already has PGP managment.
# A: Yep. But it is PGP/MIME managment. In some situations it is necesary
# to send PGP unMIMEd messages. E.g.:
#
# 1) You have a friend that do not handle PGP/MIME messages, but s/he
# can manage PGP unMIMEd messages with his/her software.
# 2) You use a SMTP of a freemail service, like NetAddress, that
# modifies the body of the message adding a few lines of
# advertising at the end. Then, PGP/MIME signed messages will be
# modified, and when somebody try verify the digital signature, it
# will fail.
# 3) You use a forward email (permanent email address) service
# that also modifies the body of the message. Again, nobody will
# be able to verify your signature on PGP/MIME signed messages.
# 4) You send messages to a mailing list that also modifies the body
# of the messages for adding ads or whith (un)subscribing info
# (E.g. debian-user-spanish mailing list).
#
# Q: Must I use unMIME-Mutt for sending PGP unMIMEd messages by default?
# A: PGP/MIME is a very good idea. It is a standard, unlike PGP unMIMEd
# messages. I suggest to send PGP/unMIMEd messages only if you can't
# send PGP/MIME for any reason.
#
# Q: And how can I read PGP unMIMEd messages with Mutt?
# A: Using procmail to convert them to PGP/MIME. See PGP-Notes.txt that
# comes with Mutt.
###
### BUGS:
# 1) If you edit only the body of the message, unMIME-Mutt will run and show
# you the menu, but the options 's', 'e' and 'b' will not work
# properly, and will modify the body. Also options 'us', 'ue' and
# 'ub' may fail if the first lines of the body seem headers.
# 2) unMIME-Mutt only uses the default PGP user ID.
# 3) unMIME-Mutt do NOT take the recipient(s) user(s) ID(s) from the message.
# Does anybody know/gnow how to do this? If you do, please email me
# to [EMAIL PROTECTED]
# 4) unMIME-Mutt only works with PGP 2.x.
###
mime_sign ()
{
formail -f -I "PGP: S" < $1 > $1-unmime-mutt
mv --force $1-unmime-mutt $1
}
mime_encrypt ()
{
formail -f -I "PGP: E" < $1 > $1-unmime-mutt
mv --force $1-unmime-mutt $1
}
mime_both ()
{
formail -f -I "PGP: ES" < $1 > $1-unmime-mutt
mv --force $1-unmime-mutt $1
}
unmime_clearsign ()
{
(formail -f -X "" < $1 ; formail -I "" < $1 | pgp -staf \
+ClearSig=on +Verbose=0 +Comment="$comment") > $1-unmime-mutt
# Remove the PGP: header. Mutt can't understand it.
formail -f -I PGP: < $1-unmime-mutt > $1
}
unmime_encrypt ()
{
formail -X To: -X Cc: < $1
(formail -f -X "" < $1 ; formail -I "" < $1 | pgp -etaf \
+ClearSig=on +Verbose=0 +Comment="$comment" +EncryptToSelf=on) \
> $1-unmime-mutt
# Remove the PGP: header. Mutt can't understand it.
formail -f -I PGP: < $1-unmime-mutt > $1
}
unmime_both ()
{
formail -X To: -X Cc: < $1
(formail -f -X "" < $1 ; formail -I "" < $1 | pgp -estaf \
+ClearSig=on +Verbose=0 +Comment="$comment" \
+EncryptToSelf="$encrypttoself") > $1-unmime-mutt
# Remove the PGP: header. Mutt can't understand it.
formail -f -I PGP: < $1-unmime-mutt > $1
}
menu ()
{
cat << EOF
Choose an option or press [ENTER] to forget it:
s PGP/MIME sign
e PGP/MIME encrypt
es both (PGP/MIME encrypt and sign)
us PGP unMIMEd clearsign
ue PGP unMIMEd encrypt
ues both (PGP unMIMEd encrypt and clearsign)
EOF
read option < /dev/stdin
case $option in
s) mime_sign $1 ;;
e) mime_encrypt $1 ;;
es) mime_both $1 ;;
us) unmime_clearsign $1 ;;
ue) unmime_encrypt $1 ;;
ues) unmime_both $1 ;;
*) ;;
esac
}
$real_edit $1
# Read the PGP: header:
pgp_hdr="`formail -x PGP: < $1`"
case $pgp_hdr in
" s") mime_sign $1 ;;
" e") mime_encrypt $1 ;;
" es") mime_both $1 ;;
" us") unmime_clearsign $1 ;;
" ue") unmime_encrypt $1 ;;
" ues") unmime_both $1 ;;
*) menu $1 ;;
esac
PGP signature