The configuration of Collin Doering
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

139 lines
4.5 KiB

;; File: .gnus
;; Author: Collin J. Doering <>
;; Date: Jan 20, 2011
;; Description: Configuration file for gnus mail reader (in emacs-lisp)
(require 'cl)
(require 'smtpmail)
(setq user-mail-address ""
user-full-name "Collin J. Doering"
smtpmail-smtp-server ""
smtpmail-smtp-service 587
smtpmail-auth-credentials "~/.authinfo.gpg"
message-send-mail-function 'smtpmail-send-it)
(setq nnmail-expiry-wait 2
nnmail-resplit-incoming t)
(setq smtpmail-debug-info t)
(setq smtpmail-stream-type 'starttls) ;; If using TLS/SSL. Use C-h v smtpmail-stream-type RET to see possible values
(setq smtp-accounts
'(("" "Collin J. Doering" "")
("" "rekahsoft" "")))
(defun my-change-smtp ()
(loop with from = (save-restriction
(message-fetch-field "from"))
for (addr fname server) in smtp-accounts
when (string-match addr from)
do (setq user-mail-address addr
user-full-name fname
smtpmail-smtp-server server
smtpmail-smtp-user addr))))
(defadvice smtpmail-via-smtp
(before change-smtp-by-message-from-field (recipient buffer &optional ask) activate)
(with-current-buffer buffer (my-change-smtp)))
(ad-activate 'smtpmail-via-smtp)
;; setting up posting styles
(setq gnus-posting-styles
(address "")
(name "Collin J. Doering (RekahSoft)"))
(address "")
(name "Collin J. Doering"))
(address "")
(name "RekahSoft"))
(address "")
(name "Collin J. Doering"))
(address "")
(name "Rekahsoft Support"))
(address "")
(name "RekahSoft Info"))
;; set primary select method..
(setq gnus-select-method '(nnimap "collin.doering"
(remove-prefix "INBOX.")
(nnimap-address "")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg")))
;; set secondary select methods
(setq gnus-secondary-select-methods
'((nnimap "rekahsoft"
(remove-prefix "INBOX.")
(nnimap-address "")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg"))
(nnimap "collin.doering"
(nnimap-address "")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg"))
(nnimap "info"
(nnimap-address "")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg"))
(nnimap "support"
(nnimap-address "")
(nnimap-server-port 993)
(nnimap-stream ssl)
(nnimap-authinfo-file "~/.authinfo.gpg"))))
;; (nnimap "rekahsoft.mail"
;; (remove-prefix "INBOX.")
;; (nnimap-address "")
;; (nnimap-server-port 993)
;; (nnimap-stream ssl)
;; (nnimap-authinfo-file "~/.rkm-authinfo.gpg"))))
(remove-hook 'gnus-mark-article-hook
(add-hook 'gnus-mark-article-hook 'gnus-summary-mark-unread-as-read)
;;gnus-group-line-format's default value was
;;"%M%S%p%P%5y:%B%(%g%)%l %O\n"
;;(setq gnus-group-line-format "%M%S%5y/%-5t: %uG %D\n")
(setq gnus-group-line-format "%M%S%p%P%5y:%B%(%uG%)%l %O\n")
(defun gnus-user-format-function-G (arg)
(concat (car (cdr gnus-tmp-method)) ":"
(or (gnus-group-find-parameter gnus-tmp-group 'display-name)
(let ((prefix (assq 'remove-prefix (cddr gnus-tmp-method))))
(if (and prefix
(string-match (concat "^\\("
(regexp-quote (cadr prefix))
(substring gnus-tmp-qualified-group (match-end 1))
(setq gnus-thread-hide-subtree t)
(setq gnus-summary-same-subject "")
(setq gnus-sum-thread-tree-root "")
(setq gnus-sum-thread-tree-single-indent "")
(setq gnus-sum-thread-tree-leaf-with-other "+-> ")
(setq gnus-sum-thread-tree-vertical "|")
(setq gnus-sum-thread-tree-single-leaf "`-> ")
;; (require 'gnus-demon)
;; (setq gnus-use-demon t)
;; (gnus-demon-add-handler 'gnus-group-get-new-news 10 2)
;; (gnus-demon-init)