Re: How to send mail with a sign gpg in attachment like
- To: mutt-users@xxxxxxxx
- Subject: Re: How to send mail with a sign gpg in attachment like
- From: Sertaç Ö. Yıldız <sertac.liste@xxxxxxxxx>
- Date: Fri, 15 Feb 2008 21:56:05 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:content-transfer-encoding:in-reply-to:user-agent; bh=puer8TQZISunpln2zL7aKPQYzG/5RiX4E/Y10POypP8=; b=NDCjJ1jJArUn8+40z/JmW8/psSfsljDsQ7OEPNGX9HLFox79EjhAi/HZIMiFQTb5fM4U0QwkQp66Gl+3jzXyB93FI/e+s9pC+4nevFOgeHoTdW+WyDTVmCgy309x1tHNYDtn8ATMOSlhle8L/TtXfXGVKTY13ULFG5y4lN/ZTn8=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:content-transfer-encoding:in-reply-to:user-agent; b=Bn3umEqWy2xdxYvnRPCeRFKQlfv/f2lYnoihsqdxKn5cY8dDMXJb2ZL0XYdPNWP2S8PrCG0rOzLDidZR2VHv798z/AMpaIUJtZhzGz4gOLIUDh4Qpa6uPsHvAj1EINa3pnp6wWiejjtfZcb8Q2KGwGTTmxWqDKjAVvpu/Rh3Nm0=
- In-reply-to: <20080215125019.GB8348@xxxxxxxxxxxx>
- List-post: <mailto:mutt-users@mutt.org>
- List-unsubscribe: send mail to majordomo@mutt.org, body only "unsubscribe mutt-users"
- Mail-followup-to: mutt-users@xxxxxxxx
- References: <20080215125019.GB8348@xxxxxxxxxxxx>
- Sender: owner-mutt-users@xxxxxxxx
- User-agent: Mutt/1.5.17 (2007-11-01)
* Dongsheng Song [15.Şub.08 20:50 +0800]:
> Alex, your mutt not sign in attachment like signature.asc:
>
> Content-Type: application/pgp-signature
> Content-Disposition: inline
This is the default mutt behavior.
> But Joseph's mutt is right:
> Content-Type: application/pgp-signature; name="signature.asc"
> Content-Description: Digital signature
> Content-Disposition: inline
He appears to be using a debian patch. But I guess that patch is broken
in the way it adds those extra parameters for non-ascii values of the
pgp_mime_signature_description setting.
> I'm expected: Content-Type: application/pgp-signature;
> name="signature.asc" Content-Description: GnuPG digital signature
> Content-Disposition: attachment; filename="signature.asc"
>
> Joseph, How to set 'name="signature.asc"' ?
> Could you give me a sample ?
I don't know why you need to set the disposition to "attachment" instead
of "inline". If you just need to lookout for correspondents with
clueless mail readers, try the attached patch I'm using. I wonder why
this feature does not exist in in vanilla mutt.
--
~sertaç
diff -Nurp mutt-1.5.16/crypt-gpgme.c mutt-1.5.16-new/crypt-gpgme.c
--- mutt-1.5.16/crypt-gpgme.c 2007-08-21 23:49:34.000000000 +0300
+++ mutt-1.5.16-new/crypt-gpgme.c 2007-08-21 23:57:24.000000000 +0300
@@ -34,6 +34,7 @@
#include "copy.h"
#include "pager.h"
#include "sort.h"
+#include "rfc2047.h" /* for content-description */
#include <sys/wait.h>
#include <string.h>
@@ -894,6 +893,8 @@ static BODY *sign_message (BODY *a, int
t->use_disp = 1;
t->disposition = DISPATTACH;
t->d_filename = safe_strdup ("smime.p7s");
+ t->description = safe_strdup (_("Digital Signature"));
+ rfc2047_encode_string (&t->description);
}
else
{
@@ -901,6 +902,9 @@ static BODY *sign_message (BODY *a, int
t->use_disp = 0;
t->disposition = DISPINLINE;
t->encoding = ENC7BIT;
+ t->description = safe_strdup (_("Digital Signature"));
+ rfc2047_encode_string (&t->description);
+ mutt_set_parameter ("name", "signature.asc", &t->parameter);
}
t->filename = sigfile;
t->unlink = 1; /* ok to remove this file after sending. */
diff -Nurp mutt-1.5.16/pgp.c mutt-1.5.16-new/pgp.c
--- mutt-1.5.16/pgp.c 2007-04-21 23:02:39.000000000 +0300
+++ mutt-1.5.16-new/pgp.c 2007-08-21 23:55:10.000000000 +0300
@@ -35,6 +35,7 @@
#include "pgp.h"
#include "mime.h"
#include "copy.h"
+#include "rfc2047.h" /* for content-description */
#include <sys/wait.h>
#include <string.h>
@@ -1107,6 +1107,9 @@ BODY *pgp_sign_message (BODY *a)
t->use_disp = 0;
t->disposition = DISPINLINE;
t->encoding = ENC7BIT;
+ t->description = safe_strdup (_("Digital Signature"));
+ rfc2047_encode_string (&t->description);
+ mutt_set_parameter ("name", "signature.asc", &t->parameter);
t->unlink = 1; /* ok to remove this file after sending. */
return (a);
--- mutt-orig/PATCHES 2007-08-21 22:58:29.000000000 +0300
+++ mutt/PATCHES 1970-01-01 02:00:00.000000000 +0200
@@ -0,0 +1 @@
+sy.mime_signature_parameters