Harry Saal | 7 Jan 03:06 2008

can't move/copy messages into INBOX with imap-2007

I just rebuilt my UW IMAP mailserver on a Fedora Core 8 system. I am 
using Thunderbird 2.0.0.9 as a client.

I receive mail into my INBOX , can read it, delete it, etc. But I can 
not MOVE or COPY a message from some other folder into my INBOX. This 
used to work using imap-2004d but no longer does. The error message is 
"[TRYCREATE] UID COPY failed: No such destination mailbox." The mailbox 
does exist, e.g. as /var/spool/mail/harry, owner is harry:mail, 
permissions are 660. I even tried permissions of 666 but this did not 
solve the problem.

I've spent hours researching this, but am at a loss as to how to 
proceed. Any suggestions?
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Mark Crispin | 7 Jan 04:25 2008

Re: can't move/copy messages into INBOX with imap-2007

I verified that COPY to traditional UNIX mailbox format INBOX works on my 
system.  Furthermore, a TRYCREATE should *never* happen with INBOX.  This 
suggests that the destination mailbox name is something other than INBOX.

Can you get a protocol telemetry log from your client?  There should be 
a warning message prior to the command reading:
 	* OK [TRYCREATE] Must create mailbox before copy
Do you see that?

What IMAP command is immediately before the COPY?  It should be something 
like
 	abc123 UID COPY ##### INBOX
where "abc123" is some arbitrary text and ##### is a number.  What is 
after the number?  Is it INBOX?

Is your copy of imap-2007 the original, unmodified version from UW?  If 
not, please try the original, unmodified version:
 	ftp://ftp.cac.washington.edu/mail/imap.tar.Z

Do you have an /etc/c-client.cf file on your system?  If so, what are its 
contents; and if you did not create that file and have no notion of why it 
is there or what it does, try deleting it.

On Sun, 6 Jan 2008, Harry Saal wrote:
> I just rebuilt my UW IMAP mailserver on a Fedora Core 8 system. I am using 
> Thunderbird 2.0.0.9 as a client.
>
> I receive mail into my INBOX , can read it, delete it, etc. But I can not 
> MOVE or COPY a message from some other folder into my INBOX. This used to 
> work using imap-2004d but no longer does. The error message is "[TRYCREATE] 
(Continue reading)

Rex Dieter | 7 Jan 04:25 2008

Re: can't move/copy messages into INBOX with imap-2007

Harry Saal wrote:

> I just rebuilt my UW IMAP mailserver on a Fedora Core 8 system. I am
> using Thunderbird 2.0.0.9 as a client.
> 
> I receive mail into my INBOX , can read it, delete it, etc. But I can
> not MOVE or COPY a message from some other folder into my INBOX. This
> used to work using imap-2004d but no longer does. The error message is
> "[TRYCREATE] UID COPY failed: No such destination mailbox." The mailbox
> does exist, e.g. as /var/spool/mail/harry, owner is harry:mail,
> permissions are 660. I even tried permissions of 666 but this did not
> solve the problem.
> 
> I've spent hours researching this, but am at a loss as to how to
> proceed. Any suggestions?

worksforme, but I have a INBOX in my home directory, you can too, by doing
something like:
$ mailutil create '#driver.mix/INBOX'
(mailutil is part of uw-imap-utils on fedora).

-- Rex

_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Harry Saal | 7 Jan 05:14 2008

Re: can't move/copy messages into INBOX with imap-2007

Thanks for the attempt to sort this out.

Here is the sequence of IMAP messages (from Wireshark) when I tried to copy a message from a Draft folder to Inbox.

* 1 FETCH (UID 4 FLAGS (\Draft))..370 OK UID FETCH completed..
371 IDLE
+ Waiting for DONE..
DONE..
371 OK IDLE completed
373 uid copy 4 "INBOX"
* OK [TRYCREATE] Must create mailbox before copy
373 NO [TRYCREATE] UID COPY failed: No such destination mailbox

