X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/3da089939fb0017b21cd44ab95b7ea0fcf8a0090..0191c356991d51c055fd7818adcbcc91fa348214:/dot/gnus-local.el.distorted diff --git a/dot/gnus-local.el.distorted b/dot/gnus-local.el.distorted index 21b65e3..15c76e2 100644 --- a/dot/gnus-local.el.distorted +++ b/dot/gnus-local.el.distorted @@ -18,6 +18,16 @@ '(("mail.distorted.org.uk" 587 "" "")))) ;;;-------------------------------------------------------------------------- +;;; News via chiark. + +;; Currently we assume an SSH tunnel. This will be fixed later. +(setq gnus-select-method + '(nntp "chiark-ssh-kludge" + (nntp-open-connection-function nntp-open-authinfo-kludge) + (nntp-address "tunnel.chiark.greenend.org.uk") + (nntp-authinfo-generic "md5cookie1way mdw"))) + +;;;-------------------------------------------------------------------------- ;;; Where we get mail from. ;; Read mail on the IMAP server. @@ -26,6 +36,14 @@ (nnimap-address "mail.distorted.org.uk") (nnimap-stream tls) (nnimap-authinfo-file "~/.gnus.authinfo")) + (nnimap "markw-distorted" + (nnimap-address "mail.distorted.org.uk") + (nnimap-stream tls) + (nnimap-authinfo-file "~/.gnus.authinfo.markw")) + (nnimap "mwooding-chiark" + (nnimap-address "imap.dovecot.chiark.greenend.org.uk") + (nnimap-stream tls) + (nnimap-authinfo-file "~/.gnus.authinfo")) (nnimap "google" (nnimap-address "imap.gmail.com") (nnimap-stream tls) @@ -42,37 +60,68 @@ ;; General splitting configuration. (setq nnimap-split-inbox '("INBOX" "to.split") nnimap-split-rule 'nnimap-split-fancy - nnimap-split-crosspost t + nnimap-split-methods 'nnimap-split-fancy + nnmail-split-methods 'nnmail-split-fancy nnimap-split-predicate "UNDELETED" + nnimap-split-crosspost t + nnmail-split-crosspost t nnmail-split-fancy-match-partial-words nil) ;; Automatic expiry for particular groups. (setq gnus-auto-expirable-newsgroups - "^nnimap\\+distorted:\\(crap\\|spam\\|admin\\|lists\\|nag\\)\\..*") + (concat "^" + "\\(nnimap\\+[^:]+\\|nnvirtual\\):" + "\\(admin\\|crap\\|lists\\|nag\\|spam\\)\\.")) + +;; My various email addresses. +(setq message-alternative-emails bbdb-user-mail-names + message-dont-reply-to-names message-alternative-emails) ;; 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)))) + '(("^nnimap\\+distorted:crap\\." + (address (concat "mdw-nospam-" + (substring gnus-newsgroup-name (match-end 0)) + "@distorted.org.uk"))))) ;; The actual splitting rules. -(setq nnimap-split-fancy - '(| (to "\\<\\(news\\|newsmaster\\|usenet\\)@" "admin.news" t) - (to "\\