lotsa changes
[emacs.git] / .emacs.d / config / gkar.ganneff.de.org
1 #+STARTUP: align fold nodlcheck hidestars oddeven lognotestate
2 #+TITLE: gkar.ganneff.de.org - Ganneffs configuration, host specific file for gkar
3 #+DATE: %Y-%m-%d
4 #+SETUPFILE: ~/.emacs.d/elisp/org-templates/level-0.org
5
6 * Machine specific config
7 ** Mail sending
8 [2013-04-23 Di 00:12]
9 No need to run an smtpd on this host, my router does that. So use it.
10 #+BEGIN_SRC emacs-lisp
11 (setq smtpmail-default-smtp-server "lorien")
12 (setq smtpmail-smtp-server "lorien")
13 #+END_SRC
14 ** gnus
15 *** Mail access
16 First specific point is how I access my mail. I am using gnus, and I
17 have two hosts to get data from.
18 #+BEGIN_SRC emacs-lisp
19 (setq gnus-secondary-select-methods
20 '((nnml "")
21 (nnimap "gkar"
22 (nnimap-address "localhost")
23 (nnimap-server-port 993)
24 (nnimap-nov-is-evil t)
25 (nnimap-stream ssl)
26 (nnimap-fetch-partial-articles "text/")
27 ;(nnimap-stream shell)
28 ;(nnir-search-engine imap)
29 )
30 (nnimap "fry"
31 (nnimap-address "fry.nsb-software.de")
32 (nnimap-server-port 993)
33 (nnimap-stream ssl)
34 (nnimap-nov-is-evil t)
35 (nnimap-fetch-partial-articles "text/")
36 (nnir-search-engine imap)
37 )
38 ))
39 #+END_SRC
40
41 Together with the above I do have a =~/.authinfo= file which has lines
42 of the form
43 #+BEGIN_EXAMPLE
44 machine HOSTNAME login USERNAME password PASSWORD port XXX
45 #+END_EXAMPLE
46 where you obviously replace the placeholders. You should ensure that
47 this file has mode 600 to not have others grab your passwords[fn:1]. Or
48 leave it away entirely, then =gnus= will ask you every time you connect.
49
50 *** Search
51 On my desktop I have a notmuch instance running which I use instead of
52 nnir or direct imap searches. It is much better, though for that it has
53 its drawbacks - like building up an own database of mail. Which is the
54 reason only my desktop uses it.
55 #+BEGIN_SRC emacs-lisp
56 (require 'notmuch)
57 (add-hook 'gnus-group-mode-hook 'lld-notmuch-shortcut)
58 (define-key notmuch-show-mode-map (kbd "C-c C-c") 'lld-notmuch-goto-message-in-gnus)
59 #+END_SRC
60
61 *** Outgoing mail copies
62 When I send a mail (or post to a newsgroup) I want copies of that.
63 #+BEGIN_SRC emacs-lisp
64 (setq gnus-message-archive-group
65 '((if (message-news-p)
66 "nnfolder+archive:Sentnews"
67 "nnimap+gkar:Sentmail")))
68 #+END_SRC
69
70 * Footnotes
71
72 [fn:1] And of course have different passwords for imap than for your login.
73
74