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