2008年12月31日水曜日

【IMAP】ACLでIMAP

ACLのIMAPインターフェイスでIMAPを操作してみる。

CL-USER(2): (require :imap)
; Fast loading /Applications/AllegroCL64/code/IMAP.fasl
T
CL-USER(3): (require :smtp)
; Fast loading /Applications/AllegroCL64/code/SMTP.fasl
; Fast loading from bundle code/streamp.fasl.
; Fast loading /Applications/AllegroCL64/code/SASL.fasl
; Fast loading /Applications/AllegroCL64/code/OSI.fasl
; Fast loading from bundle code/fileutil.fasl.
;; Autoloading locale from #P"/Applications/AllegroCL64/locales/en_US"
; Autoloading for package "REGEXP":
; Fast loading from bundle code/regexp2-s.fasl.
;;; Installing regexp2-s patch, version 1.
; Autoloading for REGEXP::MAKE-VM-CLOSURE:
; Fast loading /Applications/AllegroCL64/code/regexp2.fasl
; Fast loading /Applications/AllegroCL64/code/YACC.fasl
; Fast loading from bundle code/rc4.fasl.
; Fast loading from bundle code/hmac.fasl.
; Fast loading from bundle code/sha1.fasl.
; Fast loading from bundle code/iodefs.fasl.
; Fast loading from bundle code/iordefs.fasl.
; Fast loading from bundle code/efmacs.fasl.
; Fast loading /Applications/AllegroCL64/code/MIME.fasl
;;; Installing mime patch, version 1.
T
CL-USER(4): (require :mime)
NIL
CL-USER(5): (require :rfc2822)
; Fast loading /Applications/AllegroCL64/code/RFC2822.fasl
;;; Installing rfc2822 patch, version 1.
; Fast loading from bundle code/acldns.fasl.
T
CL-USER(6): (use-package :net.post-office)
T
CL-USER(7): (setq mb (make-imap-connection "mail.mac.com"
:user "xxxxxxxxxxxxxx"
:password "yyyyyyyyyyyyyyyy"))
#
CL-USER(8): (select-mailbox mb "inbox")
T
CL-USER(9): (mailbox-message-count mb)
3
CL-USER(10): (setq body (fetch-parts mb 3 "body[]"))
((3
("FLAGS" (:\\SEEN :$NOTJUNK) "BODY[]" "Return-path:
Received: from smtpin135-bge351000 ([10.150.68.135])
by ms183.mac.com (Sun Java(tm) System Messaging Server 6.3-7.04 (built Sep 26
2008; 64bit)) with ESMTP id <0KCQ00CDK3UWUR10@ms183.mac.com> for
xxxxxxxxxxxxxx@me.com; Tue, 30 Dec 2008 20:16:08 -0800 (PST)
Original-recipient: rfc822;xxxxxxxxxxxxxx@me.com
Received: from rv-out-0506.google.com ([209.85.198.225])
by smtpin135.mac.com (Sun Java(tm) System Messaging Server 6.3-7.03 (built Aug
4 2008; 32bit)) with ESMTP id <0KCQ00KWA3U3H4E0@smtpin135.mac.com> for
xxxxxxxxxxxxxx@me.com (ORCPT xxxxxxxxxxxxxx@me.com); Tue,
30 Dec 2008 20:16:08 -0800 (PST)
X-Brightmail-Tracker: AAAAAgAAAUAAAAFU
Received: by rv-out-0506.google.com with SMTP id k40so5315646rvb.17 for
; Tue, 30 Dec 2008 20:16:08 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com;
s=gamma; h=domainkey-signature:received:received:message-id:date:from:to
:subject:mime-version:content-type;
bh=8dDsdMj/vZZL9PRpkSNUfojFFW/h1Az3Jku6kEgINls=;
b=Kpw6QRPqms9P52jKWlx3hohMEr/pfb49GuZ/TcQaWILOKy7bxWqbwkJMvPvCf+/Fjp
NIa4osARbT3Sw+b1VE3VK2Pl2Vk9bXCdz1UKewUFJigncGZgOnTWaD5BYyL1D53BZsub
jdAjlSdfea4xpkzCWGYHs2i7hN8bnUW/Locto=
DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma;
h=message-id:date:from:to:subject:mime-version:content-type;
b=LD5L76x33I1n41sNffoiQpeUCDB81Vp43e1NOmXTkLBOnJ+nmUO+FENEWbfJIE9xW5
HBuImoVxID1gtO68rTyr3Xez3n7AgRHR42CWIeCSUq1Iyz7bOzEvPWEq/YsIYy+8XJvT
J7rE/TgLjgQsC6tHayK7X/3PZ87ZLav8ECY/E=
Received: by 10.141.45.16 with SMTP id x16mr7619679rvj.7.1230696967987; Tue,
30 Dec 2008 20:16:07 -0800 (PST)
Received: by 10.141.115.4 with HTTP; Tue, 30 Dec 2008 20:16:07 -0800 (PST)
Message-id:
Date: Wed, 31 Dec 2008 13:16:07 +0900
From: aka
To: xxxxxxxxxxxxxx@me.com
Subject: =?ISO-2022-JP?B?GyRCRnxLXDhsJE43b0w+GyhC?=
MIME-version: 1.0
Content-type: multipart/alternative;
boundary=\"----=_Part_162342_20660604.1230696967980\"

------=_Part_162342_20660604.1230696967980
Content-Type: text/plain; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

$BF|K\\8l$NK\\J8$G$9!#(B
$B$I$&8+$($k$N$+$J(B?

------=_Part_162342_20660604.1230696967980
Content-Type: text/html; charset=ISO-2022-JP
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

$BF|K\\8l$NK\\J8$G$9!#(B
$B$I$&8+$($k$N$+$J(B?


------=_Part_162342_20660604.1230696967980--
")))
CL-USER(11): (search-mailbox mb '(:text "test"))
(1 2 3)
CL-USER(12): (search-mailbox mb '(:text "日本語"))
NIL
CL-USER(13): (close-connection mb)
T
CL-USER(14):

おお、普通に動く。
しかし、なんとACLのMIMEインターフェイスは、object -> multipart変換機能はあるが、multipart -> object変換機能がまだ未実装のようだ。なんじゃいな。CL-MIMEのお世話になるのかな。

0 件のコメント: