From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.user/3456 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.user Subject: Re: Automatically sign/encrypt messages Date: Fri, 30 Jan 2004 14:06:43 -0500 Organization: =?koi8-r?q?=F4=C5=CF=C4=CF=D2=20=FA=CC=C1=D4=C1=CE=CF=D7?= @ Cienfuegos Message-ID: <4nekthi7cs.fsf@collins.bwh.harvard.edu> References: <87n086ach0.fsf@ulm.my.lan> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1138669570 19049 80.91.229.2 (31 Jan 2006 01:06:10 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Tue, 31 Jan 2006 01:06:10 +0000 (UTC) Original-X-From: nobody Tue Jan 17 17:32:15 2006 Original-Path: quimby.gnus.org!newsfeed1.e.nsc.no!nsc.no!nextra.com!news.tele.dk!news.tele.dk!small.news.tele.dk!fu-berlin.de!uni-berlin.de!collins.bwh.harvard.EDU!not-for-mail Original-Newsgroups: gnu.emacs.gnus Original-NNTP-Posting-Host: collins.bwh.harvard.edu (134.174.9.80) Original-X-Trace: news.uni-berlin.de 1075489688 29056396 134.174.9.80 ([177066]) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (usg-unix-v) Cancel-Lock: sha1:A0lDzkFFhmMypHwR6COJ9cMQpww= Original-Xref: bridgekeeper.physik.uni-ulm.de gnus-emacs-gnus:3597 Original-Lines: 27 X-Gnus-Article-Number: 3597 Tue Jan 17 17:32:15 2006 Xref: news.gmane.org gmane.emacs.gnus.user:3456 Archived-At: On Thu, 29 Jan 2004, news@u-h-l.de wrote: > But then I wanted to go one step further and not only sign but also > encrypt all messages, at least if this is possible (i.e. if the > recipient also uses PGP). [...] (add-hook 'message-send-hook (lambda () (let ((recipient (message-fetch-field "To"))) (cond ((and (not (null recipient)) (or (pgg-lookup-key recipient) (pgg-fetch-key pgg-default-keyserver-address recipient))) (mml-secure-message-encrypt-pgpmime)) (t (mml-secure-message-sign-pgpmime)))))) > This works perfectly for me. Gnus encrypts the message if gpg > already has the recipient's key in its keyring or if it can get the > key from a keyserver. Otherwise the message is only signed. This looks useful enough to be in the main Gnus code, if it's not already. Maybe as mml-secure-message-encrypt-or-sign-pgpmime? Ted