chiark / gitweb /
dot/emacs: More modern configuration for calendar date format.
[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 "markw-distorted"
30                 (nnimap-address "mail.distorted.org.uk")
31                 (nnimap-stream tls)
32                 (nnimap-authinfo-file "~/.gnus.authinfo.markw"))
33         (nnimap "google"
34                 (nnimap-address "imap.gmail.com")
35                 (nnimap-stream tls)
36                 (nnimap-authinfo-file "~/.gnus.authinfo"))))
37
38 ;; Send sent mail back to me.
39 (setq gnus-message-archive-method "mail"
40       gnus-gcc-mark-as-read t
41       gnus-message-archive-group "nnimap+distorted:mail.sent")
42
43 ;;;--------------------------------------------------------------------------
44 ;;; Mail group configuration.
45
46 ;; General splitting configuration.
47 (setq nnimap-split-inbox '("INBOX" "to.split")
48       nnimap-split-rule 'nnimap-split-fancy
49       nnimap-split-methods 'nnimap-split-fancy
50       nnmail-split-methods 'nnmail-split-fancy
51       nnimap-split-predicate "UNDELETED"
52       nnimap-split-crosspost t
53       nnmail-split-crosspost t
54       nnmail-split-fancy-match-partial-words nil)
55
56 ;; Automatic expiry for particular groups.
57 (setq gnus-auto-expirable-newsgroups
58       "^nnimap\\+distorted:\\(crap\\|spam\\|admin\\|lists\\|nag\\)\\..*")
59
60 ;; My various email addresses.
61 (setq message-alternative-emails bbdb-user-mail-names
62       message-dont-reply-to-names message-alternative-emails)
63
64 ;; Mail sent to `mdw-nospam-THING' should appear to come from this address.
65 (setq gnus-posting-styles
66       '(((and (string-match "^nnimap\\+distorted:crap\\.\\(.*\\)$"
67                             gnus-newsgroup-name)
68               (setq mdw-from-address
69                     (replace-match "mdw-nospam-\\1@distorted.org.uk"
70                                    nil nil gnus-newsgroup-name)))
71          ("From" mdw-from-address))))
72
73 ;; The actual splitting rules.
74 (setq nnmail-split-fancy
75       '(|
76           ;; Administrative boxes.
77           (to "\\(root\\|postgres\\|ca\\|noc\\)@" "admin.misc" t)
78           (to "\\(jukebox\\|nobody\\|darchive\\)@" "admin.misc" t)
79           (to "\\(hostmaster\\)@" "admin.dns" t)
80           (to "\\(news\\|newsmaster\\|usenet\\)@" "admin.news" t)
81           (to "\\(postmaster\\|spamd\\|mailer-daemon\\)@" "admin.mail" t)
82           (to "\\(irc\\|blight\\|ircbot\\)@" "admin.irc" t)
83           (to "\\(www\\|webmaster\\|mtos\\)@" "admin.web" t)
84           (to "\\(ftp\\|ftpadmin\\|mirror\\)@" "admin.ftp" t)
85           (to "\\(abuse\\|security\\)@" "admin.keep" t)
86           (from "cron daemon" "admin.misc")
87           (from "uucp@distorted\\.org\\.uk" "admin.uucp")
88           (from "darchive@.*\\.distorted\\.org\\.uk" "admin.misc")
89           (from "bugs@distorted\\.org\\.uk" "admin.bugs")
90
91           ;; Colo provider.
92           (from "\\(accounts\\|support\\)@jump\\.net\\.uk" "keep.colo")
93
94           ;; Mailing lists, not split out earlier.
95           (to "python-list@python\\.org" "lists.python")
96           (to "jump-announce@jump\\.net\\.uk" "lists.jump-announce")
97
98           ;; Per-sender addresses.
99           (to "mdw-nospam-justgviing@" "crap.justgiving" t)
100           (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
101           (to "mdw-nopspam-\\([^@]+\\)@" "crap.\\1" t)
102
103           ;; Regular nags.
104           (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
105           (from "\\<mailman-owner@" "nag.mailman" t)
106
107           ;; Other splits I've not given a per-sender address.
108           (from "@\\(.*\\.\\)?lovefilm\\.com" "spam.lovefilm" t)
109           (from "@amazon\\." "spam.amazon" t)
110           (from "@cineworldmail\\.com" "spam.cineworld" t)
111           (from "@picturehouses\\.co\\.uk" "spam.picturehouse" t)
112           (from "@nationwide" "spam.nationwide" t)
113           (from "@news\\.spotifymail\\.com" "spam.spotify" t)
114           (from "@action\\.openrightsgroup\\.org" "spam.org" t)
115           (from "unlimited@cineworld\\.com" "spam.cineworld" t)
116           (from "nationwide@securesuiteemail\\.com" "spam.nationwide" t)
117           (from "@liberty-human-rights\\.org\\.uk" "spam.liberty" t)
118           (from "@libertymail\\.org\\.uk" "spam.liberty" t)
119           (from "@openrightsgroup\\.org" "spam.org" t)
120           (from "@tshirthell\\.com" "spam.tshirt-hell" t)
121           (from "campaigns@jolla\\.com" "crap.jolla" t)
122
123           ;; Default.
124           "mail.misc")
125       nnimap-split-fancy nnmail-split-fancy)
126
127 ;;;----- That's all, folks --------------------------------------------------