chiark / gitweb /
el/dot-emacs.el (mdw-fontify-rust): Fix integer literal syntax.
[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")
a20f5ea0 59 (nnimap-stream starttls)
df5a4ca5
MW
60 (nnimap-inbox "INBOX")
61 (nnimap-unsplittable-articles (%Deleted)))
43026cf3
MW
62 (nnimap "markw-distorted"
63 (nnimap-address "mail.distorted.org.uk")
a20f5ea0 64 (nnimap-stream starttls)
df5a4ca5
MW
65 (nnimap-inbox "INBOX")
66 (nnimap-unsplittable-articles (%Deleted)))
0191c356
MW
67 (nnimap "mwooding-chiark"
68 (nnimap-address "imap.dovecot.chiark.greenend.org.uk")
a20f5ea0
MW
69 (nnimap-stream starttls)
70 (starttls-extra-arguments ("--insecure"))
df5a4ca5
MW
71 (nnimap-inbox "INBOX")
72 (nnimap-unsplittable-articles (%Deleted)))
9adf6847
MW
73 (nnimap "google"
74 (nnimap-address "imap.gmail.com")
75 (nnimap-stream tls)
df5a4ca5
MW
76 (nnimap-inbox "INBOX")
77 (nnimap-unsplittable-articles (%Deleted)))))
5252f79a
MW
78
79;; Send sent mail back to me.
80(setq gnus-message-archive-method "mail"
81 gnus-gcc-mark-as-read t
82 gnus-message-archive-group "nnimap+distorted:mail.sent")
83
84;;;--------------------------------------------------------------------------
85;;; Mail group configuration.
86
87;; General splitting configuration.
88(setq nnimap-split-inbox '("INBOX" "to.split")
89 nnimap-split-rule 'nnimap-split-fancy
4fb653fd
MW
90 nnimap-split-methods 'nnimap-split-fancy
91 nnmail-split-methods 'nnmail-split-fancy
5252f79a 92 nnimap-split-predicate "UNDELETED"
4fb653fd
MW
93 nnimap-split-crosspost t
94 nnmail-split-crosspost t
5252f79a
MW
95 nnmail-split-fancy-match-partial-words nil)
96
97;; Automatic expiry for particular groups.
98(setq gnus-auto-expirable-newsgroups
40a3fc1d
MW
99 (concat "^"
100 "\\(nnimap\\+[^:]+\\|nnvirtual\\):"
101 "\\(admin\\|crap\\|lists\\|nag\\|spam\\)\\."))
5252f79a 102
277521fa 103;; My various email addresses.
43026cf3 104(setq message-alternative-emails bbdb-user-mail-names
277521fa
MW
105 message-dont-reply-to-names message-alternative-emails)
106
5252f79a
MW
107;; Mail sent to `mdw-nospam-THING' should appear to come from this address.
108(setq gnus-posting-styles
63bc8fd4
MW
109 '(("^nnimap\\+distorted:crap\\."
110 (address (concat "mdw-nospam-"
111 (substring gnus-newsgroup-name (match-end 0))
24da4184
MW
112 "@distorted.org.uk")))
113 ("^nnimap\\+[^:]+-chiark:"
114 ("X-mdw-Send-Mail" "chiark-smtp"))
115 ("^nnimap\\+google:"
116 (address "distorted.mdw@gmail.com")
117 ("X-mdw-Send-Mail" "gmail-smtp"))))
5252f79a
MW
118
119;; The actual splitting rules.
4fb653fd 120(setq nnmail-split-fancy
a27bd871
MW
121 '(|
122 ;; Administrative boxes.
123 (to "\\(root\\|postgres\\|ca\\|noc\\)@" "admin.misc" t)
124 (to "\\(jukebox\\|nobody\\|darchive\\)@" "admin.misc" t)
125 (to "\\(hostmaster\\)@" "admin.dns" t)
126 (to "\\(news\\|newsmaster\\|usenet\\)@" "admin.news" t)
127 (to "\\(postmaster\\|spamd\\|mailer-daemon\\)@" "admin.mail" t)
128 (to "\\(irc\\|blight\\|ircbot\\)@" "admin.irc" t)
129 (to "\\(www\\|webmaster\\|mtos\\)@" "admin.web" t)
130 (to "\\(ftp\\|ftpadmin\\|mirror\\)@" "admin.ftp" t)
131 (to "\\(abuse\\|security\\)@" "admin.keep" t)
132 (from "cron daemon" "admin.misc")
133 (from "uucp@distorted\\.org\\.uk" "admin.uucp")
134 (from "darchive@.*\\.distorted\\.org\\.uk" "admin.misc")
51fb1b09 135 (from "support@aa\\.net\\.uk" "admin.aaisp")
d268047a 136 (from "bugs@distorted\\.org\\.uk" "admin.bugs")
a27bd871
MW
137
138 ;; Colo provider.
139 (from "\\(accounts\\|support\\)@jump\\.net\\.uk" "keep.colo")
140
141 ;; Mailing lists, not split out earlier.
5252f79a 142 (to "python-list@python\\.org" "lists.python")
a27bd871
MW
143 (to "jump-announce@jump\\.net\\.uk" "lists.jump-announce")
144
145 ;; Per-sender addresses.
370bb0ff 146 (to "mdw-nospam-justgviing@" "crap.justgiving" t)
5252f79a 147 (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
370bb0ff 148 (to "mdw-nopspam-\\([^@]+\\)@" "crap.\\1" t)
a27bd871
MW
149
150 ;; Regular nags.
5252f79a
MW
151 (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
152 (from "\\<mailman-owner@" "nag.mailman" t)
a27bd871 153
48c5ccb3
MW
154 ;; Uninteresting mail.
155 (from "expiry@letsencrypt\\.org" "spam.letsencrypt" t)
156
a27bd871 157 ;; Other splits I've not given a per-sender address.
5252f79a
MW
158 (from "@\\(.*\\.\\)?lovefilm\\.com" "spam.lovefilm" t)
159 (from "@amazon\\." "spam.amazon" t)
160 (from "@cineworldmail\\.com" "spam.cineworld" t)
161 (from "@picturehouses\\.co\\.uk" "spam.picturehouse" t)
162 (from "@nationwide" "spam.nationwide" t)
163 (from "@news\\.spotifymail\\.com" "spam.spotify" t)
164 (from "@action\\.openrightsgroup\\.org" "spam.org" t)
165 (from "unlimited@cineworld\\.com" "spam.cineworld" t)
166 (from "nationwide@securesuiteemail\\.com" "spam.nationwide" t)
a66127fb
MW
167 (from "@liberty-human-rights\\.org\\.uk" "spam.liberty" t)
168 (from "@libertymail\\.org\\.uk" "spam.liberty" t)
a66127fb 169 (from "@openrightsgroup\\.org" "spam.org" t)
5252f79a 170 (from "@tshirthell\\.com" "spam.tshirt-hell" t)
a27bd871
MW
171 (from "campaigns@jolla\\.com" "crap.jolla" t)
172
173 ;; Default.
4fb653fd
MW
174 "mail.misc")
175 nnimap-split-fancy nnmail-split-fancy)
5252f79a
MW
176
177;;;----- That's all, folks --------------------------------------------------