私の.mew(抜粋)

Emacs21、mew-2.2用です。ぱくってもいいですが、できたらしらせてください。こうするといいよ〜なども歓迎。
;; Optional setup (Read Mail menu for Emacs 21):
(when (boundp 'read-mail-command)
  (setq read-mail-command 'mew))

(setq mew-smime-CA-file "/usr/local/ssl/certs/ca-root.crt")
(setq mew-smime-pubkey-dir (expand-file-name "~/.mew-smime-pubkey"))
(setq mew-theme-file "~/.mew-theme.el")
(when (fboundp 'compile-newer-file)
  (compile-newer-file mew-theme-file))

(setq mew-use-biff t)
; Set longer if you check a remote pop server.
(setq mew-pop-biff-interval 1)
(setq mew-pop-auth 'pass)
(setq mew-pop-server "localhost")
(setq mew-pop-size 0)
(setq mew-passwd-lifetime 24)
(setq mew-passwd-timer-unit 60)
(setq mew-smtp-server "localhost")
(setq mew-use-cached-passwd t)
(setq mew-decode-quoted t)

(defun mew-scan-form-youbi ()
  (let ((s (MEW-DATE)))
    (when (>= (length s) 3)
      (setq s (substring s 0 3)))
    (cdr
     (assoc s
	    '(("Mon" . "月")
	      ("Tue" . "火")
	      ("Wed" . "水")
	      ("Thu" . "木")
	      ("Fri" . "金")
	      ("Sat" . "土")
	      ("Sun" . "日"))))))
(setq mew-scan-form
      '(type (5 date) "(" (2 youbi) ")[" (5 time) "]" (-4 size) " "
	     t (14 from) " " (0 subj)))
; fancy-thread
(setq mew-use-fancy-thread t)
;; mew-lang-jp sets this
;(setq mew-fancy-thread-indent-strings
;      ["├" "└" "│" " "]) ;; [" +" " +" " |" "  "]
(setq mew-use-thread-separator nil)
(setq mew-thread-separator "--")

; x-face
(cond
 ((eq emacs-major-version 21)
  (setq mew-use-highlight-x-face t
	mew-use-highlight-x-face-function 'x-face-decode-message-header)
  (define-key mew-summary-mode-map "\C-cxs" 'x-face-save)
  (define-key mew-draft-mode-map "\C-cxi" 'x-face-insert)
  (define-key mew-draft-header-map "\C-cxi" 'x-face-insert)
  (define-key mew-draft-mode-map "\C-cxs" 'x-face-show)
  (define-key mew-draft-header-map "\C-cxs" 'x-face-show)
  ;; Insert default x-face automatically
  ;;(add-hook 'mew-draft-mode-hook 'x-face-insert)
  (add-hook 'mew-make-message-hook 'x-face-turn-off)
  ;; Hit it off with select-xface.
  (defun mew-x-face-decode-message-header (beg end)
    (x-face-decode-message-header beg end))
  (add-hook 'select-xface-insert-hook (function (lambda () (x-face-show 1))))
  )
 (t
  ;; (setq mew-use-highlight-x-face t)
  ;; (setq mew-use-highlight-x-face-function
  ;;       'x-face-mule-x-face-decode-message-header)
  ;; (require 'x-face-mule)
  ))

; 署名/暗号化に使うprogram
(setq mew-prog-pgp "gpg")

; mew-cite-color.el
(and window-system (locate-library "mew-cite-color")
     (require 'mew-cite-color))

; レンジを聞かない
(setq mew-ask-range nil)

; ここに mew-config-alist mew-mail-domain-list などがはいる

(setq mew-sort-default-key-alist
      '(("+mew-dist" . "x-mail-count")))

(setq mew-refile-guess-alist
      '(
	("To:" ("linux-kernel@" . "+lkm")
	       ("memo@memo.st.ryukoku.ac.jp" . "+security-hole-memo-ml"))
	("Cc:" ("linux-kernel@" . "+lkm"))
	))

(setq mew-end-of-message-string "[終わりです]")
(setq mew-end-of-part-string "[続いてます]")

; Reply-To: だけにReplyする
(setq mew-replyto-to-list '("Reply-To:"))

; To: には Cc: しない
(setq mew-noreplyto-cc-list '("Cc:"))
(setq mew-replyto-cc-list '("Cc:"))

; headerに入れる文字列
;; (setq mew-header-alist
;;       '(
;; 	("X-PGP-fingerprint:" .
;; 	 "DE C7 C3 AD 88 76 10 6E  7F EB BA ED 9A 91 7C 3B")
;; 	("X-PGP-Key:" .
;; 	 "http://pgp5.ai.mit.edu:11371/pks/lookup?op=get&search=0x2F103DD9")
;; 	))

; これがあると素敵 (というか無いと遅くて使い物にならない)
;(cond
; ((locate-library "lazy-lock")	;; for Emacs
;  (require 'font-lock)
;  (setq font-lock-support-mode 'lazy-lock-mode))
; ((locate-library "lazy-shot")	;; for XEmacs
;  (require 'font-lock)
;  (add-hook 'font-lock-mode-hook 'turn-on-lazy-shot)
;  (setq lazy-shot-verbose nil)
;  (setq lazy-shot-stealth-verbose nil)))
(and (locate-library "lazy-lock") (require 'font-lock) (setq font-lock-support-mode 'lazy-lock-mode))

; 内部で window-system とかの判定はしていません。
(when (and window-system (locate-library "mew-summary-hl"))
  (add-hook 'mew-init-hook (function (lambda () (require 'mew-summary-hl))))
  (setq mew-summary-hl-from-width 14)
  (setq mew-summary-hl-subject-regex-with-body nil)
  (setq mew-summary-hl-face-num-type 'default
	mew-summary-hl-face-num-color "Maroon"
	mew-summary-hl-face-from-type 'bold
	mew-summary-hl-face-from-color "Purple"
	mew-summary-hl-face-to-type 'bold
	mew-summary-hl-face-to-color "DarkOrange3"
	mew-summary-hl-face-special-type 'bold
	mew-summary-hl-face-special-color "Magenta"
	mew-summary-hl-face-ml-type 'bold
	mew-summary-hl-face-ml-color "DarkGreen"
	mew-summary-hl-face-subject-type 'bold
	mew-summary-hl-face-subject-color "Blue"
	mew-summary-hl-face-body-type 'italic
	mew-summary-hl-face-body-color "Grey50"
	mew-summary-hl-face-attach-type 'italic
	mew-summary-hl-face-attach-color "DarkOrchid"
	mew-summary-hl-face-thread-type 'default
	mew-summary-hl-face-thread-color "Grey60"))
;; 色が付きすぎて mark 行が目立たないぞ、という人は、こんなのを
;; ~/.emacs に書いておくと mark 行が反転表示になります。
; (defadvice mew-highlight-face-setup (after invert-make-face activate)
;   (when (and (eq flist mew-highlight-mark-face-list)
;              (or mew-use-highlight-mark (featurep 'mew-summary-hl))
;              window-system)
;     (let ((fg (cdr (assoc 'background-color (frame-parameters)))))
;       (mapcar (function
;                (lambda (face)
;                  (invert-face face)
;                  (set-face-foreground face fg)))
;               mew-highlight-mark-face-list))))

; 表示する(されないヘッダはBSで上にscrollすればみれる)ヘッダの設定
(setq mew-field-visible
  '("Subject:" "From:" "To:" "Apparently-To:" "Message-Id:"
    "Cc:" "Newsgroups:" "Date:" "Reply-To:"
    "Resent-From:" "Resent-To:" "Resent-Cc:"
    "Content-Type:" "Content-Transfer-Encoding:"))
(setq mew-field-invisible
  '("Received:" "Return-Path:" "Sender:" "Errors-To:" "Mime-Version:"
    "Resent-Date:" "Resent-Message-Id:" "Resent-Sender:" "Resent-Reply-To:"
    "Delivery-Date:" "Delivered-To:"
    "X-PGP-Sig:" "X-Face:" "X-Priority:" "X-ML-Name:" "X-ML-Driver:" "X-UIDL:"
    "X-Distribute:" "X-Sequence:"
    "List-Post:" "List-Owner:" "List-Help:" "List-Unsubscribe:"
    "From$"))

; 引用記号はmu-citeを使っていれる
(autoload 'mu-cite-original "mu-cite")
(setq mew-cite-hook 'mu-cite-original)
(setq message-cite-function (function mu-cite-original))
(setq mu-cite-top-format
      '(" " id " の記事において\n"
        " " date " ごろに\n"
	" " full-name "<" address "> さんは書きました。\n\n"))

; use enfle w/ mew
(setq mew-prog-jpeg '("enfle" () t)
      mew-prog-gif  '("enfle" () t)
      mew-prog-png  '("enfle" () t)
      mew-prog-bmp  '("enfle" () t)
      mew-prog-xbm  '("enfle" () t)
      mew-prog-xpm  '("enfle" () t)
      mew-prog-xwd  '("xv" () t))

; 定型文書の挿入
(add-hook 'mew-draft-mode-newdraft-hook
	  (function
	   (lambda ()
	     (let ((p (point)))
	       (goto-char (point-max))
	       (insert-file "~/.preface")
	       (goto-char p)))))

(and (locate-library "select-xface") (require 'select-xface))
(add-hook 'mew-draft-mode-hook
          (function
	   (lambda ()
	     ;; Mew の Draft モードではauto-fill-modeにする。
	     (auto-fill-mode 1)
	     ;; C-c C-i で c-sigでsignature挿入。C-c C-x で select-xface
	     (define-key (current-local-map) "\C-c\C-x" 'select-xface)
	     (define-key (current-local-map) "\C-c\C-i" 'insert-signature-eref)
	     ;; 引用部分を考慮したfill
	     (setq adaptive-fill-first-line-regexp
		   "[ \t]*\\([-a-z0-9A-Z]\\|\\cj\\)*>+[ \t;#]*\\|[ \t;#]*"
		   adaptive-fill-regexp
		   "[ \t]*\\([-a-z0-9A-Z]\\|\\cj\\)*>+[ \t;#]*\\|[ \t;#]*")
	     )))
;(setq select-xface-add-x-face-version-header t)

; Mew から browse-url を呼び出す
;(require 'mew-browse)
;(setq mew-ext-prog-url "/usr/local/mozilla/mozilla")
;(setq mew-prog-text/html-ext "mozilla")
;(setq browse-url-netscape-program "mozilla")
;(setq thing-at-point-url-path-regexp "[~/A-Za-z0-9---_.${}#%,:]+")mozilla
(define-key mew-message-mode-map [mouse-2] 'w3m-view-this-url)
(define-key mew-message-mode-map [mouse-3] 'browse-url-at-mouse)

; refile-view
(and (locate-library "mew-refile-view") (require 'mew-refile-view)
     (define-key mew-summary-mode-map "l" 'mew-refile-view))

; mew-w3m
(condition-case nil
    (require 'mew-w3m)
  (file-error nil))
;(setq w3m-type 'w3m-m17n)
(setq mew-use-w3m-minor-mode t)
(add-hook 'mew-message-hook 'mew-w3m-minor-mode-setter)
(define-key mew-summary-mode-map "T" 'mew-w3m-view-inline-image)

; mg
(setq mew-prog-grep "mg")
;; 1. Search an EUC key (after converting to JIS) on JIS messages.
(setq mew-prog-grep-opts '("-j" "jis" "-l" "-e"))
;; 2. Search an EUC key (after converting to JIS) on JIS messages
;;    decoding their encoded-words.
;; (setq mew-prog-grep-opts '("-j" "jis" "-l" "-e" "-x" "&mime"))
;; 3. Search an EUC key on JIS messages after converting to EUC by nkf.
;; (setq mew-prog-grep-opts '("-l" "-e" "-z" "nkf -e"))
;; 4. Search an EUC key on JIS messages after converting to EUC
;;    and decoding their encoded-words by nkf. Make sure that
;;    "nkf" has the "-m" option.
;; (setq mew-prog-grep-opts '("-l" "-e" "-z" "nkf -e -m"))
;; Set mew-prog-vgrep and mew-prog-vgrep-opts also.

;;; mew-shimbun のロード、キー定義
(setq mew-shimbun-use-unseen t)
(require 'mew-shimbun)
(define-key mew-summary-mode-map "G"  (make-sparse-keymap))
(define-key mew-summary-mode-map "Gg" 'mew-shimbun-goto-folder)
(define-key mew-summary-mode-map "Gi" 'mew-shimbun-retrieve)
(define-key mew-summary-mode-map "GI" 'mew-shimbun-retrieve-all)
(define-key mew-summary-mode-map "Gr" 'mew-shimbun-re-retrieve)
(define-key mew-summary-mode-map "GR" 'mew-shimbun-re-retrieve-all)
(when mew-shimbun-use-unseen
  (define-key mew-summary-mode-map "Gu" 'mew-shimbun-unseen-check)
  (define-key mew-summary-mode-map "GU" 'mew-shimbun-unseen-remove-all))

;;; 変数の設定の例
;; ハイパー日記システムのサイトを読むときは例えば以下のように設定します。
;; (これは、Mew に限らずすべての MUA で共通の方式です)
;; (setq shimbun-hns-group-alist
;;       '(("arisawa"                              ;; グループ名
;;          "http://www.nijino.com/ari/diary/"     ;; URL
;;          "ari@mbf.sphere.ne.jp")                ;; From: に挿入するメールアドレス
;;         ("miyoshi"
;;          "http://www.be.wakwak.com/cgi-bin/sbox/~miyoshi/hns/"
;;          "miyoshi@meadowy.org")))

;; mew-shimbun-folder-groups に Mew で購読する shimbun server 及び group
;; を設定します。
;; それぞれ、("folder" (("server.group" . range) ...)) で range には
;; all, last, 数字が指定できます。以下に例を示します。

(setq mew-shimbun-folder-groups
      '(("yomiuri"
         ("yomiuri.shakai" . 2)
         ("yomiuri.seiji". 2)
         ("yomiuri.keizai". 2)
         ("yomiuri.kokusai". 2))
        ("security-memo"
         ("security-memo.memo" . 2))
	("game"
	 ("zdnet.gamespot" . last)
	 ("impress.game" . last))
	("w3m"
	 ("w3m-dev.w3m-dev" . last)
	 ("namazu.emacs-w3m" . last))
	("impress"
	 ("impress.internet" . last)
	 ("impress.pc" . last)
	 ("impress.akiba" . last))
        ("comp"
         ("cnet.comp" . last)
         ("zdnet.comp" . last)
         ("wired.technology" . last))
;;        ("slashdot-jp"
;;         ("slashdot-jp.story" . last))
;;        ("hns/arisawa"                ;; +shimbun/hns/arisawa, +shimbun/hns/miyoshi
;;         ("hns.arisawa" . last))      ;; にそれぞれの日記を取得します。
;;        ("hns/miyoshi"
;;         ("hns.miyoshi" . last))
	))

(C)Copyright 2002 by Sian <sian@big.or.jp>
Last modified: Thu Feb 26 23:03:15 JST 2004