# Courier-imap - Invalid mailbox name

## Soupy

I've got the latest courier-imap running.  I am unable to create new folders outside of the main INBOX folder.  In squirrelmail I get this error:

ERROR : Could not complete request.

Query:CREATE "Letters"

Reason Given: Invalid mailbox name

... when I try and make a new root folder named "Letters" or any other name I've tried.  Outlook XP returns the same "Invalid mailbox name" error when I try and create the folder there too.

Is this behavior somehow by design?  I did unmerge and re-merge courier but that had no effect on behavior.

----------

## Soupy

I can't be the only one that can't create folders under courier.  Bah.

Bump.

----------

## Caffeine

I'm having the same problem. 

Seems that no one knows the answer huh?

----------

## fubar

Make sure you set your "root folder path" properly. For example, in Mozilla you have to set IMAP Server directory to INBOX/. This ensures that your folder hierarchy is displayed correctly and you can add, modify, and remove folders without errors.

----------

## Xafloc

Has anyone found an answer to this?  I'm having the exact same problem.

Thanks

----------

## usingloser

i am too

----------

## WarChicken

w00t.  I am also having this problem, with squirrelmail.

Looks like the original post was almost a year ago.

I'll try and remember to post my findings once I figure it out.

----------

## gpeangel

Struggled with this for a couple of days before I found this piece of information at http://www.inter7.com/courierimap/FAQ.html#namespace:

 *Quote:*   

> I can't create any top-level folders, only subfolders of INBOX
> 
> This is a configuration issue with your mail client. IMAP servers are free to use any folder namespace arrangement that's technically convenient for them. Courier-IMAP uses "INBOX." as the namespace for private folders, and "shared." as the namespace for public, shared, folders. The IMAP NAMESPACE extension (see http://www.rfc-editor.org/rfc/rfc2342.txt) allows IMAP clients to automatically discover where the server creates folders, and your IMAP client should implement it.
> 
> This should be completely transparent to you, if your IMAP client properly uses the NAMESPACE extension. If your IMAP client were to automatically take advantage of self-configuration features offered by RFC 2060 and RFC 2342, it would automatically discover, without any additional configuration from the user, that:
> ...

 

I had used cyrus for years before switching to courier and therein lies the rub.  Once I changed Folder Defaults >> Default Folder Prefix = INBOX, I was able to move forward.  Just have to get used to all my folders being subfolders of INBOX.  Change.  Who needs it?  :Mad: 

HTH,

Greg

----------

## wysiib

 *gpeangel wrote:*   

> 
> 
> I had used cyrus for years before switching to courier and therein lies the rub.  Once I changed Folder Defaults >> Default Folder Prefix = INBOX, I was able to move forward.  Just have to get used to all my folders being subfolders of INBOX.  Change.  Who needs it? 
> 
> Greg

 

so with cyrus it works without this change?

----------

## wysiib

//edit. was a double post

----------

## gpeangel

 *wysiib wrote:*   

>  *gpeangel wrote:*   
> 
> I had used cyrus for years before switching to courier and therein lies the rub.  Once I changed Folder Defaults >> Default Folder Prefix = INBOX, I was able to move forward.  Just have to get used to all my folders being subfolders of INBOX.  Change.  Who needs it? 
> 
> Greg 
> ...

 

It did for me, but that was a Red Hat 7.1 system.  Couldn't say for Gentoo.

Greg

----------

## wysiib

i'll give it a try today

----------

## dstutz97

I happened upon this thread because I, too, couldn't create any subfolders.  I didn't have to change the server namespace in server settings, but I did have unchecked the option "Server supports folders that contain sub-folders and messages" under the advanced settings of the server settings.  After that I was able to create the subfolders off inbox.

----------

## pjp

Moved from Other Things Gentoo.

----------

## jmckay123456789

I'm roughly following the desktop config guide where postfix plus courier-imap is setup. My goals go a little beyond what is there however, but fall short of the bizarrly complicated setup in the gentoo mailserver howto. My goal is to have my gentoo box behind my cablemodem/router/firewall act as a mailserver. It should have authenticated smtp so I'm not an open relay, IMAP with ssl security, and a secure web interface. So far I was bashing against the same problem you guys have, where I coudn't create folders outside of the inbox with imap clients. But I have found, so far with OS X mail client and mozilla mail that if you change the "IMAP server directory (mozilla) or the "IMAP path prefix" (OS X mail) to read "INBOX" that suddenly everything starts working! Don't ask me to site a source because I don't have one. I just bashed against the problem for hours and lucked into trying that. Docs are deficient I believe. 

best,

Cedar

----------

## wysiib

hmmm, i already knew this solution. it was mentioned several times before.

anyway thanks for your will to help   :Very Happy: 

but i search for a server-side sollution cause i can't tell all my clients to change there outlook or whatever settings

----------

## jmckay123456789

shoot, I spoke too soon. It is true that things seem to be working perfectly in OS X mail app, that is not the case for mozilla on mac or windows. Specifying INBOX made all my folders apear in mozzilla, I still can't correctly create new folders or transfer messages to them. 

