* Posting styles and PGP integration? @ 2001-04-17 18:18 Andreas Fuchs 2001-04-18 3:13 ` Daniel Pittman 0 siblings, 1 reply; 10+ messages in thread From: Andreas Fuchs @ 2001-04-17 18:18 UTC (permalink / raw) [-- Attachment #1: Type: text/plain, Size: 391 bytes --] WIBNI there was a way to tell gnus to automagically PGP/GPG/SMIME-sign mails via a posting style? I am well aware of the pgp-stuff in BBDB, but it doesn't seem to work, and posting styles seem just like the cleaner way of doing it (Like, I don't want to send PGP-signed news articles except to a few groups). -- Andreas Fuchs, <asf@acm.org>, <d96001@htlwrn.ac.at>, antifuchs [-- Attachment #2: Type: application/pgp-signature, Size: 231 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Posting styles and PGP integration? 2001-04-17 18:18 Posting styles and PGP integration? Andreas Fuchs @ 2001-04-18 3:13 ` Daniel Pittman 2001-04-18 4:23 ` Andreas Fuchs ` (2 more replies) 0 siblings, 3 replies; 10+ messages in thread From: Daniel Pittman @ 2001-04-18 3:13 UTC (permalink / raw) On Tue, 17 Apr 2001, Andreas Fuchs wrote: > WIBNI there was a way to tell gnus to automagically PGP/GPG/SMIME-sign > mails via a posting style? > > I am well aware of the pgp-stuff in BBDB, but it doesn't seem to work, > and posting styles seem just like the cleaner way of doing it (Like, I > don't want to send PGP-signed news articles except to a few groups). (setq gnus-posting-styles '(("mail.pgp-sign-required" (body "<#part sign=pgpmime>")))) Daniel -- We close our eyes and look in opposite direction. We ignore the threats and hope they'll go away. We refuse to pay attention to the dangers we create in the name of our fathers we kill our children. -- Covenant, _Theremin_ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Posting styles and PGP integration? 2001-04-18 3:13 ` Daniel Pittman @ 2001-04-18 4:23 ` Andreas Fuchs 2001-04-18 4:29 ` Andreas Fuchs 2001-04-18 13:04 ` Multipart PGP sign/encrypt (was: Posting styles and PGP integration?) Josh Huber 2 siblings, 0 replies; 10+ messages in thread From: Andreas Fuchs @ 2001-04-18 4:23 UTC (permalink / raw) [-- Attachment #1.1: Type: text/plain, Size: 150 bytes --] Today, Daniel Pittman <daniel@rimspace.net> wrote: > (setq gnus-posting-styles '(("mail.pgp-sign-required" > (body " [-- Attachment #1.2.1: Type: text/plain, Size: 137 bytes --] ")))) Yes, that is exactly what I had in mind. Thanks a lot. -- Andreas Fuchs, <asf@acm.org>, <d96001@htlwrn.ac.at>, antifuchs [-- Attachment #1.2.2: Type: application/pgp-signature, Size: 231 bytes --] [-- Attachment #2: Type: application/pgp-signature, Size: 231 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Posting styles and PGP integration? 2001-04-18 3:13 ` Daniel Pittman 2001-04-18 4:23 ` Andreas Fuchs @ 2001-04-18 4:29 ` Andreas Fuchs 2001-04-19 1:23 ` Daniel Pittman 2001-04-19 8:34 ` lantz moore 2001-04-18 13:04 ` Multipart PGP sign/encrypt (was: Posting styles and PGP integration?) Josh Huber 2 siblings, 2 replies; 10+ messages in thread From: Andreas Fuchs @ 2001-04-18 4:29 UTC (permalink / raw) [-- Attachment #1.1: Type: text/plain, Size: 52 bytes --] Today, Daniel Pittman <daniel@rimspace.net> wrote: [-- Attachment #1.2.1: Type: text/plain, Size: 100 bytes --] > (setq gnus-posting-styles '(("mail.pgp-sign-required" > (body " [-- Attachment #1.2.2: Type: application/pgp-signature, Size: 231 bytes --] [-- Attachment #1.3.1: Type: text/plain, Size: 364 bytes --] ")))) Oh, darn. (-% That's not quite it, for when I reply to a mail by quoting it (with F or R), the <##part...> stuff is inserted _below_ the quotation, which is not a Good Thing, IMHO. Is there a way to move this to the first line in a message? With message-setup-hook, perhaps? -- Andreas Fuchs, <asf@acm.org>, <d96001@htlwrn.ac.at>, antifuchs [-- Attachment #1.3.2: Type: application/pgp-signature, Size: 231 bytes --] [-- Attachment #2: Type: application/pgp-signature, Size: 231 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Posting styles and PGP integration? 2001-04-18 4:29 ` Andreas Fuchs @ 2001-04-19 1:23 ` Daniel Pittman 2001-04-19 8:34 ` lantz moore 1 sibling, 0 replies; 10+ messages in thread From: Daniel Pittman @ 2001-04-19 1:23 UTC (permalink / raw) On Wed, 18 Apr 2001, Andreas Fuchs wrote: > Today, Daniel Pittman <daniel@rimspace.net> wrote: >> (setq gnus-posting-styles '(("mail.pgp-sign-required" >> (body " > ")))) > > Oh, darn. (-% Darn indeed. That'll teach me to speak without testing. :? > That's not quite it, for when I reply to a mail by quoting it (with F > or R), the <##part...> stuff is inserted _below_ the quotation, which > is not a Good Thing, IMHO. Is there a way to move this to the first > line in a message? With message-setup-hook, perhaps? (defun dp:add-signed-part-tag () "Automatically add a signature tag to a message..." (save-excursion (message-goto-body) (insert "<#part sign=pgpmime>\n\n"))) (add-hook 'message-setup-hook 'dp:add-signed-part-tag) That should do it, modulo testing. :) Daniel -- Recursion is the root of computation since it trades description for time. -- Alan Perlis ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Posting styles and PGP integration? 2001-04-18 4:29 ` Andreas Fuchs 2001-04-19 1:23 ` Daniel Pittman @ 2001-04-19 8:34 ` lantz moore 2001-04-19 19:05 ` Andreas Fuchs 1 sibling, 1 reply; 10+ messages in thread From: lantz moore @ 2001-04-19 8:34 UTC (permalink / raw) Andreas Fuchs <asf@acm.org> writes: > That's not quite it, for when I reply to a mail by quoting it (with F or > R), the <##part...> stuff is inserted _below_ the quotation, which is > not a Good Thing, IMHO. Is there a way to move this to the first line in > a message? With message-setup-hook, perhaps? i'm having a similar problem with a similar setup. what i'd like to do is make sure to encrypt replies to encrypted mails (it's far too easy to SW, type your reply, and C-cC-c while forgetting to M-mcp first). what i tried was: (setq gnus-posting-styles '((header "content-type" "encrypted" (body "<##part encrypt=pgpmime>")))) this almost works, but i get the same result as you, the encrypt tag comes after the yanked text. mucking with message-setup-hook doesn't seem to help either because a) that's what gnus-posting-styles does, and 2) that hook seems to get run *before* the yanked text gets inserted. is there any hook that gets run *after* the yanking? hmm, maybe gnus-message-setup-hook? ok, what about this: (setq gnus-posting-styles '((header "content-type" "encrypted" (eval (save-excursion (make-local-variable 'gnus-message-setup-hook) (add-hook 'gnus-message-setup-hook `(lambda () (save-excursion (message-goto-body) (insert "<##part encrypt=pgpmime>\n\n"))))))))) this seems to do *almost* what i want, with the odd side effect of putting the encrypt tag at the top of *every* message. even just hitting m in the group buffer. ugh, back to the drawing board i suppose... -l ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Posting styles and PGP integration? 2001-04-19 8:34 ` lantz moore @ 2001-04-19 19:05 ` Andreas Fuchs 0 siblings, 0 replies; 10+ messages in thread From: Andreas Fuchs @ 2001-04-19 19:05 UTC (permalink / raw) [-- Attachment #1: Type: text/plain, Size: 617 bytes --] Today, lantz moore <lmoore@tump.com> wrote: > this seems to do *almost* what i want, with the odd side effect of putting > the encrypt tag at the top of *every* message. even just hitting m in the > group buffer. ugh, back to the drawing board i suppose... Right. I'd really love to be able to set some variables from a posting-style (just like you tried), so that message-setup-hook (or similar, I don't want to look up their names) behaviour can be controlled by posting-styles. Is it time for gnus-posting-styles-fancy yet? (-: -- Andreas Fuchs, <asf@acm.org>, <d96001@htlwrn.ac.at>, antifuchs [-- Attachment #2: Type: application/pgp-signature, Size: 231 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Multipart PGP sign/encrypt (was: Posting styles and PGP integration?) 2001-04-18 3:13 ` Daniel Pittman 2001-04-18 4:23 ` Andreas Fuchs 2001-04-18 4:29 ` Andreas Fuchs @ 2001-04-18 13:04 ` Josh Huber 2001-04-18 16:25 ` Florian Weimer 2 siblings, 1 reply; 10+ messages in thread From: Josh Huber @ 2001-04-18 13:04 UTC (permalink / raw) Daniel Pittman <daniel@rimspace.net> writes: > (setq gnus-posting-styles '(("mail.pgp-sign-required" > (body "<#part sign=pgpmime>")))) Ok, this reminds me of something. adding the MML part tag to sign or encrypt only works on the /current/ part. This is a problem. It should operate on the entire mail. Lets see. doing a: <$multipart type=mixed sign=pgpmime> ... <$/multipart> *almost* does the trick. As an example, here are some headers from a multipart email signed by mutt (which, IMHO does a very good job with this type of thing): These headers are in the real headers of the email message: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Pd0ReVV5GZGQvF3a" Content-Disposition: inline The above headers are what gnus generates when you use the <$part sign=pgpmime> format, in case you were curious. Next, depending on whether or not there are multiple parts, mutt inserts a multipart/mixed type, in which each part is saved. If there is only one part, it is just encoded and saved: Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline --or-- Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable etc etc etc ***************** Now, what the point is, that gnus doesn't necessarily do things wrong, it just does them in a different way (and is not RFC compliant, I think...it's hard to tell) Gnus generates the correct headers for a single part, but when you try to use the multipart signed you get the wrong thing: This is the only header in the main header section of the message: Content-Type: multipart/mixed; boundary="=-=-=" ... next, there is a multipart/signed part: Content-Type: multipart/signed; boundary="===-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" next, a multipart/mixed part: Content-Type: multipart/mixed; boundary="==-=-=" which then finally contains each part. Now, what I'd really like to do is this: <$part sign=pgpmime> <$multipart type=mixed> foo bar la la la <$part ...> <--- included file, etc. <$/multipart> <$/part> Of course, this doesn't work, since <$part> automatically closes when it encounters the next <$part> or <$multipart>. So, is there a way to get Gnus to do what I want it to do? I know a little elisp, and I've looked through the source a little, but I tried following the MML code and it's pretty involved. If there's no solution, does someone have a pointer on where to start in the mml code? -- ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multipart PGP sign/encrypt (was: Posting styles and PGP integration?) 2001-04-18 13:04 ` Multipart PGP sign/encrypt (was: Posting styles and PGP integration?) Josh Huber @ 2001-04-18 16:25 ` Florian Weimer 2001-04-18 16:57 ` Josh Huber 0 siblings, 1 reply; 10+ messages in thread From: Florian Weimer @ 2001-04-18 16:25 UTC (permalink / raw) Josh Huber <huber@nospam.alum.wpi.edu> writes: > So, is there a way to get Gnus to do what I want it to do? We could resurrect direct multipart/signed support, which reflects the structure of the generated message more closely: <$multipart type=signed method=pgp> ... <$/multipart> I still consider this the correct approach. (The necessary hooks are already there.) ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Multipart PGP sign/encrypt (was: Posting styles and PGP integration?) 2001-04-18 16:25 ` Florian Weimer @ 2001-04-18 16:57 ` Josh Huber 0 siblings, 0 replies; 10+ messages in thread From: Josh Huber @ 2001-04-18 16:57 UTC (permalink / raw) Florian Weimer <fw@deneb.enyo.de> writes: > We could resurrect direct multipart/signed support, which reflects the > structure of the generated message more closely: > > <$multipart type=signed method=pgp> > ... > <$/multipart> > > I still consider this the correct approach. (The necessary hooks are > already there.) Yes, this sounds like the best solution, and then to have mml-secure-sign-pgpmime do the 'right' thing (either part or multipart) depending on whether or not there are attachments present. Where is the relevant code? -- ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2001-04-19 19:05 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2001-04-17 18:18 Posting styles and PGP integration? Andreas Fuchs 2001-04-18 3:13 ` Daniel Pittman 2001-04-18 4:23 ` Andreas Fuchs 2001-04-18 4:29 ` Andreas Fuchs 2001-04-19 1:23 ` Daniel Pittman 2001-04-19 8:34 ` lantz moore 2001-04-19 19:05 ` Andreas Fuchs 2001-04-18 13:04 ` Multipart PGP sign/encrypt (was: Posting styles and PGP integration?) Josh Huber 2001-04-18 16:25 ` Florian Weimer 2001-04-18 16:57 ` Josh Huber
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).