Hi, Ideally solving this bug would solve #637115 as well. But I couldn't find a nice way to integrate mutt (probably other MUAs as well) with caff. First I've got two questions:
1/ Do you want to interact with the MUA (for instance to edit the
headers), or should it work in batch mode?
2/ Should the encryption be done by the MUA, or should it be fed with
encrypted content already?
If you answer the former in both 1 and 2, then an interface could be
something along the lines of
$CONFIG{'mail-cmd'} = [ 'mutt', '-e', "set from='$CONFIG{owner}
<$CONFIG{email}>" pgp_autoencrypt'
, '-s', "Your signed PGP key
0x$recipient{keyid}"
, '-i', $recipient{'template-file'}
, '-a', $recipient{'signature-file'}
, '--'
, $recipient{address} ]
(Where the hash %recipient is wiped and repopulated for each key.)
Mutt can also work in batch mode (it takes a text/plain body on STDIN),
but then pgp_autoencrypt doesn't seem to work anymore.
echo hello | mutt -e 'set pgp_autoencrypt' -s test -a /path/to/attachement
-- [email protected]
Sadly if you answer the latter in 2, I couldn't find a way to do
that properly in either batch or interactive mode. It sort of works,
but without manually adding the MIME boundary to the Content-Type the
output looks strange (obviously); when I try to add it manually
mutt -e set [email protected] \
-e 'set content_type="multipart/encrypted;
protocol=\"application/pgp-encrypted\";
boundary=\"----------=_1393531266-28793-1\""' \
-s test [email protected] \
</path/to/caff/body_mail
(where /path/to/caff/body_mail is one of the mails in ~/.caff/keys/
stripped off its headers) mutt seems doesn't seem to treat STDIN as
multipart and [email protected] receives only the closing boundary.
Feel free to suggest another interface if you like, but IMHO it would be
great to treat the 4 cases in the above questions. Perhaps a mutt guru
here know how to provide multipart content in batch mode?
Cheers,
--
Guilhem.
signature.asc
Description: Digital signature

