chiark / gitweb /
dot/gnus-local.el.distorted: Changes to support later Gnus versions.
[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
df5a4ca5
MW
8(setq auth-sources '("~/.gnus.authinfo"))
9
789a48fe
MW
10;;;--------------------------------------------------------------------------
11;;; How to send mail.
12
24da4184
MW
13(setq smtpmail-smtp-service 587
14 smtpmail-auth-credentials "~/.gnus.authinfo")
15
16(setq mdw-send-mail-alist
17 `((distorted-smtp
18 (send-mail-function . smtpmail-send-it)
19 (smtpmail-smtp-server . "mail.distorted.org.uk")
20 (smtpmail-starttls-credentials
21 ("mail.distorted.org.uk" 587 nil nil)))
22 (chiark-smtp
23 (send-mail-function . smtpmail-send-it)
24 (smtpmail-smtp-server . "smtp.dovecot.chiark.greenend.org.uk")
25 (starttls-extra-arguments "--insecure")
26 (smtpmail-starttls-credentials
27 ("smtp.dovecot.chiark.greenend.org.uk" 587 nil nil)))
28 (gmail-smtp
29 (send-mail-function . smtpmail-send-it)
30 (smtpmail-smtp-server . "smtp.gmail.com")
31 (smtpmail-starttls-credentials
32 ("smtp.gmail.com" 587 nil nil))))
33 mdw-guess-send-mail-alist
34 `((,(concat "@\\(" "\\(chiark\\|slimy\\|coriolis\\)"
35 "\\.greenend\\.org\\.uk"
36 "\\|" "evade\\.org\\.uk"
37 "\\|" "fyvzl\\.net"
38 "\\)$") . chiark-smtp)
39 ("@g\\(\\|oogle\\)mail\\.com$" . gmail-smtp))
40 mdw-default-send-mail-method nil)
789a48fe 41
f240cfd7
MW
42;;;--------------------------------------------------------------------------
43;;; News via chiark.
44
45;; Currently we assume an SSH tunnel. This will be fixed later.
46(setq gnus-select-method
47 '(nntp "chiark-ssh-kludge"
48 (nntp-open-connection-function nntp-open-authinfo-kludge)
df38b85d
MW
49 (nntp-address "tunnel.chiark.greenend.org.uk")
50 (nntp-authinfo-generic "md5cookie1way mdw")))
f240cfd7 51
5252f79a
MW
52;;;--------------------------------------------------------------------------
53;;; Where we get mail from.
54
55;; Read mail on the IMAP server.
56(setq gnus-secondary-select-methods
57 '((nnimap "distorted"
58 (nnimap-address "mail.distorted.org.uk")
59 (nnimap-stream tls)
df5a4ca5
MW
60 (nnimap-authinfo-file "~/.gnus.authinfo")
61 (nnimap-inbox "INBOX")
62 (nnimap-unsplittable-articles (%Deleted)))
43026cf3
MW
63 (nnimap "markw-distorted"
64 (nnimap-address "mail.distorted.org.uk")
65 (nnimap-stream tls)
df5a4ca5
MW
66 (nnimap-authinfo-file "~/.gnus.authinfo.markw")
67 (nnimap-inbox "INBOX")
68 (nnimap-unsplittable-articles (%Deleted)))
0191c356
MW
69 (nnimap "mwooding-chiark"
70 (nnimap-address "imap.dovecot.chiark.greenend.org.uk")
71 (nnimap-stream tls)
df5a4ca5
MW
72 (nnimap-authinfo-file "~/.gnus.authinfo")
73 (nnimap-inbox "INBOX")
74 (nnimap-unsplittable-articles (%Deleted)))
9adf6847
MW
75 (nnimap "google"
76 (nnimap-address "imap.gmail.com")
77 (nnimap-stream tls)
df5a4ca5
MW
78 (nnimap-authinfo-file "~/.gnus.authinfo")
79 (nnimap-inbox "INBOX")
80 (nnimap-unsplittable-articles (%Deleted)))))
5252f79a
MW
81
82;; Send sent mail back to me.
83(setq gnus-message-archive-method "mail"
84 gnus-gcc-mark-as-read t
85 gnus-message-archive-group "nnimap+distorted:mail.sent")
86
87;;;--------------------------------------------------------------------------
88;;; Mail group configuration.
89
90;; General splitting configuration.
91(setq nnimap-split-inbox '("INBOX" "to.split")
92 nnimap-split-rule 'nnimap-split-fancy
4fb653fd
MW
93 nnimap-split-methods 'nnimap-split-fancy
94 nnmail-split-methods 'nnmail-split-fancy
5252f79a 95 nnimap-split-predicate "UNDELETED"
4fb653fd
MW
96 nnimap-split-crosspost t
97 nnmail-split-crosspost t
5252f79a
MW
98 nnmail-split-fancy-match-partial-words nil)
99
100;; Automatic expiry for particular groups.
101(setq gnus-auto-expirable-newsgroups
40a3fc1d
MW
102 (concat "^"
103 "\\(nnimap\\+[^:]+\\|nnvirtual\\):"
104 "\\(admin\\|crap\\|lists\\|nag\\|spam\\)\\."))
5252f79a 105
277521fa 106;; My various email addresses.
43026cf3 107(setq message-alternative-emails bbdb-user-mail-names
277521fa
MW
108 message-dont-reply-to-names message-alternative-emails)
109
5252f79a
MW
110;; Mail sent to `mdw-nospam-THING' should appear to come from this address.
111(setq gnus-posting-styles
63bc8fd4
MW
112 '(("^nnimap\\+distorted:crap\\."
113 (address (concat "mdw-nospam-"
114 (substring gnus-newsgroup-name (match-end 0))
24da4184
MW
115 "@distorted.org.uk")))
116 ("^nnimap\\+[^:]+-chiark:"
117 ("X-mdw-Send-Mail" "chiark-smtp"))
118 ("^nnimap\\+google:"
119 (address "distorted.mdw@gmail.com")
120 ("X-mdw-Send-Mail" "gmail-smtp"))))
5252f79a
MW
121
122;; The actual splitting rules.
4fb653fd 123(setq nnmail-split-fancy
a27bd871
MW
124 '(|
125 ;; Administrative boxes.
126 (to "\\(root\\|postgres\\|ca\\|noc\\)@" "admin.misc" t)
127 (to "\\(jukebox\\|nobody\\|darchive\\)@" "admin.misc" t)
128 (to "\\(hostmaster\\)@" "admin.dns" t)
129 (to "\\(news\\|newsmaster\\|usenet\\)@" "admin.news" t)
130 (to "\\(postmaster\\|spamd\\|mailer-daemon\\)@" "admin.mail" t)
131 (to "\\(irc\\|blight\\|ircbot\\)@" "admin.irc" t)
132 (to "\\(www\\|webmaster\\|mtos\\)@" "admin.web" t)
133 (to "\\(ftp\\|ftpadmin\\|mirror\\)@" "admin.ftp" t)
134 (to "\\(abuse\\|security\\)@" "admin.keep" t)
135 (from "cron daemon" "admin.misc")
136 (from "uucp@distorted\\.org\\.uk" "admin.uucp")
137 (from "darchive@.*\\.distorted\\.org\\.uk" "admin.misc")
d268047a 138 (from "bugs@distorted\\.org\\.uk" "admin.bugs")
a27bd871
MW
139
140 ;; Colo provider.
141 (from "\\(accounts\\|support\\)@jump\\.net\\.uk" "keep.colo")
142
143 ;; Mailing lists, not split out earlier.
5252f79a 144 (to "python-list@python\\.org" "lists.python")
a27bd871
MW
145 (to "jump-announce@jump\\.net\\.uk" "lists.jump-announce")
146
147 ;; Per-sender addresses.
370bb0ff 148 (to "mdw-nospam-justgviing@" "crap.justgiving" t)
5252f79a 149 (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
370bb0ff 150 (to "mdw-nopspam-\\([^@]+\\)@" "crap.\\1" t)
a27bd871
MW
151
152 ;; Regular nags.
5252f79a
MW
153 (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
154 (from "\\<mailman-owner@" "nag.mailman" t)
a27bd871 155
48c5ccb3
MW
156 ;; Uninteresting mail.
157 (from "expiry@letsencrypt\\.org" "spam.letsencrypt" t)
158
a27bd871 159 ;; Other splits I've not given a per-sender address.
5252f79a
MW
160 (from "@\\(.*\\.\\)?lovefilm\\.com" "spam.lovefilm" t)
161 (from "@amazon\\." "spam.amazon" t)
162 (from "@cineworldmail\\.com" "spam.cineworld" t)
163 (from "@picturehouses\\.co\\.uk" "spam.picturehouse" t)
164 (from "@nationwide" "spam.nationwide" t)
165 (from "@news\\.spotifymail\\.com" "spam.spotify" t)
166 (from "@action\\.openrightsgroup\\.org" "spam.org" t)
167 (from "unlimited@cineworld\\.com" "spam.cineworld" t)
168 (from "nationwide@securesuiteemail\\.com" "spam.nationwide" t)
a66127fb
MW
169 (from "@liberty-human-rights\\.org\\.uk" "spam.liberty" t)
170 (from "@libertymail\\.org\\.uk" "spam.liberty" t)
a66127fb 171 (from "@openrightsgroup\\.org" "spam.org" t)
5252f79a 172 (from "@tshirthell\\.com" "spam.tshirt-hell" t)
a27bd871
MW
173 (from "campaigns@jolla\\.com" "crap.jolla" t)
174
175 ;; Default.
4fb653fd
MW
176 "mail.misc")
177 nnimap-split-fancy nnmail-split-fancy)
5252f79a
MW
178
179;;;----- That's all, folks --------------------------------------------------