On Wed, 21 Aug 2002, Alexy Khrabrov wrote:
> Actually, I'd like to see what kind of control I can have
> over the list of mailboxes presented to the client.  Is
> this patch hiding the files starting with a dot implemented?

This is controlled by the hideDotFiles variable in env_unix.c

I do not recommend doing this, because some clients and/or users may
actually want to see the dot files.  For example, Pine wants to see the
dot files, and has its own feature to control hiding.  Years ago, my
co-workers on the Pine team got very angry with me when an earlier version
hid dot files from Pine.

> Or, better still, showing/hiding only mailboxes whose names
> match a regexp?

That is something you would have to write yourself.  The routine that you
would need to modify is dummy_list_work() in dummy.c, perhaps by adding
code to the "if"  instruction that checks for HIDEDOTFILES and
MXINDEXNAME.

> The problem is, some mailers, notoriously KDE's Kmail, create
> a .<name>.index file for each <name> file in your Mail directory.
> Then it all shows up on top of a sorted list of folders in any
> typical imap client.

Unfortunately, this is one of a wide variety of such things which people
may want (or *not* want) hidden... :-)

> I also read some imap servers have ~/.mailboxlist, but apparently
> this is not the case with UW imapd.

Actually, the ~/.mailboxlist file is an artifact of UW imapd.  It holds
the IMAP subscription list of non-newsgroup mailboxes (of course,
subscribed newsgroups are in .newsrc).  If you don't use a client such as
Outlook or Netscape that unilaterally subscribes all names, you probably
don't have one.

> Can I use namespaces to control this?  What is the "right" way?
> Or it should be done on the client side (e.g. hacking PHP clients)?

The answer to your question is "it all depends".

If you do something server-side, then it applies to all users whether or
not they want it.  There's no way for the user to control it.

If you do something client-side, then it only applies to the users of that
client even if all your users want it.  The user is forced to control it.

As indicated above with the example of Pine, even the choice to hide dot
files can be controversial.  Add to this such details as artifacts of
particular clients (e.g. your Kmail example).

Fortunately, as a sysadmin, you have considerably more leeway in deciding
things than I do.  You only have to worry about users strangling you.  I
have to worry about users *AND* sysadmins strangling me, not to mention
their often conflicting demands.  :-)

Sysadmins who have non-shell access IMAP server systems also have more
leeway than sysadmins of shell access systems.  You can even decide to
rewrite env_unix.c's mailboxfile() routine completely to make mailbox
names be completely different than files.  As distributed, mailboxfile()
basically converts a home-directory relative path name to an absolute path
name, with a few bells and whistles.  You could do something quite
different.  If you do this, though, be sure to change dummy_list_work() in
dummy.c to return names that match what mailboxfile() expects.

-- Mark --

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

Reply via email to