I don't think I have a "traditional UNIX mailbox", e.g. my INBOX mail is kept (and left) in /var/spool/mail/harry

I downloaded and built from UW source. I changed only line in env_unix.c, namely to
static char *mailsubdir = ".imapmail"  /* stores all mail folders under /home/username/.imapmail */

I built using make lnp SSLTYPE=none. Here is my /etc/c-client.cf file:

I accept the risk
set allow-user-config T
# set new-folder-format mx
# set empty-folder-format mx

This looks right to me.

Thanks in advance for any advice, Mark.

Mark Crispin wrote:
I verified that COPY to traditional UNIX mailbox format INBOX works on my system.  Furthermore, a TRYCREATE should *never* happen with INBOX.  This suggests that the destination mailbox name is something other than INBOX.

Can you get a protocol telemetry log from your client?  There should be a warning message prior to the command reading:
    * OK [TRYCREATE] Must create mailbox before copy
Do you see that?

What IMAP command is immediately before the COPY?  It should be something like
    abc123 UID COPY ##### INBOX
where "abc123" is some arbitrary text and ##### is a number.  What is after the number?  Is it INBOX?

Is your copy of imap-2007 the original, unmodified version from UW?  If not, please try the original, unmodified version:
    ftp://ftp.cac.washington.edu/mail/imap.tar.Z

Do you have an /etc/c-client.cf file on your system?  If so, what are its contents; and if you did not create that file and have no notion of why it is there or what it does, try deleting it.

On Sun, 6 Jan 2008, Harry Saal wrote:
I just rebuilt my UW IMAP mailserver on a Fedora Core 8 system. I am using Thunderbird 2.0.0.9 as a client.

I receive mail into my INBOX , can read it, delete it, etc. But I can not MOVE or COPY a message from some other folder into my INBOX. This used to work using imap-2004d but no longer does. The error message is "[TRYCREATE] UID COPY failed: No such destination mailbox." The mailbox does exist, e.g. as /var/spool/mail/harry, owner is harry:mail, permissions are 660. I even tried permissions of 666 but this did not solve the problem.

I've spent hours researching this, but am at a loss as to how to proceed. Any suggestions?
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw


-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.

-- ================================================================= Dr. Harry J. Saal, Member, Technical Committee Harry <at> TheTC.org http://www.thetc.org/ Voice: 650-331-3110 FAX: 650-429-2089 =================================================================
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw
Mark Crispin | 7 Jan 05:44 2008

Re: can't move/copy messages into INBOX with imap-2007

You didn't mention it, but it looks like the selected mailbox is in the 
unsupported mx format.  There is a bug in the driver for that format when 
copying to INBOX in a different format (and yes, a /var/spool/mail file is 
a "traditional UNIX mailbox").

The following patch to imap-2007/src/osdep/unix will fix it:

--------------------------------------------------------------------------------
*** unix/mx.c	2007/10/11 21:12:01	1.28
--- unix/mx.c	2008/01/07 04:37:15
***************
*** 183,188 ****
--- 183,189 ----
   	((sbuf.st_mode & S_IFMT) == S_IFREG)) return T;
       errno = NIL;		/* directory but not mx */
     }
+   else if (!compare_cstring (name,"INBOX")) errno = NIL;
     return NIL;
   }
--------------------------------------------------------------------------------

I must emphasize that mx is UNSUPPORTED and NOT RECOMMENDED.  It was an 
experiment nearly 12 years ago that proved to a complete failure.  There 
are numerous known bugs in mx format.  The only reason why mx support has 
not been removed is to allow existing mx format mailboxes to continue to 
work.

mix is the current recommended alternative mailbox format.

You should just delete your /etc/c-client.cf file entirely.