this quote:

 *Quote:*   

> This is a configuration issue with your mail client. IMAP servers are free to use any folder namespace arrangement that's technically convenient for them. Courier-IMAP uses "INBOX." as the namespace for private folders, and "shared." as the namespace for public, shared, folders. The IMAP NAMESPACE extension (see http://www.rfc-editor.org/rfc/rfc2342.txt) allows IMAP clients to automatically discover where the server creates folders, and your IMAP client should implement it.
> 
> This should be completely transparent to you, if your IMAP client properly uses the NAMESPACE extension. If your IMAP client were to automatically take advantage of self-configuration features offered by RFC 2060 and RFC 2342, it would automatically discover, without any additional configuration from the user, that:
> 
> 1. The folder namespace hierarchy separator is the . character
> ...

 

to me does not seem to be our problem. First mozilla is pretty standards complient. And second, I notice that under the advanced settings mozilla auto-fill "INBOX. and "shared." are auto-filled. I think we are dealing with a server side problem. I hope a guru comes and rescues us soon, because I am about googled out, and the courier-imap homepage doesn't seem like a very good resource (not even searchable!). 

Cedar

----------

## giant

I think I understand your problem - you try to make folders in mozillas root besides the "inbox" ?? 

I don' think it's possible - you can however create the standard folders in this subdir.

Like this :

[img:e774c9470f]http://www.mark5.de/screenshots/mozilla_imap.jpg[/img:e774c9470f]

The first account is the pop3 access to the account and the second is the imap variant. 

As you can see I created all the special folders below the Mozilla Inbox Folder . It would look nicer of course if they were beneath each other but this doesn't seem to work with courier imap. 

I mean it's not really a major problem. 

This is courier-imap 2.1.1 working together with exim 4.21 and tpop3d 1.5.2 with mysql and ssl.

Still struggling a bit with the shared folders and exim to deliver mails to them. The new acls are a bit different to configure from the old exim.

----------

## wysiib

 *giant wrote:*   

> 
> 
> doesn't seem to work with courier imap. 
> 
> 

 

i only got it to work with the dovecot imap server.

but that isn't an alternative for me, since it does not support mysql-authentication

----------

## jmckay123456789

giant, thank your for that simple reply. Since mozilla supports folders being outside of the inbox, I assumed it was a misconfiguration. But I suppose  I can live with all my folders inside my inbox. So for that, just in case anyone is following this thread, you do not specify "INBOX" in the mozilla setup, and folders created within the inbox work normally. Personally I regard this as a shortcoming of courier-imap, since mozilla has demonstrated the ability to have it the other way with other (my isp and university) imap servers. However, with mail app in OS X, you *must* specify INBOX, and then everything works normally there as well. IF you do not specify inbox in OS X, then your folders work ok inside the inbox, but then when you switch back to mozilla everything is broken. So in summary, mozilla, no "INBOX", Mail App, yes "INBOX". maybe in the future this will be fixed.

thanks all.

Cedar

----------

## jmckay123456789

update:

Just tried out latest release of Mozilla thunderbird. With "INBOX" specified, everything works great, and folders are not under the inbox, exactly how I like them.

best,

Cedar

----------

## giant

ah excellent - I will have a look at it asap  :Smile: 

Happy New Year btw -)

----------

## wysiib

 *jmckay123456789 wrote:*   

> way with other (my isp and university) imap servers. 

 

so what imap servers are they using?

----------

## prophecy

So...

You could tell evolution that the root if the imap box is the INBOX itself then all will look relative to the root right.  But how to tell evolution about this?

Justace

----------

## plac3bo

Hi everyone

I recently setup sendmail and courier-imap on my gentoo box too.  I ran across ALL of the same issues that are being discussed in this thread and more.  One very confusing thing for me was the mail folder directory.  However, after searching and reading tons of docs, threads, howtos, etc., I finally found the reason behind the odd folder structure.  It lies in the specification of the "maildir" style mailboxes.  It has nothing to do with your client or server-side deficiencies.  I also have a IMAP account with my university mail, and this supports "normal" folder structure, but after further investigation, I discovered that my university uses "mBox" style mailboxes.  I am not going to go into detail about the differences here (simple googling should give you adequate information) but I believe "maildir" does have great advantages over the older "mBox" implementation.

Hope this helps out

-dt

----------

## matroskin

Thanks for all answers here. I was looking almost a week for solution

P.S. search button rulez

----------

## f1n4rf1n

No matter what settings i choose in my clients I'm not able to create any subfolders!

Maybe it has something to do with my Idea to put a "clean" structure of maildirmake'd .maildirs in /etc/skel..

How can I fix this?

----------

## f1n4rf1n

btw:

After "maildirmake -f LockedFolder.NewSubfolder .maildir"

I can edit LockedFolder just fine.. 

So I somehow need to know what maildirmake does..

The unix restrictions are correct

----------

