description

enigmail (plugin GPG pour Thunderbird/Icedove) ne remplis pas le Content-Type dans les headers du message.

Ce petit code permet de retablir la situation, et donc a mutt de supporter correctement les messages envoyes par enigmail…

integration au MDA procmail

:0fw
* ^User-Agent: .*Thunderbird.*
* ^X-Enigmail-Version: .*
* ^Content-Type: .*text/plain.*
| [path]/enigmail.sh

code bash: enigmail.sh

#!/bin/bash
 
touch /tmp/in.$$
chmod 600 /tmp/in.$$
cat > /tmp/in.$$
touch /tmp/body.$$
chmod 600 /tmp/body.$$
 
field=`formail -x Content-type < /tmp/in.$$`
 
bodyoffset=`grep -n "^$" /tmp/in.$$ | head -n1 | cut -d: -f1`
let bodysize=`wc -l /tmp/in.$$ | cut -d\  -f1`-bodyoffset
tail -n $bodysize /tmp/in.$$ > /tmp/body.$$
 
if [ "`head -n1 /tmp/body.$$ | grep "BEGIN PGP SIGNED MESSAGE"`" ]
then
     formail -I "Content-Type:$field; x-action=pgp-signed" < /tmp/in.$$
elif [ "`head -n1 /tmp/body.$$ | grep "BEGIN PGP MESSAGE"`" ]
then
     formail -I "Content-Type:$field; x-action=pgp-encrypted" < /tmp/in.$$
else
     cat /tmp/in.$$
fi
 
rm /tmp/in.$$ /tmp/body.$$
shell/enigmail_wrapper_pour_mutt.txt · Last modified: 2010/01/12 13:29 (external edit)
www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0