Subject: Problems accessing subfolders

From: Wolfgang Sailer <[email-masked]>
Date: Mon, 17 Feb 2003 13:07:41 +0100

Hi Folks!

I have a linux (RedHat 8.0) box running at home and want to access the
mailserver from my university (Innsbruck,Austria), but my linux-boxes
imap client fails to SELECT subfolders. From my Windows Computer running
Mozilla it is possible to access all submailfolders. Any ideas how to
get it working?

Here is some detailed information:
Systems installed
1) On my RedHat Linux box the UW imap2001a is installed. It ships with
RedHat 8.0
It keeps the inbox in /var/spool/mail/UID where UID is the user-id of
the logged-in user
and mailfolders in ~/mail/foldername e.g. ~/mail/Sent
and subfolders in ~/mail/folder/foldername e.g. ~/mail/Archiv/Compaq
2) My university seems to be running imap-2002.RC2b-mbx-ssl on their
mail servers, also from the UW, I suppose.
It keeps the inbox in ~/INBOX
and mailfolders in ~/Mail/foldername e.g. ~/Mail/Sent, ~/Mail/junkmail
and subfolders in ~/Mail/folder/foldername e.g. ~/Mail/Archiv/Compaq
(listings of the directories with full details see below "4")

3) The problem encountered:
I use a programme called "mailsync" that uses the c-client.h file from
my system (I compile it against this file). This programme uses the
c-client.h to access 2 (or more) mailboxes on (different) imap-servers 
with the imap protocol to keep the mailboxes in synch (by performing
EXPUNGE operations if a message has been expunged on either server, VERY
useful when having only a dial-up connection).
With the local c-client installation I can happily access the INBOX on
the remote University Innsbruck (uibk) server and
"top-level-mailfolders" (like ~/Mail/junkmail) but not submailfolders
(like ~/Mail/Archiv/Compaq). The imap-client sees these folders (the
mailsync programme can list all existing mailboxes) but thinks they are
EMPTY, because it seems unable to open them with the SELECT function.
Here's a log from my console on the linux box at home:
The programme gives me errors like:
---
[sulla@RedHatServer Archiv]$ mailsync -D local_uibk
Synchronizing stores "uibk" <-> "local"...
Authorizing against {mail.uibk.ac.at/imap}
Archiv/Compaq: Error: SELECT failed: Can't open Archiv: not a selectable
mailbox
Error: SELECT failed: Can't open Archiv: not a selectable mailbox
0 remain.
Error: IMAP protocol error: Command unrecognized: EXPUNGE
Error: Command unrecognized: EXPUNGE
Mails expunged
Archiv/Linux: Error: SELECT failed: Can't open Archiv: not a selectable
mailbox
Error: SELECT failed: Can't open Archiv: not a selectable mailbox
0 remain.
Error: IMAP protocol error: Command unrecognized: EXPUNGE
Error: Command unrecognized: EXPUNGE
Mails expunged
[... continues for all remote ~/Mail/Archiv/* files]
INBOX: 
67 remain.
Mails expunged
Main Folder: 
646 remain.
Mails expunged
Sent: 
68 remain.
Mails expunged
junkmail: 
3 remain.
Mails expunged
---

listing all existing mailboxes gives:
----
[sulla@RedHatServer Archiv]$ mailsync uibk
Listing store "uibk"
Authorizing against {mail.uibk.ac.at/imap}
Archiv/Compaq
Archiv/Linux
Archiv/Mozilla
Archiv/erhaltene Nachrichten
Archiv/terra Australis
INBOX
Main Folder
Sent
junkmail
[sulla@RedHatServer Archiv]$ 
----

4) the structure of my university mailserver:
-------------- directory structure -------------
The directory '~'
drwx------   3 c72276   c722        1024 Jan 30 10:17 .
drwxr-xr-x  71 root     c102        1536 Jan 24 02:50 ..
-rw-------   1 c72276   c722     1788978 Feb  8 18:56 INBOX
drwx------   4 c72276   c722         512 Feb  8 18:56 Mail

and the directory '~/Mail':
drwx------   4 c72276   c722         512 Feb  8 18:56 .
drwx------   3 c72276   c722        1024 Jan 30 10:17 ..
drwx------   2 c72276   c722         512 Nov 25 09:51 Archiv
-rw-------   1 c72276   c722       14948 Feb  7 15:26 junkmail
-rw-r--r--   1 c72276   c722     2538695 Feb  1 13:09 Main Folder
-rw-------   1 c72276   c722     1745752 Feb  8 18:20 Sent

and the subdirectory '~/Mail/Archiv' contains only files:
drwx------   2 c72276   c722         512 Nov 25 09:51 .
drwx------   4 c72276   c722         512 Feb  8 19:00 ..
-rw-------   1 c72276   c722       22092 Feb  1 13:10 Compaq
-rw-r--r--   1 c72276   c722      324235 Nov 21 12:55 erhaltene
Nachrichten
-rw-------   1 c72276   c722      337451 Feb  5 22:58 Linux
-rw-------   1 c72276   c722       28449 Jan  4 00:49 Mozilla
-rw-------   1 c72276   c722      423413 Apr  1  2002 terra Australis
-------------------------------

Does anybody know what could be the reason for this - apparently
c-client - problem?

Thank you, Greeinx
Wolfgang
-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Mon, 17 Feb 2003 18:38:35 -0800 (PST)

I think that the best way to fix your problem is to report the bugs in
mailsync to its author and ask him to fix it.  The c-client library is
responding exactly to what mailsync is asking it to do; the problem is
that mailsync is asking the wrong things.

-- Mark --

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