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