dot/gnus-local.el.distorted: Put a `Random configuration' banner at the top.
[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
6dac28f9
MW
8;;;--------------------------------------------------------------------------
9;;; Random configuration.
10
df5a4ca5
MW
11(setq auth-sources '("~/.gnus.authinfo"))
12
5252f79a 13;;;--------------------------------------------------------------------------
789a48fe
MW
14;;; How to send mail.
15
24da4184
MW
16(setq smtpmail-smtp-service 587
17 smtpmail-auth-credentials "~/.gnus.authinfo")
18
19(setq mdw-send-mail-alist
20 `((distorted-smtp
21 (send-mail-function . smtpmail-send-it)
22 (smtpmail-smtp-server . "mail.distorted.org.uk")
23 (smtpmail-starttls-credentials
24 ("mail.distorted.org.uk" 587 nil nil)))
25 (chiark-smtp
26 (send-mail-function . smtpmail-send-it)
27 (smtpmail-smtp-server . "smtp.dovecot.chiark.greenend.org.uk")
28 (starttls-extra-arguments "--insecure")
29 (smtpmail-starttls-credentials
30 ("smtp.dovecot.chiark.greenend.org.uk" 587 nil nil)))
31 (gmail-smtp
32 (send-mail-function . smtpmail-send-it)
33 (smtpmail-smtp-server . "smtp.gmail.com")
34 (smtpmail-starttls-credentials
35 ("smtp.gmail.com" 587 nil nil))))
36 mdw-guess-send-mail-alist
37 `((,(concat "@\\(" "\\(chiark\\|slimy\\|coriolis\\)"
38 "\\.greenend\\.org\\.uk"
39 "\\|" "evade\\.org\\.uk"
40 "\\|" "fyvzl\\.net"
41 "\\)$") . chiark-smtp)
42 ("@g\\(\\|oogle\\)mail\\.com$" . gmail-smtp))
43 mdw-default-send-mail-method nil)
789a48fe
MW
44
45;;;--------------------------------------------------------------------------
f240cfd7
MW
46;;; News via chiark.
47
48;; Currently we assume an SSH tunnel. This will be fixed later.
49(setq gnus-select-method
50 '(nntp "chiark-ssh-kludge"
51 (nntp-open-connection-function nntp-open-authinfo-kludge)
df38b85d
MW
52 (nntp-address "tunnel.chiark.greenend.org.uk")
53 (nntp-authinfo-generic "md5cookie1way mdw")))
f240cfd7
MW
54
55;;;--------------------------------------------------------------------------
5252f79a
MW
56;;; Where we get mail from.
57
58;; Read mail on the IMAP server.
59(setq gnus-secondary-select-methods
60 '((nnimap "distorted"
61 (nnimap-address "mail.distorted.org.uk")
a20f5ea0 62 (nnimap-stream starttls)
df5a4ca5
MW
63 (nnimap-inbox "INBOX")
64 (nnimap-unsplittable-articles (%Deleted)))
43026cf3
MW
65 (nnimap "markw-distorted"
66 (nnimap-address "mail.distorted.org.uk")
a20f5ea0 67 (nnimap-stream starttls)
df5a4ca5
MW
68 (nnimap-inbox "INBOX")
69 (nnimap-unsplittable-articles (%Deleted)))
0191c356
MW
70 (nnimap "mwooding-chiark"
71 (nnimap-address "imap.dovecot.chiark.greenend.org.uk")
a20f5ea0
MW
72 (nnimap-stream starttls)
73 (starttls-extra-arguments ("--insecure"))
df5a4ca5
MW
74 (nnimap-inbox "INBOX")
75 (nnimap-unsplittable-articles (%Deleted)))
9adf6847
MW
76 (nnimap "google"
77 (nnimap-address "imap.gmail.com")
78 (nnimap-stream tls)
df5a4ca5
MW
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")
51fb1b09 138 (from "support@aa\\.net\\.uk" "admin.aaisp")
d268047a 139 (from "bugs@distorted\\.org\\.uk" "admin.bugs")
a27bd871
MW
140
141 ;; Colo provider.
142 (from "\\(accounts\\|support\\)@jump\\.net\\.uk" "keep.colo")
143
144 ;; Mailing lists, not split out earlier.
5252f79a 145 (to "python-list@python\\.org" "lists.python")
a27bd871
MW
146 (to "jump-announce@jump\\.net\\.uk" "lists.jump-announce")
147
148 ;; Per-sender addresses.
370bb0ff 149 (to "mdw-nospam-justgviing@" "crap.justgiving" t)
5252f79a 150 (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
370bb0ff 151 (to "mdw-nopspam-\\([^@]+\\)@" "crap.\\1" t)
a27bd871
MW
152
153 ;; Regular nags.
5252f79a
MW
154 (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
155 (from "\\<mailman-owner@" "nag.mailman" t)
a27bd871 156
48c5ccb3
MW
157 ;; Uninteresting mail.
158 (from "expiry@letsencrypt\\.org" "spam.letsencrypt" t)
159
a27bd871 160 ;; Other splits I've not given a per-sender address.
5252f79a
MW
161 (from "@\\(.*\\.\\)?lovefilm\\.com" "spam.lovefilm" t)
162 (from "@amazon\\." "spam.amazon" t)
163 (from "@cineworldmail\\.com" "spam.cineworld" t)
164 (from "@picturehouses\\.co\\.uk" "spam.picturehouse" t)
165 (from "@nationwide" "spam.nationwide" t)
166 (from "@news\\.spotifymail\\.com" "spam.spotify" t)
167 (from "@action\\.openrightsgroup\\.org" "spam.org" t)
168 (from "unlimited@cineworld\\.com" "spam.cineworld" t)
169 (from "nationwide@securesuiteemail\\.com" "spam.nationwide" t)
a66127fb
MW
170 (from "@liberty-human-rights\\.org\\.uk" "spam.liberty" t)
171 (from "@libertymail\\.org\\.uk" "spam.liberty" t)
a66127fb 172 (from "@openrightsgroup\\.org" "spam.org" t)
5252f79a 173 (from "@tshirthell\\.com" "spam.tshirt-hell" t)
a27bd871
MW
174 (from "campaigns@jolla\\.com" "crap.jolla" t)
175
176 ;; Default.
4fb653fd
MW
177 "mail.misc")
178 nnimap-split-fancy nnmail-split-fancy)
5252f79a
MW
179
180;;;----- That's all, folks --------------------------------------------------