dot/gnus-local.el.distorted: Ship local mail config.
authorMark Wooding <mdw@distorted.org.uk>
Mon, 27 Jan 2014 17:08:26 +0000 (17:08 +0000)
committerMark Wooding <mdw@distorted.org.uk>
Mon, 27 Jan 2014 17:08:26 +0000 (17:08 +0000)
Don't install it.  I'll have to add symlinks manually for hosts which
want to use it.

dot/gnus-local.el.distorted [new file with mode: 0644]

diff --git a/dot/gnus-local.el.distorted b/dot/gnus-local.el.distorted
new file mode 100644 (file)
index 0000000..502fdc1
--- /dev/null
@@ -0,0 +1,76 @@
+;;; -*-emacs-lisp-*-
+;;;
+;;; Local GNUS configuration -- distorted.org.uk version
+;;;
+;;; (c) 2014 Mark Wooding
+;;;
+
+;;;--------------------------------------------------------------------------
+;;; Where we get mail from.
+
+;; Read mail on the IMAP server.
+(setq gnus-secondary-select-methods
+      '((nnimap "distorted"
+               (nnimap-address "mail.distorted.org.uk")
+               (nnimap-stream tls)
+               (nnimap-authinfo-file "~/.gnus.authinfo"))))
+
+;; Send sent mail back to me.
+(setq gnus-message-archive-method "mail"
+      gnus-gcc-mark-as-read t
+      gnus-message-archive-group "nnimap+distorted:mail.sent")
+
+;;;--------------------------------------------------------------------------
+;;; Mail group configuration.
+
+;; General splitting configuration.
+(setq nnimap-split-inbox '("INBOX" "to.split")
+      nnimap-split-rule 'nnimap-split-fancy
+      nnimap-split-crosspost t
+      nnimap-split-predicate "UNDELETED"
+      nnmail-split-fancy-match-partial-words nil)
+
+;; Automatic expiry for particular groups.
+(setq gnus-auto-expirable-newsgroups
+      "^nnimap\\+distorted:\\(crap\\|spam\\|admin\\|lists\\|nag\\)\\..*")
+
+;; Mail sent to `mdw-nospam-THING' should appear to come from this address.
+(setq gnus-posting-styles
+      '(((and (string-match "^nnimap\\+distorted:crap\\.\\(.*\\)$"
+                           gnus-newsgroup-name)
+             (setq mdw-from-address
+                   (replace-match "mdw-nospam-\\1@distorted.org.uk"
+                                  nil nil gnus-newsgroup-name)))
+        ("From" mdw-from-address))))
+
+;; The actual splitting rules.
+(setq nnimap-split-fancy
+      '(| (to "\\<\\(news\\|newsmaster\\|usenet\\)@" "admin.news" t)
+         (to "\\<hostmaster@" "admin.dns" t)
+         (to "\\<postmaster@" "admin.mail" t)
+         (to "\\<\\(root\\|mirror\\|postgres\\|spamd\\)@" "admin.misc" t)
+         (to "python-list@python\\.org" "lists.python")
+         (to "tinycc-devel@nongnu\\.org" "lists.tcc")
+         (to "mdw-nospam-\\([^@]+\\)@" "crap.\\1" t)
+         (to "stds-p1363\\(-discuss\\)?@listserv.ieee.org" "lists.p1363")
+         (to "jump-announce@jump\\.net\\.uk" "lists.jump-announce")
+         (to "jump-discuss@jump\\.net\\.uk" "lists.jump-discuss")
+         (from "support@jump\\.net\\.uk" "keep.colo")
+         (from "\\(sealbot\\|cardbot\\)@ncipher\\.com" "nag.cardbot")
+         (from "\\<mailman-owner@" "nag.mailman" t)
+         (from "cron daemon" "admin.misc")
+         (from "uucp@distorted\\.org\\.uk" "admin.uucp")
+         (from "darchive@.*\\.distorted\\.org\\.uk" "admin.misc")
+         (from "@\\(.*\\.\\)?lovefilm\\.com" "spam.lovefilm" t)
+         (from "@amazon\\." "spam.amazon" t)
+         (from "@cineworldmail\\.com" "spam.cineworld" t)
+         (from "@picturehouses\\.co\\.uk" "spam.picturehouse" t)
+         (from "@nationwide" "spam.nationwide" t)
+         (from "@news\\.spotifymail\\.com" "spam.spotify" t)
+         (from "@action\\.openrightsgroup\\.org" "spam.org" t)
+         (from "unlimited@cineworld\\.com" "spam.cineworld" t)
+         (from "nationwide@securesuiteemail\\.com" "spam.nationwide" t)
+         (from "@tshirthell\\.com" "spam.tshirt-hell" t)
+         "mail.misc"))
+
+;;;----- That's all, folks --------------------------------------------------