On Sun, 6 Jan 2008, Harry Saal wrote:
> Thanks for the attempt to sort this out.
>
> Here is the sequence of IMAP messages (from Wireshark) when I tried to copy a 
> message from a Draft folder to Inbox.
>
> * 1 FETCH (UID 4 FLAGS (\Draft))..370 OK UID FETCH completed..
> 371 IDLE
> + Waiting for DONE..
> DONE..
> 371 OK IDLE completed
> 373 uid copy 4 "INBOX"
> * OK [TRYCREATE] Must create mailbox before copy
> 373 NO [TRYCREATE] UID COPY failed: No such destination mailbox
>
> I don't think I have a "traditional UNIX mailbox", e.g. my INBOX mail is kept 
> (and left) in /var/spool/mail/harry
>
> I downloaded and built from UW source. I changed only line in env_unix.c, 
> namely to
> static char *mailsubdir = ".imapmail"  /* stores all mail folders under 
> /home/username/.imapmail */
>
> I built using make lnp SSLTYPE=none. Here is my /etc/c-client.cf file:
>
> I accept the risk
> set allow-user-config T
> # set new-folder-format mx
> # set empty-folder-format mx
>
> This looks right to me.
>
> Thanks in advance for any advice, Mark.
>
> Mark Crispin wrote:
>> I verified that COPY to traditional UNIX mailbox format INBOX works on my 
>> system.  Furthermore, a TRYCREATE should *never* happen with INBOX.  This 
>> suggests that the destination mailbox name is something other than INBOX.
>> 
>> Can you get a protocol telemetry log from your client?  There should be a 
>> warning message prior to the command reading:
>>     * OK [TRYCREATE] Must create mailbox before copy
>> Do you see that?
>> 
>> What IMAP command is immediately before the COPY?  It should be something 
>> like
>>     abc123 UID COPY ##### INBOX
>> where "abc123" is some arbitrary text and ##### is a number.  What is after 
>> the number?  Is it INBOX?
>> 
>> Is your copy of imap-2007 the original, unmodified version from UW?  If 
>> not, please try the original, unmodified version:
>>     ftp://ftp.cac.washington.edu/mail/imap.tar.Z
>> 
>> Do you have an /etc/c-client.cf file on your system?  If so, what are its 
>> contents; and if you did not create that file and have no notion of why it 
>> is there or what it does, try deleting it.
>> 
>> On Sun, 6 Jan 2008, Harry Saal wrote:
>>> I just rebuilt my UW IMAP mailserver on a Fedora Core 8 system. I am using 
>>> Thunderbird 2.0.0.9 as a client.
>>> 
>>> I receive mail into my INBOX , can read it, delete it, etc. But I can not 
>>> MOVE or COPY a message from some other folder into my INBOX. This used to 
>>> work using imap-2004d but no longer does. The error message is 
>>> "[TRYCREATE] UID COPY failed: No such destination mailbox." The mailbox 
>>> does exist, e.g. as /var/spool/mail/harry, owner is harry:mail, 
>>> permissions are 660. I even tried permissions of 666 but this did not 
>>> solve the problem.
>>> 
>>> I've spent hours researching this, but am at a loss as to how to proceed. 
>>> Any suggestions?
>>> _______________________________________________
>>> Imap-uw mailing list
>>> Imap-uw <at> u.washington.edu
>>> https://mailman1.u.washington.edu/mailman/listinfo/imap-uw
>>> 
>> 
>> -- Mark --
>> 
>> http://panda.com/mrc
>> Democracy is two wolves and a sheep deciding what to eat for lunch.
>> Liberty is a well-armed sheep contesting the vote.
>
> -- 
> =================================================================
> Dr. Harry J. Saal, Member, Technical Committee
>   Harry <at> TheTC.org      http://www.thetc.org/
> Voice: 650-331-3110      FAX: 650-429-2089
> =================================================================
>
>

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Harry Saal | 7 Jan 06:15 2008

Re: can't move/copy messages into INBOX with imap-2007

Problem fixed! I applied your patch and rebuilt the system. The problem is resolved! I can't thank you enough, Mark.

And I promise to look into converting from mx to mix. Do you have any suggested articles or posts that I can read on making the transition?

Mark Crispin wrote:
You didn't mention it, but it looks like the selected mailbox is in the unsupported mx format.  There is a bug in the driver for that format when copying to INBOX in a different format (and yes, a /var/spool/mail file is a "traditional UNIX mailbox").

