home «前の日記(2007-12-26) 最新 次の日記(2008-01-01)»

いろいろ
Seize the day.

2004|10|11|12|
2005|01|02|03|04|05|06|07|08|09|10|11|12|
2006|01|02|03|04|05|06|07|08|09|10|11|12|
2007|01|02|03|04|05|06|07|08|09|10|11|12|
2008|01|02|03|04|05|07|

2007-12-28 [長年日記]

[comp] Mew 3.3 + stunnel

というわけで [2007-12-03],正月休みを待たずに早速入れてみた.何も考えずに make && make install でおk.
mew.el もそのまま使えている.いい感じだ.

stunnel に関しては,
(setq mew-smtp-ssl t)
(setq mew-ssl-cert-directory "/usr/local/etc/stunnel/")
(setq mew-prog-ssl "/usr/local/sbin/stunnel")
(setq mew-smtp-user "username")
(setq mew-smtp-server "smtp.example.org")
(setq mew-smtp-ssl-port "465")
(setq mew-ssl-verify-level 0)
(setq mew-ssl-verify-version 0) 
みたいな感じでうまくいった.Mew 自身から stunnel で直接叩けるのは確かにありがたい.
ちなみに mew-ssl-verify-level と mew-ssl-verify-version を 0 にしないと,なぜか
(Cannot create to the SSL connection)
が出るほか,*Mew Debug* でも
VERIFY ERROR
が出てうまく接続できなかったので注意.

あと,mhc が mew-3.3 で廃止された関数 mew-match を使ってるせいでエラー吐いた.ので,やっつけで以下のように修正してみた (最新版を取って来れば済む話だけど,最新版の使い勝手があまり好きではないので).なぜかバイトコンパイルしたらエラーが出るので,そのまま使う.
--- mhc-mew.el.orig     Mon Feb 18 19:46:44 2002
+++ mhc-mew.el  Wed Dec 26 21:20:13 2007
@@ -50,6 +50,9 @@
   (add-hook 'mew-virtual-mode-hook 'mhc-mode)
   (add-hook 'mew-quit-hook 'mhc-exit))
 
+(if (fboundp 'mew-match)
+    (defalias 'mhc-mew/match-string 'mew-match)
+  (defalias 'mhc-mew/match-string 'match-string))
 
 ;; Backend methods:
 
@@ -260,7 +263,8 @@
     (when (and ct (string-match "^multipart/" ct)
               (or (string-match "boundary=\"\\([^\"]+\\)\"" ct)
                   (string-match "boundary=\\(.+\\)" ct)))
-      (setq boundary (regexp-quote (mew-match 1 ct)))
+;      (setq boundary (regexp-quote (mew-match 1 ct)))
+      (setq boundary (regexp-quote (mhc-mew/match-string 1 ct)))
       (let ((case-fold-search nil))
        (unless (and boundary
                     (re-search-forward (concat "^--" boundary "$") nil t)
@@ -365,9 +369,12 @@
        (setq tmpstr (substring string (match-end 0)))
        (setq ret (concat ret
                          (substring string 0 (match-beginning 0))
-                         (mew-header-decode (mew-match 1 string)
-                                            (mew-match 2 string)
-                                            (mew-match 3 string))))
+;                        (mew-header-decode (mew-match 1 string)
+;                                           (mew-match 2 string)
+;                                           (mew-match 3 string))))
+                          (mew-header-decode (mhc-mew/match-string 1 string)
+                                             (mhc-mew/match-string 2 string)
+                                             (mhc-mew/match-string 3 string))))
        (setq string tmpstr)))
     ret))
 


関連記事:
このエントリーをはてなブックマークに追加 はてなブックマーク数 はてなブックマークコメント   このエントリーを livedoor クリップに追加 livedoor クリップ数 このエントリーを del.ici.ous に追加 このエントリーを buzzurl に追加 buzzurl クリップ数

お名前:
E-mail:
コメント:
[TrackBack URL: http://nao.s164.xrea.com/td/tb.rb/20071228]
[(注) スパム対策のため,言及リンクのないトラックバックは受け付けていません.]

以下の広告はサーバによって自動的に挿入されています.


Copyright © 2004-2006, nao. All rights reserved.