Gnus development mailing list
 help / color / mirror / Atom feed
* Guns and Privacy : sample use case/tutorial effort
@ 2011-02-01  8:33 Richard Riley
  2011-02-01 10:11 ` Lars Ingebrigtsen
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Richard Riley @ 2011-02-01  8:33 UTC (permalink / raw)
  To: nognus


Would some variation of this be potentially useful in the gnus manual?
This crops up a lot in the #emacs irc channel and I have had a few
emails about it too. I will gladly tweak/tidy as appropriate if you feel
it has a place - very first draft and in need of polish. Having
searched, I dont *think* there is such a howto in the gnus manual
... and email is where it's particularly relevant especially with
account validation information so I kind of feel it could be beneficial
to have a gnus specific section. That said I never cease to be amazed at
my own inability to find things in the gnus manual so apologies if this
is already adequately covered.. First long winded draft ..

Securing Your Gnus Information

Possibly you wish your gnus email/nntp access configuration to remain
"secretive". This can be a problem when its more and more popular to use
online repos for inter machine sync (e.g using github to hold your emacs
config files). It can be easy to accidentally open the repo or make a
mistake with the file permissions. Or you might even lose your laptop!
Emacs integration with Epa/gnupgp make securing this a doddle. The more
traditional .authinfo file used to mean storing your password in
plaintext : something many people dont like to do.  One option is to
merely resave the .authinfo as .authinfo.gpg. emacs/Gnupg will prompt
you for a signing key and away you go. epa/epg usage is covered
elsewhere in the emacs manual. Dont forget to remove the original
.authinfo.. Configure your auth-sources and Emacs will detect the .gpg
as a default if it exists. The usage and format of authinfo is discussed
in the emacs/gnus manuals. My setting is

,----
| (setq auth-sources (quote ((:source "/home/me/.emacs.d/.authinfo.gpg"
| 	:host t :protocol t))))
`----

We can extend this to storing the more secretive part of your Gnus
online life (and any other emacs subset) in a .gpg file.

Lets create a file "my-config.gpg". Line 1 tells emacs which key to use
and that it contains elisp :-

,----
| ;; -*- mode:emacs-lisp -*- epa-file-encrypt-to: ("86E37324********") -*-
`----

In it you can store private information such as a your erc password and gnus posting styles maybe:-

,----
| (setq erc-password "123456")
| 
| (add-to-list `gnus-posting-styles  `( ,(rx(or "INBOX.trolling" ""))
| 				      (from "Tommy <tommy@trollsrus.net>")
| 				      (name "Tommy Troll"))t)
| 
| (add-to-list `gnus-posting-styles `(,(rx(or "serious"))
| 				    (name "Serious")(address "serious@xxx-yyy-zzz-.com")
| 				    (from  "Simon Serious<serious@xxx-yyy-zzz-.com>")
| 				    (eval (setq mml2015-signers '("12349876")))
| 				    (organization "http://www.gnus.com")
| 
| 				    (signature-file "~/.emacs.d/.sigs/serious.sig")) t)
| (provide 'my-config)
`----

The loading of this file would cause emacs or the system to prompt you
for a password to decrypt the file if the agent (gpg-agent) or emacs
hasnt already cached the password for that key. This prompt can be an
issue if you're using the emacs daemon especially if starting the
process at system login. When to prompt? One nice way is to only load
the gpg file when you create an emacs frame. e.g

,----
|    (defun load-secure-config(frame)
|      (require 'my-config "my-config.gpg"))
| 
|    (add-hook 'after-make-frame-functions 'load-secure-config)
`----

Here we see that the private configuration information is only loaded and
decrypted when you actually bring up an emacs frame - generally that
would be sufficient in the case of gnus.


 



^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-02-03 21:33 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-01  8:33 Guns and Privacy : sample use case/tutorial effort Richard Riley
2011-02-01 10:11 ` Lars Ingebrigtsen
2011-02-01 11:51 ` Philipp Haselwarter
2011-02-01 12:20   ` Richard Riley
2011-02-01 12:42     ` Philipp Haselwarter
2011-02-01 12:53       ` Richard Riley
2011-02-01 13:23         ` Philipp Haselwarter
2011-02-01 13:30           ` Richard Riley
2011-02-02  9:06 ` Francis Moreau
2011-02-03 21:33 ` Ted Zlatanov

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).