X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/301d94a9158490882f3916edc5d6584693250d31..c7203018088c17c7c5516f62b508f04680c63ca2:/dot/gnus-local.el.distorted diff --git a/dot/gnus-local.el.distorted b/dot/gnus-local.el.distorted index e753bdf..466296c 100644 --- a/dot/gnus-local.el.distorted +++ b/dot/gnus-local.el.distorted @@ -8,14 +8,34 @@ ;;;-------------------------------------------------------------------------- ;;; How to send mail. -(and nil - (setq smtpmail-smtp-server "mail.distorted.org.uk" - smtpmail-sendto-domain "distorted.org.uk" - smtpmail-smtp-service 587 - smtpmail-auth-credentials "~/.gnus.authinfo" - message-send-mail-function 'smtpmail-send-it - smtpmail-starttls-credentials - '(("mail.distorted.org.uk" 587 "" "")))) +(setq smtpmail-smtp-service 587 + smtpmail-auth-credentials "~/.gnus.authinfo") + +(setq mdw-send-mail-alist + `((distorted-smtp + (send-mail-function . smtpmail-send-it) + (smtpmail-smtp-server . "mail.distorted.org.uk") + (smtpmail-starttls-credentials + ("mail.distorted.org.uk" 587 nil nil))) + (chiark-smtp + (send-mail-function . smtpmail-send-it) + (smtpmail-smtp-server . "smtp.dovecot.chiark.greenend.org.uk") + (starttls-extra-arguments "--insecure") + (smtpmail-starttls-credentials + ("smtp.dovecot.chiark.greenend.org.uk" 587 nil nil))) + (gmail-smtp + (send-mail-function . smtpmail-send-it) + (smtpmail-smtp-server . "smtp.gmail.com") + (smtpmail-starttls-credentials + ("smtp.gmail.com" 587 nil nil)))) + mdw-guess-send-mail-alist + `((,(concat "@\\(" "\\(chiark\\|slimy\\|coriolis\\)" + "\\.greenend\\.org\\.uk" + "\\|" "evade\\.org\\.uk" + "\\|" "fyvzl\\.net" + "\\)$") . chiark-smtp) + ("@g\\(\\|oogle\\)mail\\.com$" . gmail-smtp)) + mdw-default-send-mail-method nil) ;;;-------------------------------------------------------------------------- ;;; News via chiark. @@ -40,6 +60,10 @@ (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) @@ -75,12 +99,15 @@ ;; 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"))) + ("^nnimap\\+[^:]+-chiark:" + ("X-mdw-Send-Mail" "chiark-smtp")) + ("^nnimap\\+google:" + (address "distorted.mdw@gmail.com") + ("X-mdw-Send-Mail" "gmail-smtp")))) ;; The actual splitting rules. (setq nnmail-split-fancy