chiark / gitweb /
dot/gnus-local.el.distorted: Ship local mail config.
[profile] / dot / gnus-local.el.distorted
1 ;;; -*-emacs-lisp-*-
2 ;;;
3 ;;; Local GNUS configuration -- distorted.org.uk version
4 ;;;
5 ;;; (c) 2014 Mark Wooding
6 ;;;
7
8 ;;;--------------------------------------------------------------------------
9 ;;; Where we get mail from.
10
11 ;; Read mail on the IMAP server.
12 (setq gnus-secondary-select-methods
13       '((nnimap "distorted"
14                 (nnimap-address "mail.distorted.org.uk")
15                 (nnimap-stream tls)
16                 (nnimap-authinfo-file "~/.gnus.authinfo"))))
17
18 ;; Send sent mail back to me.
19 (setq gnus-message-archive-method "mail"
20       gnus-gcc-mark-as-read t
21       gnus-message-archive-group "nnimap+distorted:mail.sent")
22
23 ;;;--------------------------------------------------------------------------
24 ;;; Mail group configuration.
25
26 ;; General splitting configuration.
27 (setq nnimap-split-inbox '("INBOX" "to.split")
28       nnimap-split-rule 'nnimap-split-fancy
29       nnimap-split-crosspost t
30       nnimap-split-predicate "UNDELETED"
31       nnmail-split-fancy-match-partial-words nil)
32
33 ;; Automatic expiry for particular groups.
34 (setq gnus-auto-expirable-newsgroups
35       "^nnimap\\+distorted:\\(crap\\|spam\\|admin\\|lists\\|nag\\)\\..*")
36
37 ;; Mail sent to `mdw-nospam-THING' should appear to come from this address.
38 (setq gnus-posting-styles
39       '(((and (string-match "^nnimap\\+distorted:crap\\.\\(.*\\)$"
40                             gnus-newsgroup-name)
41               (setq mdw-from-address
42                     (replace-match "mdw-nospam-\\1@distorted.org.uk"
43                                    nil nil gnus-newsgroup-name)))
44          ("From" mdw-from-address))))
45
46 ;; The actual splitting rules.
47 (setq nnimap-split-fancy
48       '(| (to "\\<\\(news\\|newsmaster\\|usenet\\)@" "admin.news" t)
49           (to "\\<hostmaster@" "admin.dns" t)
50           (to "\\<postmaster@" "admin.mail" t)
51           (to "\\<\\(root\\|mirror\\|postgres\\|spamd\\)@" "admin.misc" t)
52           (to "python-list@python\\.org" "lists.python")
53           (to "tinycc-devel@nongnu\\.org" "lists.tcc")
54           (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
55           (to "stds-p1363\\(-discuss\\)?@listserv.ieee.org" "lists.p1363")
56           (to "jump-announce@jump\\.net\\.uk" "lists.jump-announce")
57           (to "jump-discuss@jump\\.net\\.uk" "lists.jump-discuss")
58           (from "support@jump\\.net\\.uk" "keep.colo")
59           (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
60           (from "\\<mailman-owner@" "nag.mailman" t)
61           (from "cron daemon" "admin.misc")
62           (from "uucp@distorted\\.org\\.uk" "admin.uucp")
63           (from "darchive@.*\\.distorted\\.org\\.uk" "admin.misc")
64           (from "@\\(.*\\.\\)?lovefilm\\.com" "spam.lovefilm" t)
65           (from "@amazon\\." "spam.amazon" t)
66           (from "@cineworldmail\\.com" "spam.cineworld" t)
67           (from "@picturehouses\\.co\\.uk" "spam.picturehouse" t)
68           (from "@nationwide" "spam.nationwide" t)
69           (from "@news\\.spotifymail\\.com" "spam.spotify" t)
70           (from "@action\\.openrightsgroup\\.org" "spam.org" t)
71           (from "unlimited@cineworld\\.com" "spam.cineworld" t)
72           (from "nationwide@securesuiteemail\\.com" "spam.nationwide" t)
73           (from "@tshirthell\\.com" "spam.tshirt-hell" t)
74           "mail.misc"))
75
76 ;;;----- That's all, folks --------------------------------------------------