| | 1 | = Gentoo で CourierIMAP = |
| | 2 | [[PageOutline]] |
| | 3 | |
| | 4 | {{{ |
| | 5 | # emerge courier-imap |
| | 6 | # vim /etc/courier-imap/imapd |
| | 7 | IMAP_CAPABILITY に AUTH=CRAM-MD5 と AUTH=CRAM-SHA1 を加える |
| | 8 | |
| | 9 | # vim /etc/courier-imap/imapd-ssl |
| | 10 | IMAPDSSLSTART=YES |
| | 11 | IMAPDSTARTTLS=YES |
| | 12 | IMAP_TLS_REQUIRED=1 |
| | 13 | |
| | 14 | # vim /etc/courier-imap/imapd.cnf |
| | 15 | C=JP |
| | 16 | CN=emilia |
| | 17 | emailAddress=atzm@emilia |
| | 18 | |
| | 19 | # mkimapdcert |
| | 20 | |
| | 21 | # userdb atzm set home=/home/atzm mail=/home/atzm/Maildir uid=9801 gid=2000 |
| | 22 | # userdbpw -hmac-md5 | userdb atzm set imap-hmac-md5pw |
| | 23 | # makeuserdb |
| | 24 | |
| | 25 | # /etc/init.d/courier-imapd-ssl start |
| | 26 | }}} |
| | 27 | |
| | 28 | == MH のメールを Maildir に変更 == |
| | 29 | CourierIMAP では Maildir 形式のメールしか扱えない.MH を使いたい場合は [http://www.washington.edu/imap/ uw-imap] が良いやも. |
| | 30 | |
| | 31 | 参考:[http://www.koka-in.org/~bg66/blog/2003/11/06/20.html MH形式のメールをMaildir形式に変換] |
| | 32 | |
| | 33 | {{{ |
| | 34 | $ sudo emerge nmh |
| | 35 | $ install-mh |
| | 36 | // ここで ~/.mh_profile の Path が旧 MH のディレクトリになるように |
| | 37 | |
| | 38 | $ mkdir ~/mbox |
| | 39 | $ cd ~/Mail |
| | 40 | $ ls | xargs -i packf "+{}" -file ~/mbox/"{}" -mbox |
| | 41 | |
| | 42 | $ cd |
| | 43 | $ wget http://untroubled.org/mbox2maildir |
| | 44 | $ chmod +x mbox2maildir |
| | 45 | $ cd ~/mbox |
| | 46 | $ ls | xargs -i ~/mbox2maildir "{}" ~/Maildir/."{}" |
| | 47 | |
| | 48 | $ cd ~/Maildir |
| | 49 | $ \ls -a | while read line; do ln -s $line `echo $line | perl -pe 's:\.+|cur|new|tmp::'`; done |
| | 50 | // Wanderlust から直接見られるように |
| | 51 | |
| | 52 | $ \ls | while read line |
| | 53 | do |
| | 54 | TMP="`echo $line | perl -pe 's:tmp|cur|new|courierimap.*::'`" |
| | 55 | [ -n "$TMP" ] && echo inbox.$TMP |
| | 56 | done > courierimapsubscribed |
| | 57 | // courier-imap にフォルダ登録 |
| | 58 | }}} |