[H-GEN] Reading signed emails using OE

Greg Black gjb at gbch.net
Tue Jun 3 21:56:16 EDT 2003


On 2003-06-04, Michael Anthon wrote:

> Anyway, the recipe I came up with is this...
> 
> :0 H
> * ^Content-Type: multipart/signed
> {
>   BOUNDARY=`formail -x Content-Type -c | sed -e
> 's/.*boundary="\([^"]\+\)"/\1/'`
> 
>   :0 Afhw
>   |formail -i "Content-Type: multipart/mixed; boundary=\"$BOUNDARY\""
> }
> 
> This seems to work for the test message I was passing through it.  Can
> anyone see a problem with this or maybe a "better" way to do it?

I wonder how it would go if you changed the sed substitute
command to this:

    's/.*boundary="\(.*\)".*/\1/'

That seems to extract the correct marker for me on the set of
test messages I tried; your version failed on some of them.  Of
course, this might be an artifact of variant sed implementations
(which I haven't investigated).  My sed version can be inferred
from one of the "X-" headers.

I'll sign this with mutt's normal method to provide some test
data.

Greg

-- 
Greg Black <gjb at gbch.net> <http://www.gbch.net/gjb.html>
GPG signed mail preferred; further information in headers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 249 bytes
Desc: not available
URL: <http://lists.humbug.org.au/pipermail/general/attachments/20030604/f79bf63a/attachment.sig>


More information about the General mailing list