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