blob: 55d23f964a3671ee4418c4c3c80faa95decd4b52 (
plain) (
tree)
|
|
;; -*- Emacs-Lisp -*-
(setq vm-imap-account-alist
'(
("imap:localhost:143:*:login:ryan:*" "local")
("imap-ssl:imap.google.com:993:*:login:ryanakca:*" "gmail")
("imap-ssl:rakavan.mail.mit.edu:993:*:login:rakavan:*" "MIT")
)
)
(setq vm-primary-inbox "imap:localhost:143:INBOX:login:ryan:*")
(setq vm-imap-folder-cache-directory "~/.vm-cache")
; Setup coloring
(require 'u-vm-color)
(add-hook 'vm-select-message-hook 'u-vm-color-fontify-buffer)
(add-hook 'vm-summary-mode-hook 'u-vm-color-summary-mode)
(defadvice vm-fill-paragraphs-containing-long-lines
(after u-vm-color activate)
(u-vm-color-fontify-buffer))
(defadvice vm-show-current-message (after u-vm-color activate)
(u-vm-color-fontify-buffer-even-more))
(defadvice vm-decode-mime-message (after u-vm-color activate)
(u-vm-color-fontify-buffer-even-more))
;; fill paragraphs to 72 chars
(setq vm-fill-paragraphs-containing-long-lines-in-reply 72)
(setq vm-word-wrap-paragraphs-in-reply t)
; Setup a shortcut to the whole visit-imap-folder nonsense
(defalias 'imap 'vm-visit-imap-folder)
; Keep the -> line centered
(setq vm-auto-center-summary t)
; Obey FCC
(add-hook 'mail-send-hook 'vm-imap-save-composition)
;; Use a sendmail program
(setq send-mail-function 'sendmail-send-it)
; Enable multiple sender profiles
(require 'vm-pcrisis)
(vmpc-my-identities "rak@debian.org" "ryanakca@gmail.com"
"ryan.kavanagh@queensu.ca" "9rak@queensu.ca"
"ryanakca@kubuntu.org" "ryanakca@ubuntu.com"
"ryan@cs.queensu.ca" "ryank@cs.mcgill.ca"
"ryan.kavanagh@mail.mcgill.ca")
(setq vmpc-conditions
'( ("QueensU"
(vmpc-folder-match ".*QueensU.*") )
("To Debian"
(vmpc-header-match "To" ".*debian.org") )
("To Queensu"
(vmpc-header-match "To" ".*@queensu.ca") )
("To Queens CS"
(vmpc-header-match "To" "ryan@cs.queensu.ca") )
("To Ubuntu"
(vmpc-header-match "To" ".*@ubuntu.com") )
("To Kubuntu"
(vmpc-header-match "To" ".*@kubuntu.org") )
("default"
(vmpc-none-true-yet) )
) )
(setq vmpc-actions
'( ("From Queens"
(vmpc-composition-buffer
(setq user-mail-address "ryan.kavanagh@queensu.ca")
(setq sendmail-program "~/bin/msmtp/msmtp-queensu") )
(vmpc-substitute-header "From" "Ryan Kavanagh <ryan.kavanagh@queensu.ca>")
(vmpc-substitute-header "IMAP-FCC" "local:QueensU.Sent Items") )
("From Queens CS"
(vmpc-composition-buffer
(setq user-mail-address "ryan@cs.queensu.ca")
(setq sendmail-program "~/bin/msmtp/msmtp-queensucs") )
(vmpc-substitute-header "From" "Ryan Kavanagh <ryan@cs.queensu.ca>") )
("From Debian"
(vmpc-composition-buffer
(setq user-mail-address "rak@debian.org")
(setq sendmail-program "~/bin/msmtp/msmtp-default") )
(vmpc-substitute-header "From" "Ryan Kavanagh <rak@debian.org>") )
("From Ubuntu"
(vmpc-composition-buffer
(setq user-mail-address "ryanakca@ubuntu.com")
(setq sendmail-program "~/bin/msmtp/msmtp-ubuntu") )
(vmpc-substitute-header "From" "Ryan Kavanagh <ryanakca@ubuntu.com") )
("From Kubuntu"
(vmpc-composition-buffer
(setq user-mail-address "ryanakca@kubuntu.org")
(setq sendmail-program "~/bin/msmtp/msmtp-kubuntu") )
(vmpc-substitute-header "From" "Ryan Kavanagh <ryanakca@kubuntu.org") )
("prompt"
(vmpc-prompt-for-profile) )
) )
;; Fallback rules
(setq vmpc-default-rules
'( ("To Queensu" "From Queens")
("To Queens CS" "From Queens CS")
("To Debian" "From Debian")
("default" "From Debian")
) )
;; Rules for mail created with vm-mail
(setq vmpc-newmail-rules vmpc-default-rules)
;; Rules for mail created with vm-mail-from-folder
(setq vmpc-mail-rules vmpc-default-rules)
;; Rules for mail created with vm-reply
(setq vmpc-reply-rules
'( ("To Debian" "From Debian")
("To Queensu" "From Queens")
("To Queens CS" "From Queens CS")
("To Ubuntu" "From Ubuntu")
("To Kubuntu" "From Kubuntu")
) )
;; Store login info in .authinfo.gpg
(require 'auth-source)
;; Display whole message, require <SPC> to mark as read
(setq vm-preview-lines t)
;; bind ! to flag a message
(define-key vm-mode-map "!" 'vm-toggle-flag-message)
;; We'll always be saving to an imap server
(define-key vm-mode-map "s" 'vm-save-message-to-imap-folder)
;; We'll always be switching to an imap server
(define-key vm-mode-map "v" 'vm-visit-imap-folder)
;; assume we're saving to the same imap server
(setq vm-imap-save-to-server t)
;; delete a message after saving it
(setq vm-delete-after-saving t)
;; move to the next message after deleting
(setq vm-move-after-deleting t)
;; move to the next message after reading
(setq vm-move-after-reading t)
;; ask before creating a new folder to save to
(setq vm-confirm-new-folders t)
;; Automatically verify mime signatures
(setq vm-mime-verify-signatures t)
;; Ident threads
(setq-default vm-summary-show-threads t)
;; Don't try to load entire messages into memory at startup.
(setq vm-enable-external-messages '(imap))
(setq vm-imap-max-message-size 0)
;; Set attribution format
(setq vm-included-text-attribution-format "On %w, %m %2d, %y at %h %z, %F wrote:
")
;; Prefix included text by "> "
(setq vm-included-text-prefix "> ")
;; include text in reply
(setq vm-include-text-basic t)
;; summary format
(setq vm-summary-format "%n %*%a %-17.17F %2y %-3.3m %2d (%-4l) %4l/%-5c %I\"%s\"
")
;;; BBDB
(require 'bbdb-autoloads)
(require 'bbdb)
(bbdb-initialize 'vm 'message 'sendmail)
;; The following two lines have BBDB automatically add addresses
(bbdb-mua-auto-update-init 'vm 'message 'sendmail)
(setq bbdb-update-records-p 'create)
(setq bbdb-mua-update-interactive-p '(create . create))
;; Offer to save the database
(setq bbdb-offer-save t)
;; Use vm to send mail
(setq bbdb-send-mail-style 'vm)
;; Use a horizontal split
(setq bbdb-mua-pop-up 'horiz)
;; Maximum height of BBDB popup size for vertical split
(setq bbdb-mua-pop-up-window-size 10)
;; Maximum width of BBDB popup size for horizontal split
(setq bbdb-horiz-pop-up-window-size '(80 . 0.3))
;; Don't add addresses matching the following regexp to our DB
(setq bbdb-ignore-some-messages-alist
'((("From" "CC" "Reply-To") . ".*@bugs.(debian.org\\|launchpad.net)\\|.*@.*.launchpad.net\\|noreply")
(("To" "Sender") . "noreply")))
;; (setq bbdb/mail-auto-create-p 'bbdb-ignore-some-messages-hook)
;; Add all addresses in an email
(setq bbdb-message-all-addresses t)
;; ???
(setq bbdb-offer-to-create t)
;; Add notes when updating a record
(add-hook 'bbdb-notice-mail-hook 'bbdb-auto-notes)
;; And track the following:
(setq bbdb-auto-notes-rules
(list
'("Organization"
(".*" organization "\\1" nil))
'("User-Agent"
(".*" mailer identity nil))
'("X-Mailer"
(".*" mailer identity nil))
'("X-Newsreader"
(".*" mailer identity nil))))
;; signature
(setq mail-signature t)
(setq mail-signature-file "~/.signature")
;; gpg?
(require 'vm-pgg)
; prompt for signing
(add-hook 'vm-mail-send-hook 'vm-pgg-ask-hook t)
;; vim: set filetype=lisp:
|