chiark / gitweb /
dot/emacs: More modern configuration for calendar date format.
[profile] / dot / gnus-local.el.distorted
CommitLineData
5252f79a
MW
1;;; -*-emacs-lisp-*-
2;;;
3;;; Local GNUS configuration -- distorted.org.uk version
4;;;
5;;; (c) 2014 Mark Wooding
6;;;
7
789a48fe
MW
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
5252f79a
MW
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)
9adf6847 28 (nnimap-authinfo-file "~/.gnus.authinfo"))
43026cf3
MW
29 (nnimap "markw-distorted"
30 (nnimap-address "mail.distorted.org.uk")
31 (nnimap-stream tls)
32 (nnimap-authinfo-file "~/.gnus.authinfo.markw"))
9adf6847
MW
33 (nnimap "google"
34 (nnimap-address "imap.gmail.com")
35 (nnimap-stream tls)
5252f79a
MW
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
4fb653fd
MW
49 nnimap-split-methods 'nnimap-split-fancy
50 nnmail-split-methods 'nnmail-split-fancy
5252f79a 51 nnimap-split-predicate "UNDELETED"
4fb653fd
MW
52 nnimap-split-crosspost t
53 nnmail-split-crosspost t
5252f79a
MW
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
277521fa 60;; My various email addresses.
43026cf3 61(setq message-alternative-emails bbdb-user-mail-names
277521fa
MW
62 message-dont-reply-to-names message-alternative-emails)
63
5252f79a
MW
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.
4fb653fd 74(setq nnmail-split-fancy
a27bd871
MW
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")
d268047a 89 (from "bugs@distorted\\.org\\.uk" "admin.bugs")
a27bd871
MW
90
91 ;; Colo provider.
92 (from "\\(accounts\\|support\\)@jump\\.net\\.uk" "keep.colo")
93
94 ;; Mailing lists, not split out earlier.
5252f79a 95 (to "python-list@python\\.org" "lists.python")
a27bd871
MW
96 (to "jump-announce@jump\\.net\\.uk" "lists.jump-announce")
97
98 ;; Per-sender addresses.
370bb0ff 99 (to "mdw-nospam-justgviing@" "crap.justgiving" t)
5252f79a 100 (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
370bb0ff 101 (to "mdw-nopspam-\\([^@]+\\)@" "crap.\\1" t)
a27bd871
MW
102
103 ;; Regular nags.
5252f79a
MW
104 (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
105 (from "\\<mailman-owner@" "nag.mailman" t)
a27bd871
MW
106
107 ;; Other splits I've not given a per-sender address.
5252f79a
MW
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)
a66127fb
MW
117 (from "@liberty-human-rights\\.org\\.uk" "spam.liberty" t)
118 (from "@libertymail\\.org\\.uk" "spam.liberty" t)
a66127fb 119 (from "@openrightsgroup\\.org" "spam.org" t)
5252f79a 120 (from "@tshirthell\\.com" "spam.tshirt-hell" t)
a27bd871
MW
121 (from "campaigns@jolla\\.com" "crap.jolla" t)
122
123 ;; Default.
4fb653fd
MW
124 "mail.misc")
125 nnimap-split-fancy nnmail-split-fancy)
5252f79a
MW
126
127;;;----- That's all, folks --------------------------------------------------