On Wed, 12 Mar 2003, Curtis Vaughan wrote:

> When creating a new user I discover under ~/Maildir/ the following 
> directories:
> cur
> tmp
> new
> 
> Fine, but I would like there to also be:
> trash
> drafts
> 
> When creating a new user, what config file is responsible for creating 
> the default folders and how exactly should I edit it for my needs?

OK.  This happens to all of us, sooner or later.
You are missing a critical piece of information, and unlike many other
people, I will neither refer you to the docs, nor chastise you.

Maildirs are more that just directories with Mail in them.
A Maildir consists of a directory, and 3 directories beneath that.  
If I had a maildir, 'foo', it would look like:

foo (directory)
foo/tmp (directory)
foo/new (directory)
foo/cur (directory)

Messages stored in a 'maildir' are actually stored in one of 'new' or
'cur'.  They are created in 'tmp', and when fully created, are safely
moved from 'tmp' to 'new' (usually).  'new' is messages you haven't
seen (or rather, haven't been processed somehow), and 'cur' is the
current message set.

Courier-IMAP uses the following mechanisms when referring to folders,
and their relationship between "real" (maildir) folders and IMAP
folders.

Your INBOX is (as you indicate above) ~/Maildir/{cur,new,tmp}
If you (by means of your mail client), or courier-imap itself creates a
new subfolder of your INBOX, for example INBOX.Trash <- This is IMAP,
what *really* happens is you get ~/Maildir/.Trash/{tmp,new,cur}.

None of this should really matter, I'm just trying to forstall future
questions.  You *create* Maildirs with 'maildirmake':

maildirmake Maildir/.Trash
creates a new Maildir.  Carefully note that a '.' precedes the name of
the actual, on-disk folder name.  That is because courier-imap only pays
attention to subfolders that start with '.'.  If you had Maildir/Trash,
courier-imap couldn't care less (I think).

However, you *shouldn't* be creating folders "by hand".
Your MUA (Mail User Agent, such as pine, Netscape, outlook, whatever)
should be used to create additional folders.  Many clients automatically
create a limited number of folders that are commonly used.

Now, on to your question (rather than leaving it unanswered, perhaps
leading you to believe I either ignored it or didn't know the answer, or
simply didn't see it).  I have no idea what file you would edit to
automatically create 'trash' and 'drafts' folders for each user.
If it is a small number of users, consider a simple shell script that
loops over each user, creating (using maildirmake) any and all folders
that you'd like.
--
Applying computer technology is simply finding the right wrench to
  pound in the correct screw.

Jon Nelson <[EMAIL PROTECTED]>
C and Python Code Gardener


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
courier-users mailing list
[EMAIL PROTECTED]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users

Reply via email to