chiark / gitweb /
dot/emacs: Kick BBDB to always include a name when completing addresses.
[profile] / dot / gnus-local.el.distorted
CommitLineData
5252f79a
MW
1;;; -*-emacs-lisp-*-
2;;;
3;;; Local GNUS configuration -- distorted.org.uk version
4;;;
5;;; (c) 2014 Mark Wooding
6;;;
7
789a48fe
MW
8;;;--------------------------------------------------------------------------
9;;; How to send mail.
10
11(and nil
12 (setq smtpmail-smtp-server "mail.distorted.org.uk"
13 smtpmail-sendto-domain "distorted.org.uk"
14 smtpmail-smtp-service 587
15 smtpmail-auth-credentials "~/.gnus.authinfo"
16 message-send-mail-function 'smtpmail-send-it
17 smtpmail-starttls-credentials
18 '(("mail.distorted.org.uk" 587 "" ""))))
19
f240cfd7
MW
20;;;--------------------------------------------------------------------------
21;;; News via chiark.
22
23;; Currently we assume an SSH tunnel. This will be fixed later.
24(setq gnus-select-method
25 '(nntp "chiark-ssh-kludge"
26 (nntp-open-connection-function nntp-open-authinfo-kludge)
df38b85d
MW
27 (nntp-address "tunnel.chiark.greenend.org.uk")
28 (nntp-authinfo-generic "md5cookie1way mdw")))
f240cfd7 29
5252f79a
MW
30;;;--------------------------------------------------------------------------
31;;; Where we get mail from.
32
33;; Read mail on the IMAP server.
34(setq gnus-secondary-select-methods
35 '((nnimap "distorted"
36 (nnimap-address "mail.distorted.org.uk")
37 (nnimap-stream tls)
9adf6847 38 (nnimap-authinfo-file "~/.gnus.authinfo"))
43026cf3
MW
39 (nnimap "markw-distorted"
40 (nnimap-address "mail.distorted.org.uk")
41 (nnimap-stream tls)
42 (nnimap-authinfo-file "~/.gnus.authinfo.markw"))
9adf6847
MW
43 (nnimap "google"
44 (nnimap-address "imap.gmail.com")
45 (nnimap-stream tls)
5252f79a
MW
46 (nnimap-authinfo-file "~/.gnus.authinfo"))))
47
48;; Send sent mail back to me.
49(setq gnus-message-archive-method "mail"
50 gnus-gcc-mark-as-read t
51 gnus-message-archive-group "nnimap+distorted:mail.sent")
52
53;;;--------------------------------------------------------------------------
54;;; Mail group configuration.
55
56;; General splitting configuration.
57(setq nnimap-split-inbox '("INBOX" "to.split")
58 nnimap-split-rule 'nnimap-split-fancy
4fb653fd
MW
59 nnimap-split-methods 'nnimap-split-fancy
60 nnmail-split-methods 'nnmail-split-fancy
5252f79a 61 nnimap-split-predicate "UNDELETED"
4fb653fd
MW
62 nnimap-split-crosspost t
63 nnmail-split-crosspost t
5252f79a
MW
64 nnmail-split-fancy-match-partial-words nil)
65
66;; Automatic expiry for particular groups.
67(setq gnus-auto-expirable-newsgroups
68 "^nnimap\\+distorted:\\(crap\\|spam\\|admin\\|lists\\|nag\\)\\..*")
69
277521fa 70;; My various email addresses.
43026cf3 71(setq message-alternative-emails bbdb-user-mail-names
277521fa
MW
72 message-dont-reply-to-names message-alternative-emails)
73
5252f79a
MW
74;; Mail sent to `mdw-nospam-THING' should appear to come from this address.
75(setq gnus-posting-styles
76 '(((and (string-match "^nnimap\\+distorted:crap\\.\\(.*\\)$"
77 gnus-newsgroup-name)
78 (setq mdw-from-address
79 (replace-match "mdw-nospam-\\1@distorted.org.uk"
80 nil nil gnus-newsgroup-name)))
81 ("From" mdw-from-address))))
82
83;; The actual splitting rules.
4fb653fd 84(setq nnmail-split-fancy
a27bd871
MW
85 '(|
86 ;; Administrative boxes.
87 (to "\\(root\\|postgres\\|ca\\|noc\\)@" "admin.misc" t)
88 (to "\\(jukebox\\|nobody\\|darchive\\)@" "admin.misc" t)
89 (to "\\(hostmaster\\)@" "admin.dns" t)
90 (to "\\(news\\|newsmaster\\|usenet\\)@" "admin.news" t)
91 (to "\\(postmaster\\|spamd\\|mailer-daemon\\)@" "admin.mail" t)
92 (to "\\(irc\\|blight\\|ircbot\\)@" "admin.irc" t)
93 (to "\\(www\\|webmaster\\|mtos\\)@" "admin.web" t)
94 (to "\\(ftp\\|ftpadmin\\|mirror\\)@" "admin.ftp" t)
95 (to "\\(abuse\\|security\\)@" "admin.keep" t)
96 (from "cron daemon" "admin.misc")
97 (from "uucp@distorted\\.org\\.uk" "admin.uucp")
98 (from "darchive@.*\\.distorted\\.org\\.uk" "admin.misc")
d268047a 99 (from "bugs@distorted\\.org\\.uk" "admin.bugs")
a27bd871
MW
100
101 ;; Colo provider.
102 (from "\\(accounts\\|support\\)@jump\\.net\\.uk" "keep.colo")
103
104 ;; Mailing lists, not split out earlier.
5252f79a 105 (to "python-list@python\\.org" "lists.python")
a27bd871
MW
106 (to "jump-announce@jump\\.net\\.uk" "lists.jump-announce")
107
108 ;; Per-sender addresses.
370bb0ff 109 (to "mdw-nospam-justgviing@" "crap.justgiving" t)
5252f79a 110 (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
370bb0ff 111 (to "mdw-nopspam-\\([^@]+\\)@" "crap.\\1" t)
a27bd871
MW
112
113 ;; Regular nags.
5252f79a
MW
114 (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
115 (from "\\<mailman-owner@" "nag.mailman" t)
a27bd871 116
48c5ccb3
MW
117 ;; Uninteresting mail.
118 (from "expiry@letsencrypt\\.org" "spam.letsencrypt" t)
119
a27bd871 120 ;; Other splits I've not given a per-sender address.
5252f79a
MW
121 (from "@\\(.*\\.\\)?lovefilm\\.com" "spam.lovefilm" t)
122 (from "@amazon\\." "spam.amazon" t)
123 (from "@cineworldmail\\.com" "spam.cineworld" t)
124 (from "@picturehouses\\.co\\.uk" "spam.picturehouse" t)
125 (from "@nationwide" "spam.nationwide" t)
126 (from "@news\\.spotifymail\\.com" "spam.spotify" t)
127 (from "@action\\.openrightsgroup\\.org" "spam.org" t)
128 (from "unlimited@cineworld\\.com" "spam.cineworld" t)
129 (from "nationwide@securesuiteemail\\.com" "spam.nationwide" t)
a66127fb
MW
130 (from "@liberty-human-rights\\.org\\.uk" "spam.liberty" t)
131 (from "@libertymail\\.org\\.uk" "spam.liberty" t)
a66127fb 132 (from "@openrightsgroup\\.org" "spam.org" t)
5252f79a 133 (from "@tshirthell\\.com" "spam.tshirt-hell" t)
a27bd871
MW
134 (from "campaigns@jolla\\.com" "crap.jolla" t)
135
136 ;; Default.
4fb653fd
MW
137 "mail.misc")
138 nnimap-split-fancy nnmail-split-fancy)
5252f79a
MW
139
140;;;----- That's all, folks --------------------------------------------------