Fwd: cl-postoffice

Knut Olav Bøhmer <[email protected]> Wed, 30 Mar 2005 10:39:10 +0200
Newsgroups gmane.lisp.open-source.franz
Message-ID <[email protected]>
------=_Part_36_20783274.1112171950692
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

Hi,

I have been hacking a little bit on the postoffice package, and to
make it work on the courier-imap server on debian, I had to add something t=
o
the imap.lisp file.

The problem is that the po-condition which (as far as I understand) is
not suppose to break the program flow, sometimes does.

When I tried mail from the top level repl, it actually (looks like it)
work without the patch, but from a function inside aserve it did not.

So sometimes during handle-untagged-response, it signals a
po-condition which brakes the program flow, an does not read the last
line from the server which is the tagged response. The next time you
send a command, send-command-get-results will read the tagged response
from the previous command, and give you the error "received tag ~s out
of order".


--=20
Knut Olav B=F8hmer

------=_Part_36_20783274.1112171950692
Content-Type: text/x-patch; name=imap.lisp.patch; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="imap.lisp.patch"

--- imap.lisp.orig	2005-03-28 22:04:25.000000000 +0200
+++ imap.lisp	2005-03-28 22:04:29.000000000 +0200
@@ -109,7 +109,10 @@
    (first-unseen   ; number of the first unseen message
     :accessor first-unseen
     :initform 0)
-   
+
+   (myrights
+    :accessor mailbox-myrights
+    :initform nil)
    ;;; end list of values for the currently selected mailbox
    )
   )
@@ -440,16 +443,18 @@
      (po-condition :problem :server-string comment))
     (:ok ; a whole variety of things
      (if* extra
-	then (if* (equalp (car extra) "unseen")
-		then (setf (first-unseen mb) (cadr extra))
-	      elseif (equalp (car extra) "uidvalidity")
-		then (setf (mailbox-uidvalidity mb) (cadr extra))
-	      elseif (equalp (car extra) "uidnext")
-		then (setf (mailbox-uidnext mb) (cadr extra))
-	      elseif (equalp (car extra) "permanentflags")
-		then (setf (mailbox-permanent-flags mb) 
-		       (mapcar #'kwd-intern (cadr extra)))
-		else (po-condition :unknown-ok :server-string comment))))
+	  then (if* (equalp (car extra) "unseen")
+		    then (setf (first-unseen mb) (cadr extra))
+		    elseif (equalp (car extra) "uidvalidity")
+		    then (setf (mailbox-uidvalidity mb) (cadr extra))
+		    elseif (equalp (car extra) "myrights")
+		    then (setf (mailbox-myrights mb) (cadr extra))
+		    elseif (equalp (car extra) "uidnext")
+		    then (setf (mailbox-uidnext mb) (cadr extra))
+		    elseif (equalp (car extra) "permanentflags")
+		    then (setf (mailbox-permanent-flags mb) 
+			       (mapcar #'kwd-intern (cadr extra)))
+		    else (po-condition :unknown-ok :server-string comment))))
     (t (po-condition :unknown-untagged :server-string comment)))
 	     
   )



------=_Part_36_20783274.1112171950692--