The following patch to imap-2007/src/osdep/unix will fix it:

--------------------------------------------------------------------------------
*** unix/mx.c    2007/10/11 21:12:01    1.28
--- unix/mx.c    2008/01/07 04:37:15
***************
*** 183,188 ****
--- 183,189 ----
      ((sbuf.st_mode & S_IFMT) == S_IFREG)) return T;
      errno = NIL;        /* directory but not mx */
    }
+   else if (!compare_cstring (name,"INBOX")) errno = NIL;
    return NIL;
  }
--------------------------------------------------------------------------------

I must emphasize that mx is UNSUPPORTED and NOT RECOMMENDED.  It was an experiment nearly 12 years ago that proved to a complete failure.  There are numerous known bugs in mx format.  The only reason why mx support has not been removed is to allow existing mx format mailboxes to continue to work.

mix is the current recommended alternative mailbox format.

You should just delete your /etc/c-client.cf file entirely.

On Sun, 6 Jan 2008, Harry Saal wrote:
Thanks for the attempt to sort this out.

Here is the sequence of IMAP messages (from Wireshark) when I tried to copy a message from a Draft folder to Inbox.

* 1 FETCH (UID 4 FLAGS (\Draft))..370 OK UID FETCH completed..
371 IDLE
+ Waiting for DONE..
DONE..
371 OK IDLE completed
373 uid copy 4 "INBOX"
* OK [TRYCREATE] Must create mailbox before copy
373 NO [TRYCREATE] UID COPY failed: No such destination mailbox

I don't think I have a "traditional UNIX mailbox", e.g. my INBOX mail is kept (and left) in /var/spool/mail/harry

I downloaded and built from UW source. I changed only line in env_unix.c, namely to
static char *mailsubdir = ".imapmail"  /* stores all mail folders under /home/username/.imapmail */

I built using make lnp SSLTYPE=none. Here is my /etc/c-client.cf file:

I accept the risk
set allow-user-config T
# set new-folder-format mx
# set empty-folder-format mx

This looks right to me.

Thanks in advance for any advice, Mark.

Mark Crispin wrote:
I verified that COPY to traditional UNIX mailbox format INBOX works on my system.  Furthermore, a TRYCREATE should *never* happen with INBOX.  This suggests that the destination mailbox name is something other than INBOX.

Can you get a protocol telemetry log from your client?  There should be a warning message prior to the command reading:
    * OK [TRYCREATE] Must create mailbox before copy
Do you see that?

What IMAP command is immediately before the COPY?  It should be something like
    abc123 UID COPY ##### INBOX
where "abc123" is some arbitrary text and ##### is a number.  What is after the number?  Is it INBOX?

Is your copy of imap-2007 the original, unmodified version from UW?  If not, please try the original, unmodified version:
    ftp://ftp.cac.washington.edu/mail/imap.tar.Z

Do you have an /etc/c-client.cf file on your system?  If so, what are its contents; and if you did not create that file and have no notion of why it is there or what it does, try deleting it.

On Sun, 6 Jan 2008, Harry Saal wrote:
I just rebuilt my UW IMAP mailserver on a Fedora Core 8 system. I am using Thunderbird 2.0.0.9 as a client.

I receive mail into my INBOX , can read it, delete it, etc. But I can not MOVE or COPY a message from some other folder into my INBOX. This used to work using imap-2004d but no longer does. The error message is "[TRYCREATE] UID COPY failed: No such destination mailbox." The mailbox does exist, e.g. as /var/spool/mail/harry, owner is harry:mail, permissions are 660. I even tried permissions of 666 but this did not solve the problem.

I've spent hours researching this, but am at a loss as to how to proceed. Any suggestions?
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw


-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.

-- 
=================================================================
Dr. Harry J. Saal, Member, Technical Committee
  Harry <at> TheTC.org      http://www.thetc.org/
Voice: 650-331-3110      FAX: 650-429-2089
=================================================================



