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