According to RFC3501 (and RFC2060), if a COPY command specifies a
destination mailbox which does not exist, the NO response text "MUST" be
prefixed by [TRYCREATE].  (RFC3501, Page 59).

I'm using bincimap version 1.2.0b1 (downloaded from Debian).  This does not
appear to exhibit this behaviour.  This is causing "imapfilter", an imap
filtering program, to fail to try to create folders if they are not already
present when copying.

The attached patch fixes bincimap to bring it into compliance with RFC3501.
With the patch applied, "imapfilter" tries to create folders as expected.


I installed bincimap today, and other than this small problem I have been
extremely pleased with its performance.  I'm also pleased that the code was
so clean, that I was able to find the cause of the one problem I
experienced so far within half an hour - including looking up the correct
behaviour in the RFC.  Keep up the good work!

-- 
Richard

--- src/operator-copy.cc.orig   2003-09-01 21:42:17.000000000 +0100
+++ src/operator-copy.cc        2003-09-01 21:31:56.000000000 +0100
@@ -84,7 +84,7 @@
   string dmailbox = command.getMailbox();
   Mailbox *destMailbox = depot.get(dmailbox);
   if (destMailbox == 0) {
-    session.setLastError("invalid mailbox " + toImapString(dmailbox));
+    session.setLastError("[TRYCREATE] invalid mailbox " + toImapString(dmailbox));
     return NO;
   }
 

Reply via email to