-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.

-- ================================================================= Dr. Harry J. Saal, Member, Technical Committee Harry <at> TheTC.org http://www.thetc.org/ Voice: 650-331-3110 FAX: 650-429-2089 =================================================================
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw
Mark Crispin | 7 Jan 06:37 2008

Re: can't move/copy messages into INBOX with imap-2007

On Sun, 6 Jan 2008, Harry Saal wrote:
> And I promise to look into converting from mx to mix. Do you have any 
> suggested articles or posts that I can read on making the transition?

I don't have anything other than what is in the FAQ.  Also look into the 
mailutil (bundled with the IMAP software) and mixcvt programs (on the UW 
FTP server ftp.cac.washington.edu in the mail directory).

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.
Si vis pacem, para bellum.
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Stefan Bertels | 8 Jan 10:37 2008
Picon

mailutil warning: Unknown flag: $Something

I use mailutil copy (might be different from the latest release, I use 
Ubuntu packages...) to create a temporary mailbox for spamassassin's 
sa-learn.

I get some warnings and I would like to suppress them. There are sent to 
stderr so I cannot suppress them without suppressing error messages, 
too.

warning: Unknown flag: $MDNSent
warning: Unknown flag: $MDNSent
warning: Unknown flag: $MDNSent

I get similar warnings for $Forward which seems a new flag alpine sets. 
Alpine and Outlook are used with IMAP folders. It would be nice if 
mailutil could get a --ignore-unknown-flags switch.

BTW: I do not really understand this warning. Maybe the warning wants to 
give me a hint that the target mailbox might loose these flags because 
they are somewhat special? I really copy "mbx to mbx" so there should 
not be a loss anyway. For me the loss of any flag is no problem because 
sa-learn should ignore them.

Another note: I tested mailutil copy in "mbx to unix" (mbox) mode to see 
whether the warnings disappear (they don't). spamassassin can learn from 
mbox (default) and mbx. I noticed that the "THIS INTERNAL MESSAGE 
CONTAINS FOLDER DATA" (or similar) message at the beginning of the mbox 
file was copied by mailutil, too. Maybe another switch could be used to 
drop this message as it should not be learned by sa. But this isn't a 
high prio request (should be irrelevant in practise).

Best regards
Stefan

_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Mark Crispin | 8 Jan 16:14 2008

Re: mailutil warning: Unknown flag: $Something

On Tue, 8 Jan 2008, Stefan Bertels wrote:
> I get similar warnings for $Forward which seems a new flag alpine sets. 
> Alpine and Outlook are used with IMAP folders. It would be nice if mailutil 
> could get a --ignore-unknown-flags switch.

There is no such switch.  However, there is the -kwcopy switch that will 
copy keywords.

> BTW: I do not really understand this warning. Maybe the warning wants to give 
> me a hint that the target mailbox might loose these flags because they are 
> somewhat special?

The warning says that the target mailbox has lost those flags because you 
did not specify -kwcopy to indicate that they should be copied.

Copying keywords involves an extra, initial, step that mailutil must take 
to create the keywords in the destination mailbox.  It is not done by 
default, and older versions of mailutil did not have that capability at 
all.

-- Mark --

http://panda.com/mrc
Democracy is two wolves and a sheep deciding what to eat for lunch.
Liberty is a well-armed sheep contesting the vote.
_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw

Harry Saal | 8 Jan 19:25 2008

How to ensure new mailboxes are mix format?

I am trying to switch over to mix format from mx for all my mailboxes, 
but I'm stumped.

I see how to convert old mailboxen using mixcvt. But when I create a 
"new folder" (as it is called) via Thunderbird, it is creating a non-mix 
(file) for the mailbox. I tried adding a line to c-client.cf saying "set 
new-folder-format mix" but it didn't seem to have any effect. (I built 
the server from source, using "make lnp".)

_______________________________________________
Imap-uw mailing list
Imap-uw <at> u.washington.edu
https://mailman1.u.washington.edu/mailman/listinfo/imap-uw


Gmane