Folder list in UW imapd

Folder list in UW imapd

Post by Andrej Borsenko » Thu, 18 Jun 1998 04:00:00



This is the old problem. UW imapd returns *all* files in home directory as
result of e.g. LIST command. I dare to claim, that this decision is wrong.

When client requests a list of mailboxes, he is not interested in arbitrary
file on server - after all, IMAP is not file managing protocol. The client
is interested in *mailboxes*. And only files, which have special format, are
valid mailboxes with UW imapd. (Speaking on source code level, only files,
for which mail_valid() returns a valid, non-dummy, driver, are mailboxes).

The case of empty files is more complicated. They could be considered as
valid Unix From_ mailboxes - but only partially. UW imapd keeps special
metadata even for Unix mailboxes. I personally would not consider empty
files as valid.

What is the reason for such behaviour? It may be nice to see file contents
over IMAP, but it definitly not, what IMAP is for.

--
============================================================
Andrej Borsenkow                Fax:   +7 (095) 796 99 20
SNI ITS Moscow                  Tel:   +7 (095) 796 99 24


============================================================

 
 
 

Folder list in UW imapd

Post by Osma Ahvenlamp » Thu, 18 Jun 1998 04:00:00



> This is the old problem. UW imapd returns *all* files in home directory as
> result of e.g. LIST command. I dare to claim, that this decision is wrong.

Actually, it doesn't. UW imapd lists all files in the user's hoem
directory _that it recognises as mailboxes_. However, since the list
of recognised mailbox formats is reptty huge, and many of these
formats are difficult to recognise accurately (quickly, anyway), a
standard build of UW imapd will indeed list most files in the home
directory. If you were to prune down the mailbox formats to only a
few formats that can be accurately recognised, UW imapd would quit
listing all files. (I believe, anyway.. I haven't read the source but
this is what its behaviour suggests to me - and you can even SELECT a
Zip file!)

--
I'm a Hollywood writer; so I put on a sports jacket and take off my brain.
Osma Ahvenlampi <oa at iki fi> (damn spammers)

 
 
 

Folder list in UW imapd

Post by Mark Crispi » Thu, 18 Jun 1998 04:00:00


The comp.mail.imap newsgroup is not for IMAP protocol discussions.  It is
not for advocacy of changes to any particular implementation.  If you
really want to do so in a public forum, please use the appropriate
newsgroup or mailing list.  In the case of the c-client based imapd
(a.k.a. UW imapd), that is the c-client mailing list.


> When client requests a list of mailboxes, he is not interested in arbitrary
> file on server - after all, IMAP is not file managing protocol.

Actually, IMAP works quite well as a simple file retrieval protocol.

Quote:> The client
> is interested in *mailboxes*. And only files, which have special format, are
> valid mailboxes with UW imapd. (Speaking on source code level, only files,
> for which mail_valid() returns a valid, non-dummy, driver, are mailboxes).

If that's what you want, try the following experiment:

In imapd.c, rewrite routine mm_list() to be:

void mm_list (MAILSTREAM *stream,int delimiter,char *name,long attributes)
{
  DRIVER *d = mail_valid (stream,name,NIL)
  if (d && strcmp (d->name,"phile")
    mm_list_work ("LIST",delimiter,name,attributes);

Quote:}

Be sure to call special attention to your work to the guy who has a few
thousand files in his home directory tree and/or links to source
directories.  Let him know that you're responsible for the new behavior of
imapd.  Make a special effort to get him to use clients that use the "*"
wildcard.

Be sure that your life insurance policy covers "being *d by a
user because you made ill-thought-out changes to system software."

Quote:> What is the reason for such behaviour?

If you look at the code, you'll see that it was very obviously designed to
work the way that you advocate, and that considerable effort was made to
make it NOT work that way.  That must mean that either the programmer is
an idiot or he had a very good reason.

Here's what the idiot has to say was his reason:

     "Well, once upon a time, it worked the way that you advocate.  It was
changed for a reason.  A very good reason.

     "It slows down LIST to well beyond the point of unusability.  LIST
is already very slow because of the necessity of doing a stat() per entry,
but we're talking much worse.

     "We're talking tens of minutes, and in one extreme case over an hour.  
And we're talking back when imapd had only two local file drivers instead
of the eight that it has now.

     "The bottom line is that it isn't feasible.  It doesn't scale for
anything more than the very smallest user directories."

Quote:> It may be nice to see file contents
> over IMAP, but it definitly not, what IMAP is for.

Why do you say that?

-- Mark --

* RCW 19.149 notice: This email address is located in Washington State. *
*   Unsolicited commercial email is NOT welcome at this email address.  *
Science does not emerge from voting, party politics, or public debate.

 
 
 

1. set up public folders with uw imapd

Hello,

 I've got this friend who asked me a favour, you know the story.
We set up uw-imapd on his Debian Linux system, and it worked
plug-and-play like promised in the docs. Now he wants to create
public folders that he and his fellow users can use to share
documents / eMails. But how?

After a couple of hours with groups.google.com I still have no
clue how to start, so please forgive me my potentially RTFM
question. I'm reasonably comfortable with Unix, exim etc., but
I have never administrated an IMAP server in my life...

So do I have to create any configuration files, recompile the
package or create a directory structure for this? I've played
around with the `mbxcreat' utility, but I'm not much wiser than
before. Any hints appreciated!

Cheers,

Herbert

--
Arthur: "It's at times like this I wish I'd listened to my mother"
Ford  : "Why, what did she say?"
Arthur: "I don't know, I never listened"
-=-=-                             -=-=-=-=-
  Dipl.Ing. Martin "Herbert" Dietze -=-=- The University of Buckingham -=-=-

2. VPN and Win98SE

3. pine->uw-imapd folder selection/SCAN imap command

4. Corba Exception????

5. How to hide folders with UW IMAPD 4.5?

6. VirtualKB Overlays

7. UW imapd LIST and LSUB problems

8. GCC Crashes

9. Public folders in UW Imapd

10. UW imapd on Linux & outlook express - creating folders

11. shared folders in UW imapd

12. UW imapd folder formats

13. UW IMAPd vs. MH folders