dot/gnus-local.el.distorted: Match more headers for Debian lists.
[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 "tinycc-devel@nongnu\\.org" "lists.tcc")
66 (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
67 (any "\\(^\\|\\s-\\|[<]\\)\\([-a-z0-9]+\\)@lists\\.debian\\.org" "lists.\\2" t)
68 (to "stds-p1363\\(-discuss\\)?@listserv.ieee.org" "lists.p1363")
69 (to "jump-announce@jump\\.net\\.uk" "lists.jump-announce")
70 (to "jump-discuss@jump\\.net\\.uk" "lists.jump-discuss")
71 (from "support@jump\\.net\\.uk" "keep.colo")
72 (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
73 (from "\\<mailman-owner@" "nag.mailman" t)
74 (from "cron daemon" "admin.misc")
75 (from "uucp@distorted\\.org\\.uk" "admin.uucp")
76 (from "darchive@.*\\.distorted\\.org\\.uk" "admin.misc")
77 (from "@\\(.*\\.\\)?lovefilm\\.com" "spam.lovefilm" t)
78 (from "@amazon\\." "spam.amazon" t)
79 (from "@cineworldmail\\.com" "spam.cineworld" t)
80 (from "@picturehouses\\.co\\.uk" "spam.picturehouse" t)
81 (from "@nationwide" "spam.nationwide" t)
82 (from "@news\\.spotifymail\\.com" "spam.spotify" t)
83 (from "@action\\.openrightsgroup\\.org" "spam.org" t)
84 (from "unlimited@cineworld\\.com" "spam.cineworld" t)
85 (from "nationwide@securesuiteemail\\.com" "spam.nationwide" t)
86 (from "@tshirthell\\.com" "spam.tshirt-hell" t)
87 "mail.misc"))
88
89 ;;;----- That's all, folks --------------------------------------------------