Part of the problem is that when the driver was written they left out a
MAJOR piece of code to handle copying mailmessages between DIFFERENT
mailbox formats :)... to add that in take a look at any of the other
mailbox routines in their MAILBOXTYPE_copy routine and see that they
call mailproxycopy first and then do some extra things... (It has been
a long time since I fixed this... so I don't know if you need to change
any other code but the maildir_copy)... this is what my maildir_copy
looks like now... Notice that if we get an EINVAL mailbox we try
to use mailproxycopy instead.
laters,
-d.
long maildir_copy (MAILSTREAM *stream,char *sequence,char *mailbox,long
options)
{
STRING st;
MESSAGECACHE *elt;
struct stat sbuf;
int fd;
long i;
char *s,tmp[MAILTMPLEN];
mailproxycopy_t pc =
(mailproxycopy_t) mail_parameters (stream,GET_MAILPROXYCOPY,NIL);
/* make sure valid mailbox */
if (!maildir_isvalid (mailbox,NIL)) switch (errno) {
case ENOENT: /* no such file? */
mm_notify (stream,"[TRYCREATE] Must create mailbox before copy",NIL);
return NIL;
case EINVAL:
if (pc) return (*pc) (stream,sequence,mailbox,options);
sprintf (LOCAL->buf,"Invalid Maildir-format mailbox name:
%.80s",mailbox);
mm_log (LOCAL->buf,ERROR);
return NIL;
default:
if (pc) return (*pc) (stream,sequence,mailbox,options);
sprintf (LOCAL->buf,"Not a Maildir-format mailbox: %.80s",mailbox);
mm_log (LOCAL->buf,ERROR);
return NIL;
}
...
...
...
On 4 Jun 1999, Todd at NM Technet wrote:
> dave, all,
>
> i asked a very similar set of questions recently on this list.
>
> the result: the maildir driver for the UW imap server is very
> rudimentary. it works extremely well for inboxes, but not well for any
> other folders. i have patched it a bit to handle creating new maildirs
> correclty and copying between the inbox and other folders, but it doesn't
> handle other folders very elegantly yet.
>
> other people have had much better luck with cyrus for imap. until mark
> crispin actually ingtegrates maildir support, this sort of thing is likely
> to be a problem.
>
> todd underwood
> [EMAIL PROTECTED]
>
> On Fri, 4 Jun 1999, Dave Teske wrote:
>
> > Date: Fri, 04 Jun 1999 12:12:12 -0400
> > From: Dave Teske <[EMAIL PROTECTED]>
> > To: [EMAIL PROTECTED]
> > Subject: Getting Maildir + IMAP working
> >
> > Has anyone got this fully working? Here's my story. Qmail 1.03, the patched
> > WU IMAP server running both POP and IMAP daemons. POP's working fine and
> > for the most part so is IMAP. IMAP works great if the users mail box is in
> > Mailbox format. However if the user is setup for Maildir delivery I seem to
> > lose the ability to copy from the "Inbox" to another message folder. The
> > directory structure is
> >
> > /home/user/
> > /Maildir
> > /cur & tmp & new
> > /Mail
> > /Folder1 (well it's actually a file like Mailbox)
> >
> >
> > I've tried a couple of windows clients (eudora, outlook express) and they
> > work fine except when trying to copy from "Inbox" to "Folder1". They fail
> > with the message "/home/user/Mail/Folder1 is not a valid Maildir." Thinking
> > the clients were at fault I tested it manually via telneting into the imap
> > server and i get the same error(s). I've tried both the IMAP COPY and UID
> > COPY commands. The really strange thing is that I can copy between the
> > Mail/Folders with no problems.
> >
> > BTW Pegasus actually works with this but they do an APPEND and then a
> > DELETE. Unfortunately it doesn't have a "Purge Deleted Messages" command
> > like the other 2 so the deleted mail stays in the folders.
> >
> > I'd really like to get this resolved so I can move all my users into
> > Maildir format but until this is resolved I can't.
> >
> > Any ideas what's going on
> >
> > Thanks
> > --Dave Teske
> >
> >
>
>
+-----------------------------------------------------------------------+
| David Galbraith dgalb@ University Of New Mexico |
| Systems Analyst unm.edu (505)-277-8499 |
+-----------------------------------------------------------------------+