Hello

Originally my problem was that I couldn't delete folders, this has expanded to not being able to create folders at a root level. I'm still unable to delete folders at a sub level.

I'm curious if this is a Mozilla Thunderbird issue or a bincimap problem.
Thanks for your help

Dan

Debugging info:

Note that I deleted the Maildir before the MUA was started so bincimap created it. This means that I'm starting with a clean Maildir with no previous folders.

Procedure used:
1 Create a folder at the root level called 'RootLevelFolder'
2 Create a folder at the inbox level called 'InboxLevelFolder'
3 Delete the folder just created at the inbox level

This was all done through Mozilla Thunderbird 0.7

Steps 1 and 3 Fail
Step 2 Succeeds

Strace:
Process 26721 attached - interrupt to quit
select(1, [0], NULL, NULL, {1808, 770000}) = 1 (in [0], left {1788, 170000})
gettimeofday({1089300358, 391040}, NULL) = 0
read(0, "8 create \"RootLevelFolder\"\r\n", 1024) = 28
alarm(1200) = 0
write(1, "8 NO CREATE failed: invalid mailbox name\r\n", 42) = 42
alarm(0) = 1200
gettimeofday({1089300358, 393219}, NULL) = 0
select(1, [0], NULL, NULL, {1860, 0}) = 1 (in [0], left {1842, 470000})
gettimeofday({1089300375, 925451}, NULL) = 0
read(0, "9 create \"INBOX/InboxLevelFolder\"\r\n", 1024) = 35
mkdir(".InboxLevelFolder", 0777) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, NULL, {SIG_DFL}, 8) = 0
rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
nanosleep({1, 0}, {1, 0}) = 0
mkdir(".InboxLevelFolder/cur", 0777) = 0
mkdir(".InboxLevelFolder/new", 0777) = 0
mkdir(".InboxLevelFolder/tmp", 0777) = 0
alarm(1200) = 0
write(1, "9 OK CREATE completed\r\n", 23) = 23
alarm(0) = 1200
gettimeofday({1089300376, 940692}, NULL) = 0
select(1, [0], NULL, NULL, {1860, 0}) = 1 (in [0], left {1859, 990000})
gettimeofday({1089300376, 957889}, NULL) = 0
read(0, "10 subscribe \"INBOX/InboxLevelFolder\"\r\n", 1024) = 39
open(".bincimap-subscribed", O_RDONLY) = 5
fstat64(5, {st_mode=S_IFREG|0600, st_size=6, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x40019000
read(5, "INBOX\n", 4096) = 6
read(5, "", 4096) = 0
close(5) = 0
munmap(0x40019000, 4096) = 0
gettimeofday({1089300376, 960734}, NULL) = 0
getpid() = 26721
open(".bincimap-subscribed-tmp-QES3VM", O_RDWR|O_CREAT|O_EXCL, 0600) = 5
write(5, "INBOX\n", 6) = 6
write(5, "INBOX/InboxLevelFolder\n", 23) = 23
fsync(5) = 0
close(5) = 0
rename(".bincimap-subscribed-tmp-QES3VM", ".bincimap-subscribed") = 0
alarm(1200) = 0
write(1, "10 OK SUBSCRIBE completed\r\n", 27) = 27
alarm(0) = 1200
gettimeofday({1089300377, 48025}, NULL) = 0
select(1, [0], NULL, NULL, {1860, 0}) = 1 (in [0], left {1860, 0})
gettimeofday({1089300377, 49166}, NULL) = 0
read(0, "11 list \"\" \"INBOX/InboxLevelFolder\"\r\n", 1024) = 37
time(NULL) = 1089300377
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 5
fstat64(5, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
fcntl64(5, F_SETFD, FD_CLOEXEC) = 0
getdents64(5, /* 9 entries */, 4096) = 280
stat64("./cur", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("./new", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("./tmp", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("./new", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 7
fstat64(7, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
getdents64(7, /* 2 entries */, 4096) = 48
getdents64(7, /* 0 entries */, 4096) = 0
close(7) = 0
stat64("./cur", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("./new", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("./tmp", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open("../new", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = -1 ENOENT (No such file or directory)
stat64("/cur", 0xbfffee4c) = -1 ENOENT (No such file or directory)
stat64("/cur", 0xbfffee4c) = -1 ENOENT (No such file or directory)
stat64("/cur", 0xbfffee4c) = -1 ENOENT (No such file or directory)
stat64(".InboxLevelFolder/cur", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64(".InboxLevelFolder/new", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64(".InboxLevelFolder/tmp", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
open(".InboxLevelFolder/new", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 7
fstat64(7, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
fcntl64(7, F_SETFD, FD_CLOEXEC) = 0
getdents64(7, /* 2 entries */, 4096) = 48
getdents64(7, /* 0 entries */, 4096) = 0
close(7) = 0
stat64(".bincimap-subscribed/cur", 0xbfffee4c) = -1 ENOTDIR (Not a directory)
stat64("/cur", 0xbfffee4c) = -1 ENOENT (No such file or directory)
stat64("/cur", 0xbfffee4c) = -1 ENOENT (No such file or directory)
getdents64(5, /* 0 entries */, 4096) = 0
close(5) = 0
time(NULL) = 1089300377
alarm(1200) = 0
write(1, "* LIST (\\Unmarked) \"/\" \"INBOX/InboxLevelFolder\"\r\n11 OK LIST completed\r\n", 71) = 71
alarm(0) = 1200
gettimeofday({1089300377, 64168}, NULL) = 0
select(1, [0], NULL, NULL, {1860, 0}) = 1 (in [0], left {1830, 370000})
gettimeofday({1089300406, 690322}, NULL) = 0
read(0, "12 expunge\r\n", 1024) = 12
stat64("./new/", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
stat64("./cur/", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
alarm(1200) = 0
write(1, "12 OK EXPUNGE completed\r\n", 25) = 25
alarm(0) = 1200
gettimeofday({1089300406, 692745}, NULL) = 0
select(1, [0], NULL, NULL, {1860, 0}) = 1 (in [0], left {1859, 680000})
gettimeofday({1089300407, 16437}, NULL) = 0
read(0, "13 close\r\n14 logout\r\n", 1024) = 21
alarm(1200) = 0
write(1, "13 OK CLOSE completed\r\n", 23) = -1 EPIPE (Broken pipe)
--- SIGPIPE (Broken pipe) @ 0 (0) ---
Process 26721 detached


Protocol Dump:
* OK Welcome to Binc IMAP Copyright (C) 2002-2004 Andreas Aardal Hanssen at 2004-07-08 09:24:42 MDT
1 capability
* CAPABILITY IMAP4rev1 STARTTLS AUTH=LOGIN AUTH=PLAIN
1 OK CAPABILITY completed
2 authenticate plain
+
AHRoaXNpc2l0AHRoaXNpc2l0
2 OK AUTHENTICATE completed
3 lsub "" "*"
* LSUB (\Unmarked) "/" "INBOX"
3 OK LSUB completed
4 list "" "INBOX"
* LIST (\Unmarked) "/" "INBOX"
4 OK LIST completed
5 list "" "Trash"
5 OK LIST completed
6 create "Trash"
6 NO CREATE failed: invalid mailbox name
7 select "INBOX"
* 0 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1089300286]
* OK [UIDNEXT 1] 1 is the next UID
* FLAGS (\Answered \Flagged \Deleted \Recent \Seen \Draft)
* OK [PERMANENTFLAGS (\Answered \Flagged \Deleted \Seen \Draft)] Limited
7 OK SELECT completed
8 create "RootLevelFolder"
8 NO CREATE failed: invalid mailbox name
9 create "INBOX/InboxLevelFolder"
9 OK CREATE completed
10 subscribe "INBOX/InboxLevelFolder"
10 OK SUBSCRIBE completed
11 list "" "INBOX/InboxLevelFolder"
* LIST (\Unmarked) "/" "INBOX/InboxLevelFolder"
11 OK LIST completed
12 expunge
12 OK EXPUNGE completed
13 close
14 logout
* BYE The server died unexpectedly. Please contact your system administrator for more information.


Filesystem listing before (ls -la):
[EMAIL PROTECTED]:~/Maildir$ ls -la
total 32
drwx------ 5 thisisit thisisit 4096 Jul 8 10:28 .
drwxr-xr-x 4 thisisit emailman 4096 Jul 8 10:28 ..
-rw------- 1 thisisit thisisit 6 Jul 8 10:28 .bincimap-subscribed
-rw------- 1 thisisit thisisit 28 Jul 8 10:28 bincimap-cache
-rw------- 1 thisisit thisisit 71 Jul 8 10:28 bincimap-uidvalidity
drwx------ 2 thisisit thisisit 4096 Jul 8 10:28 cur
drwx------ 2 thisisit thisisit 4096 Jul 8 10:28 new
drwx------ 2 thisisit thisisit 4096 Jul 8 10:28 tmp


Filesystem listing after (ls -la):
[EMAIL PROTECTED]:~/Maildir$ ls -la
total 36
drwx------ 6 thisisit thisisit 4096 Jul 8 10:25 .
drwxr-xr-x 4 thisisit emailman 4096 Jul 8 10:24 ..
drwx------ 5 thisisit thisisit 4096 Jul 8 10:25 .InboxLevelFolder
-rw------- 1 thisisit thisisit 29 Jul 8 10:25 .bincimap-subscribed
-rw------- 1 thisisit thisisit 28 Jul 8 10:25 bincimap-cache
-rw------- 1 thisisit thisisit 71 Jul 8 10:25 bincimap-uidvalidity
drwx------ 2 thisisit thisisit 4096 Jul 8 10:25 cur
drwx------ 2 thisisit thisisit 4096 Jul 8 10:25 new
drwx------ 2 thisisit thisisit 4096 Jul 8 10:25 tmp


My conclusion:

It seems that binc and Thunderbird disagree on what the root level is. When the 'InboxLevelFolder' was created it was done as ~/Maildir/.InboxLevelFolder instead of ~/Maildir/INBOX.InboxLevelFolder. Step 1 fails because binc can't go any higher in the directory tree then ~/Maildir/. Step 3 seems to fail because it trys to move the 'InboxLevelFolder' folder into the 'Trash' folder which doesn't exist because binc was unable to create the 'Trash' folder for the same reason that Step 1 fails. One thing interesting to note is that if I try to create a 'Trash' folder myself in Mozilla Thunderbird I get an error that says the folder already exists and I need to pick a different name. This may show that Mozilla Thunderbird thinks the 'Trash' folder exists at the root level.

The protocol dump shows the communication on the creation of the 'Trash' folder as: 6 create "Trash" 6 NO CREATE failed: invalid mailbox name. This situation means that no folders or messages can be deleted no matter where they are in the directory structure because there is no 'Trash' folder to put them in.

Is this conclusion totally off? If it is correct how can I change things so that Thunderbird will create ~/Maildir/.Trash and think of it as being at the root level?

I was also curious about the protocol dump. The instructions on the wiki say to wipe out the username and password, but I couldn't find my username and password in the dump file. Did I perform the protocol dump incorrectly, or have things changed with binc to where this is no longer a requirement?

Reply via email to