chiark / gitweb /
Merge remote-tracking branch 'staging'
[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         (nnimap "google"
30                 (nnimap-address "imap.gmail.com")
31                 (nnimap-stream tls)
32                 (nnimap-authinfo-file "~/.gnus.authinfo"))))
33
34 ;; Send sent mail back to me.
35 (setq gnus-message-archive-method "mail"
36       gnus-gcc-mark-as-read t
37       gnus-message-archive-group "nnimap+distorted:mail.sent")
38
39 ;;;--------------------------------------------------------------------------
40 ;;; Mail group configuration.
41
42 ;; General splitting configuration.
43 (setq nnimap-split-inbox '("INBOX" "to.split")
44       nnimap-split-rule 'nnimap-split-fancy
45       nnimap-split-crosspost t
46       nnimap-split-predicate "UNDELETED"
47       nnmail-split-fancy-match-partial-words nil)
48
49 ;; Automatic expiry for particular groups.
50 (setq gnus-auto-expirable-newsgroups
51       "^nnimap\\+distorted:\\(crap\\|spam\\|admin\\|lists\\|nag\\)\\..*")
52
53 ;; Mail sent to `mdw-nospam-THING' should appear to come from this address.
54 (setq gnus-posting-styles
55       '(((and (string-match "^nnimap\\+distorted:crap\\.\\(.*\\)$"
56                             gnus-newsgroup-name)
57               (setq mdw-from-address
58                     (replace-match "mdw-nospam-\\1@distorted.org.uk"
59                                    nil nil gnus-newsgroup-name)))
60          ("From" mdw-from-address))))
61
62 ;; The actual splitting rules.
63 (setq nnimap-split-fancy
64       '(| (to "\\<\\(news\\|newsmaster\\|usenet\\)@" "admin.news" t)
65           (to "\\<hostmaster@" "admin.dns" t)
66           (to "\\<postmaster@" "admin.mail" t)
67           (to "\\<\\(root\\|mirror\\|postgres\\|spamd\\)@" "admin.misc" t)
68           (to "python-list@python\\.org" "lists.python")
69           (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
70           (from "support@jump\\.net\\.uk" "keep.colo")
71           (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
72           (from "\\<mailman-owner@" "nag.mailman" t)
73           (from "cron daemon" "admin.misc")
74           (from "uucp@distorted\\.org\\.uk" "admin.uucp")
75           (from "darchive@.*\\.distorted\\.org\\.uk" "admin.misc")
76           (from "@\\(.*\\.\\)?lovefilm\\.com" "spam.lovefilm" t)
77           (from "@amazon\\." "spam.amazon" t)
78           (from "@cineworldmail\\.com" "spam.cineworld" t)
79           (from "@picturehouses\\.co\\.uk" "spam.picturehouse" t)
80           (from "@nationwide" "spam.nationwide" t)
81           (from "@news\\.spotifymail\\.com" "spam.spotify" t)
82           (from "@action\\.openrightsgroup\\.org" "spam.org" t)
83           (from "unlimited@cineworld\\.com" "spam.cineworld" t)
84           (from "nationwide@securesuiteemail\\.com" "spam.nationwide" t)
85           (from "@tshirthell\\.com" "spam.tshirt-hell" t)
86           "mail.misc"))
87
88 ;;;----- That's all, folks --------------------------------------------------