2013年1月7日

Creating an SSL/TLS connection...(Ubuntu 12.04 + Mew6.3)

Xubuntu 12.04 LTS の Mew で、 i して接続しようとしたら、

===
Creating an SSL/TLS connection...
===

でフリーズしてしまった。結局、

===
~ $ sudo cp /usr/share/doc/stunnel4/examples/stunnel.conf-sample /etc/stunnel/stunnel.conf
===

[~/.init.el]
===
(autoload 'mew "mew" nil t)
(autoload 'mew-send "mew" nil t)
===


[~/.mew.el]
===
(setq mew-prog-ssl "/usr/bin/stunnel4")

(setq mew-proto "%")
(setq mew-user "メールアドレス@Gmail.com")
(setq mew-mail-domain "gmail.com")

(setq mew-imap-server "imap.gmail.com")
(setq mew-imap-user "メールアドレス@gmail.com")
(setq mew-imap-auth t)
(setq mew-imap-ssl t)
(setq mew-imap-ssl-port "993")
(setq mew-smtp-auth t)
(setq mew-smtp-ssl t)
(setq mew-smtp-ssl-port "465")
(setq mew-smtp-user "メールアドレス@gmail.com")
(setq mew-smtp-server "smtp.gmail.com")
===

とすれば良い事が分かったけど、 debian や cygswin と違ったから、最初分
からなかった。


以下、格闘ログ

==================================================

===
~ $ cd app/
~/app $ git clone git://github.com/kazu-yamamoto/Mew.git
===

として、

[~/.init.el]
===
(setq mew-dir (expand-file-name "~/app/Mew"))
(add-to-list 'load-path mew-dir)
(autoload 'mew "mew" nil t)
(autoload 'mew-send "mew" nil t)
===

[~/.mew.el]
===
(setq mew-icon-directory (concat mew-dir "/etc"))
(setq mew-prog-mewl (concat mew-dir "/bin/mewl"))
(setq mew-prog-mime-encode (concat mew-dir "/bin/mewencode"))
(setq mew-prog-mime-decode (concat mew-dir "/bin/mewencode"))
(setq mew-mbox-command (concat mew-dir "/bin/incm"))

(setq mew-proto "%")
(setq mew-user "メールアドレス@Gmail.com")
(setq mew-mail-domain "gmail.com")

(setq mew-imap-server "imap.gmail.com")
(setq mew-imap-user "メールアドレス@gmail.com")
(setq mew-imap-auth t)
(setq mew-imap-ssl t)
(setq mew-imap-ssl-port "993")
(setq mew-smtp-auth t)
(setq mew-smtp-ssl t)
(setq mew-smtp-ssl-port "465")
(setq mew-smtp-user "メールアドレス@gmail.com")
(setq mew-smtp-server "smtp.gmail.com")
===

としたが、解決せず、

[init.el] に以下を追記したけど

===
(setq mew-ssl-ver 4
mew-ssl-minor-ver 53)
===

解決せず、

===
~ $ stunnel --version
===

したら、 4.42 だと言いやがるので、

===
(setq mew-ssl-ver 4
mew-ssl-minor-ver 42)
===

としたけど、解決せず、まさかとおもって、確認したら

===
~ $ ls /etc/stunnel/
README
===

ってなってて、うわーっと思い、

===
~ $ cat README
Stunnel 4 configuration files.

Files found under the /etc/stunnel directory that end with .conf are
used by the stunnel4 service as configuration files, and each will be
used to start a daemon process setting up a tunnel with the given
configuration. Note that this directory is initially empty, as the
settings you may want for your tunnels are completely system dependent.

In order to have the tunnels start up automatically on system boot you
must *also* set ENABLED to 1 in /etc/default/stunnel4

A sample configuration file with defaults may be found at
/usr/share/doc/stunnel4/examples/stunnel.conf-sample
===

とか書いてあるから、やってみたら、

===
~ $ cp /usr/share/doc/stunnel4/examples/stunnel.conf-sample /etc/stunnel/stunnel.conf
cp: 通常ファイル `/etc/stunnel/stunnel.conf' を作成できません: 許可がありません
===

と怒られ、

===
~ $ sudo cp /usr/share/doc/stunnel4/examples/stunnel.conf-sample /etc/stunnel/stunnel.conf
===

として、やれやれっとおもったけど、解決せず、念のため、

===
~ $ aptitude show ca-certificates
===

とかも確認して、 [.mew.el] に以下を付記したら、つながるようになった。

===
(setq mew-prog-ssl "/usr/bin/stunnel4")
===

0 件のコメント:

コメントを投稿