Created
April 19, 2009 09:11
-
-
Save sigma/97986 to your computer and use it in GitHub Desktop.
.gnus-local.el
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;; Use smtp server for mail sending | |
(setq send-mail-function 'smtpmail-send-it) ; if you use `mail' | |
(setq message-send-mail-function 'message-smtpmail-send-it) ; if you use message/Gnus | |
(require 'smtpmail) | |
;; (setq smtpmail-default-smtp-server "smtp.vmware.com" | |
;; smtpmail-smtp-server "smtp.vmware.com" | |
;; smtpmail-smtp-service 25 | |
;; smtpmail-local-domain "vmware.com") | |
(require 'multi-smtpmail) | |
(setq smtpmail-starttls-credentials '(("smtp.gmail.com" 587 "" "") | |
("" 25 "" ""))) | |
(add-to-list 'multi-smtpmail-profiles `(vmware ,(rx "...@vmware.com") | |
(smtpmail-smtp-server "smtp.vmware.com") | |
(smtpmail-smtp-service 25) | |
(smtpmail-local-domain "vmware.com"))) | |
(add-to-list 'multi-smtpmail-profiles `(gmail ,(rx "...@gmail.com") | |
(smtpmail-smtp-server "smtp.gmail.com") | |
(smtpmail-smtp-service 587) | |
(smtpmail-local-domain "plop.info"))) | |
(multi-smtpmail-set-default-profile 'gmail) | |
(setq bbdb-user-mail-names (rx (or "...@vmware.com" | |
"...@gmail.com" | |
"...@free.fr" | |
"...@plop.info"))) | |
;;; Don't include in wide replies | |
(setq message-dont-reply-to-names "[Nn]ame" | |
gnus-ignored-from-addresses "[Nn]ame") | |
;;; Where are gnus-specific files | |
(setq nbc-gnus-dir "~/.elisp/gnus/" | |
gnus-signature-file "~/.signature" | |
gnus-startup-files "~/.emacs.d/.newsrc/" | |
nndraft-directory "~/.emacs.d/var/gnus/") | |
;;; | |
;;; Fetch mails | |
;;; | |
(setq gnus-select-method '(nnnil "")) | |
(add-to-list 'gnus-secondary-select-methods '(nnml "" | |
;; directory for the nnml mail backend | |
(nnml-directory "~/Mail/mail/") | |
;; mail active file | |
(nnml-active-file "~/Mail/mail/active"))) | |
(add-to-list 'gnus-secondary-select-methods '(nntp "news" | |
(nntp-open-connection-function nntp-open-ssl-stream) | |
(nntp-port-number 563) | |
(nntp-address "snews.gmane.org"))) | |
(setq mail-sources `((maildir :path ,(expand-file-name "~/.maildir/") | |
:subdirs ("cur" "new")) | |
(file :path "/var/spool/mail/username"))) | |
;;----------------------------------------------------------------------------- | |
;; Archives | |
;;----------------------------------------------------------------------------- | |
;; Tell gnus which method to use for archives (nnfolder) | |
(setq gnus-message-archive-method | |
'(nnml "archive" | |
(nnml-directory "~/Mail/archive-mail/") | |
(nnml-active-file "~/Mail/archive-mail/active") | |
(nnml-get-new-mail nil) | |
(nnml-inhibit-expiry t))) | |
(setq mm-default-directory (expand-file-name "~/downloads")) | |
(defvar local-home-page "~/org/inbox.org") | |
(setq gnus-posting-styles | |
`((".*" | |
("Face" | |
"......" ;; your face here | |
)) | |
;; For news | |
(message-this-is-news | |
(address "me@example.com")) | |
;; For mail | |
(message-this-is-mail | |
(address "my.name@domain.com")))) | |
(setq canlock-password foo-passwd | |
canlock-password-for-verify canlock-password) | |
(setq gnus-registry-install t | |
gnus-registry-max-pruned-entries 50000 | |
gnus-registry-max-entries 500000 | |
gnus-registry-split-strategy 'majority) | |
(eval-after-load 'gnus-registry | |
'(add-to-list 'gnus-registry-unfollowed-groups "inbox$")) | |
(defalias 'gnus-user-format-function-M | |
'gnus-registry-user-format-function-M) | |
(gnus-registry-initialize) | |
(setq gnus-refer-article-method | |
'(current | |
(nnregistry) | |
(nnweb "gmane" (nnweb-type gmane)))) | |
(setq nnmail-split-methods 'nnmail-split-fancy | |
vmware-split-fancy `(| | |
;; Non-error messages are crossposted to all relevant | |
;; groups | |
(& | |
("x-spam-flag" "yes" "vmware.spam.detected") | |
(from "socialcast.com" "vmware.social") | |
(from ,(rx "root@" (or "qls-qa-yho-desk" "qls-qa-yho-serv")) "vmware.logs") | |
(from "Helpzilla" "vmware.helpzilla") | |
(from "bugzilla" "vmware.bugs") | |
(to ,(rx "cvp@vmware.com") "vmware.cvp") | |
(to ,(rx "python-users@vmware.com") "vmware.python") | |
(to ,(rx "pyvmomi-dev@vmware.com") "vmware.pyvmomi") | |
(to ,(rx "mvp-all@vmware.com") "vmware.mvp-all") | |
(to ,(rx "vmware-employees@vmware.com") "vmware.all") | |
(to ,(rx "io-rm@vmware.com") "vmware.io-rm") | |
(to ,(rx "apps-qa-all@vmware.com") "vmware.all") | |
(to ,(rx "EMEA") "vmware.all") | |
(to ,(rx "mts@vmware.com") "vmware.mts") | |
(to ,(rx "rmx@vmware.com") "vmware.rmx") | |
("subject" ,(rx "Review Request:") "vmware.reviews") | |
("subject" ,(rx (or "R&D Update" "s2 alert" "scheduled maintenance")) "vmware.announces") | |
("subject" ,(rx "[all]") "vmware.all") | |
("subject" ,(rx "[CAT]") "vmware.cat") | |
("subject" ,(rx "[Nimbus]") "vmware.nimbus") | |
("subject" ,(rx "[SVS]") "vmware.svs") | |
("subject" ,(rx "[tipsandtricks]") "vmware.tipsandtricks") | |
("subject" ,(rx "[Lausanne-office]") "vmware.lausanne-office") | |
("subject" ,(rx "[dbcusers]") "vmware.dbc") | |
("subject" ,(rx "[lcm-tech]") "vmware.lcm-tech") | |
("subject" ,(rx "[lcm-develop]") "vmware.lcm-develop") | |
("subject" ,(rx "[distributed-rm]") "vmware.distributed-rm") | |
("subject" ,(rx "[drs-dev]") "vmware.drs-dev") | |
("subject" ,(rx "[lcm-xfunc]") "vmware.lcm-xfunc") | |
("subject" ,(rx (or "[Vmo-qa]" "[vCO-qa]" "[vCO-qa-core]" "[vCO-qa-lausanne]")) "vmware.vmo-qa") | |
("subject" ,(rx "[vmo-develop]") "vmware.vmo-dev") | |
("subject" ,(rx "[Vim-guru]") "vmware.vim-guru") | |
("subject" ,(rx "[Fun-list]") "vmware.fun") | |
("subject" ,(rx "[vsphere-all]") "vmware.vsphere-all") | |
("subject" ,(rx "[Vsphere-eng]") "vmware.vsphere-eng") | |
("subject" ,(rx "[git-users]") "vmware.git-users") | |
("subject" ,(rx "[Esx-simulator]") "vmware.esx-simulator") | |
("subject" ,(rx "[Bug ") "vmware.bugs") | |
("subject" ,(rx "[Vim-qa ") "vmware.vim-qa") | |
("subject" ,(rx "[P4 SUBMIT ") "vmware.p4-submit") | |
("subject" ,(rx (or "Jidine Test Result" "[Vmo-qa-testresult]")) "vmware.test-results") | |
("subject" ,(rx (or "[tech-talk]" "Tech Talk:")) "vmware.tech-talk") | |
("subject" ,(rx (or "Updated: " "Canceled: ")) "vmware.meetings") | |
("from" ,(rx "SmartAlerts") "vmware.notifications") | |
;; *last*, consider sent mails | |
(from ,(rx "Name") "vmware.sent") | |
) | |
;; Unmatched mail goes to the catch all group. | |
"vmware.inbox") | |
gmail-split-fancy `(| | |
(& | |
("subject" ,(rx (or "[CEDET-devel]" "[cedet-semantic]")) "gmail.cedet") | |
("subject" ,(rx "[ECB-list]") "gmail.ecb") | |
("subject" ,(rx "[dokuwiki]") "gmail.dokuwiki") | |
(to ,(rx "magit@googlegroups.com") "gmail.magit")) | |
"gmail.inbox") | |
nnmail-split-fancy `(& | |
;; (: gnus-registry-split-fancy-with-parent) | |
("subject" ,(rx "Out of Office: ") "vmware.out-of-office") | |
(: nnmail-split-fancy-with-parent) | |
(| (from mail (| ("subject" "warn.*" "mail.warning") | |
"mail.misc")) | |
;; VMware rules | |
(to "...@vmware.com" ,vmware-split-fancy) | |
("delivered-to" "vmware.com" ,vmware-split-fancy) | |
;; GMail rules | |
(to "...@gmail.com" ,gmail-split-fancy) | |
("Delivered-To" "...@gmail.com" ,gmail-split-fancy) | |
;; Fallback | |
"inbox" | |
) | |
)) | |
(setq nnmail-expiry-wait 7 | |
nnmail-expiry-wait-function | |
(lambda (newsgroup) | |
(cond ((string-match "^vmware\\." newsgroup) | |
(cond ((string-match "inbox" newsgroup) 'never) | |
((string-match "testresult" newsgroup) '1) | |
((string-match (rx (or "lausanne-office" "vmo-dev" "vmo-qa" "vim-guru")) newsgroup) 7) | |
(t 30))) | |
((string-match "junk" newsgroup) 1) | |
((string-match "important" newsgroup) 'never) | |
(t 7)))) | |
(setq | |
gnus-home-score-file "all.SCORE" | |
gnus-permanently-visible-groups "search") | |
(setq pgg-default-user-id "00000000") | |
(setq gnus-auto-subscribed-groups | |
"^\\(nnml\\|nnfolder\\|nnmbox\\|nnmh\\|nnbabyl\\|nnmaildir\\).*:\\([^z]\\|z$\\|\\z[^z]\\|zz$\\|zz[^_]\\|zz_$\\).*") | |
(setq gnus-parameters | |
(append gnus-parameters | |
'(("nnml:spam\\.detected" | |
(gnus-article-sort-functions '(gnus-article-sort-by-chars)) | |
(ham-process-destination "nnml:misc" "nnml:ham.train") | |
(spam-contents gnus-group-spam-classification-spam)) | |
("nnml:.*" | |
(spam-process-destination . "nnml:spam.train") | |
(spam-contents gnus-group-spam-classification-ham))))) | |
(setq gnus-group-jump-to-group-prompt '((0 . "nnml:") | |
(1 . "nnml:vmware.inbox") | |
(2 . "nnml:gmail.inbox"))) | |
(setq message-default-headers (format "Bcc: %s" user-mail-address)) | |
(setq message-default-headers nil) | |
;; (defadvice nnmairix-determine-original-group-from-registry (after remove-mairix act) | |
;; (setq ad-return-value | |
;; (remove-if (lambda (name) | |
;; (string-match "^nnmairix" name)) ad-return-value))) | |
;; (require 'nnmairix) | |
(defun gnus-registry-fetch-group (id) | |
(car (gnus-registry-fetch-groups id))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment