Solved

How do I configure courier IMAP / qmailtoaster to allow dots / periods (.) in folder names??

Posted on 2006-07-10
20
1,932 Views
Last Modified: 2012-02-11
Hi,

My company is preparing to switch to a new mail server but we're finding some problems with it as we continue to test it.

The most annoying of these problems (IMHO) is that it doesn't seem to allow dots (.) in the folder name.

When I tell my IMAP client (Thunderbird) to create a folder named 'folder.with.dots' , courier IMAP creates a directory named '.folder.with.dots' on the server's file system.

The problem with that, of course, is that courier uses '.' as the folder separater! So in my client, it then shows up as 3 folders, one within the other! :
+ folder
 \-+ with
   \-+ dots

This is _not_ what we want!

My question, for all you experts, is:
* How do I get around this apparent limitation of courier?
* Is there any way to configure courier to use a different folder separator/delimiter ... like '/' or '\' perhaps??
* Are there actually any IMAP clients out there that play nicely with courier--that is, clients that display/create folders.with.dots intelligently?
* Is there some (fairly simple) hack that would cause courier to escape the dots ('.' -> '\.')?
* Or... if it is simply impossible to do this with courier, is there a way to drop in another IMAP server (like Binc IMAP) and have it coexist with qmailtoaster?
* Or... failing ALL THAT, recommendations on a package similar in function to qmailtoaster?

Note: On our old server we were/are using binc IMAP + qmail (but _not_ qmailtoaster) + vpopmail and it had NO problem at all with folders containing dots (although it does have problems with folder names containing _slashes_ (/) -- probably because / is binc's default folder delimiter, as you can see in my .bincimap-subscribed posted below). I would have happily stuck with binc as our IMAP server, but our main sysadmin here wants to try going with qmailtoaster (because its many packages are all supposed to work together right "out of the box"). So that's what we're trying...

=== More details about our specific problem ===

On our old server, when I create "Folder.with.dots", it properly escapes the dots. Here's a listing of my Maildir:

-rw-------    1 vpopmail vchkpw        118 Jul 10 11:09 .bincimap-subscribed
drwx------    5 vpopmail vchkpw         84 Jul 10 11:07 Drafts
drwx------    5 vpopmail vchkpw         36 Jul 10 11:09 Folder\.with\.dots
drwx------    5 vpopmail vchkpw         84 Jul 10 08:24 INBOX
drwx------    5 vpopmail vchkpw         84 Jul 10 11:07 INBOX.My subfolder
drwx------    5 vpopmail vchkpw         36 Jul 10 11:08 INBOX.My subfolder.My subsubfolder
drwx------    5 vpopmail vchkpw         36 Jul 10 11:07 Interesting stuff
drwx------    5 vpopmail vchkpw         84 Feb 14 11:49 Sent
drwx------    5 vpopmail vchkpw         84 Feb 16 16:16 Spam
drwx------    5 vpopmail vchkpw         84 Jul  6 16:40 Trash

Not so on our new courier-powered server. A listing of my Maildir:

drwxr-xr-x   2 vpopmail vchkpw 4096 Jul 10 13:52 courierimaphieracl
drwx------   2 vpopmail vchkpw 4096 Jul  3 11:29 courierimapkeywords
-rw-r--r--   1 vpopmail vchkpw   89 Jul 10 14:28 courierimapsubscribed
-rw-r--r--   1 vpopmail vchkpw  288 Jul  7 08:49 courierimapuiddb
drwx------   2 vpopmail vchkpw 4096 Jul 10 11:24 cur
drwx------   6 vpopmail vchkpw 4096 Jul 10 13:52 .folder.with.dots
drwx------   5 vpopmail vchkpw 4096 Jul 10 14:28 .My subfolder
drwx------   5 vpopmail vchkpw 4096 Jul 10 14:28 .My subfolder.My subsubfolder
drwx------   2 vpopmail vchkpw 4096 Jul  6 16:43 new
drwx------   2 vpopmail vchkpw 4096 Jul 10 14:28 tmp
drwx------   6 vpopmail vchkpw 4096 Jul  3 11:44 .Trash

Also, for reference, here's what my .bincimap-subscribed looks like (old server):

INBOX
Sent
Spam
Trash
Drafts
Interesting stuff
INBOX/My subfolder
INBOX/My subfolder/My subsubfolder
Folder.with.dots
Folder/with/slashes

And what courierimapsubscribed on the new server looks like:

INBOX.Trash
INBOX.folder.with.dots
INBOX.Folder.with.slashes
INBOX.My subfolder
INBOX.My subfolder.My subsubfolder
INBOX.Sent
INBOX.Drafts

Clearly, it's using dots (.) as the delimiter for folder names (even when I tried to create a 'Folder/with/slashes' folder!)... As a result, the IMAP client interprets each dot as the start of a subfolder name and that's what it shows me.
0
Comment
Question by:TylerRick
  • 11
  • 7
20 Comments
 

Author Comment

by:TylerRick
ID: 17077402
I don't think it's a problem with Thunderbird. I have the same problem when accessing my e-mail with SquirrelMail.
0
 

Author Comment

by:TylerRick
ID: 17077683
I searched the Courier-imap mailing list and found this (http://sourceforge.net/mailarchive/message.php?msg_id=13359362):
 
 > Jason Haar writes:
 >
 >> This must be a FAQ, but I can't find any reference to it.
 >>
 >> I need to be able to have dots inside subfolder names (I want to be able
 >> to have email addresses as subfolders for a project I'm working on), but
 >> of course Courier-IMAP uses the dot (".") as the folder delimiter.
 >>
 >> Is there a way of escaping it or something  so that it shows up
 >> correctly?
 >
 >
 > Nope.  Welcome to IMAP.
 
 Yeah - had a similar problem with IMAP to Exchange (which uses the "/"
 as a delimiter). Had a user with a subfolder called "Home/Personal".
 Worked fine via MAPI to Exchange - but couldn't access via IMAP to Exchange.
 
 Some form of escaping/encoding should be in place to handle that -
 pretty bad to be limiting what a user can do WRT what chars are
 available... :-(

-----------

Note that no solution is given -- only the same problem as I have...
0
 
LVL 25

Accepted Solution

by:
Cyclops3590 earned 500 total points
ID: 17183429
Is there a reason you have to use a dot.  Can't you use an underscore instead for the folder.  Just curious why its so necessary to use the dot
0
 

Author Comment

by:TylerRick
ID: 17189582
It's not strictly necessary that we use a dot.  We may end up just doing like you suggested and using an underscore or comma something.

It will just mean we'll have to write a script to rename all of the folders that people have already created that have dots in them, before we do the migration... not a huge problem, just a bit of a pain.

Really, I'm just an idealist and I think that it **should** be possible. Why not?

0
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 17191663
Not sure really.  Starting a directory or file with a dot is usually only done in linux to hide the directory or file.  As for IMAPs use of the dot, I honestly never thought much about it, but have always seen it using the dot in front and have never noticed (or found in courier-imap that I use) any options to change the char used
0
 

Author Comment

by:TylerRick
ID: 17212698
Actually, I was referring to using dots in the middle of the name (my example was 'folder.with.dots'), not at the beginning of the name.
0
 

Author Comment

by:TylerRick
ID: 17212707
I am requesting that this question by Deleted/Refunded, since no one has offered a solution.
0
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 17214886
Just out of curiousity, what do you plan to do to work around this issue?
0
 

Author Comment

by:TylerRick
ID: 17220380
I guess we'll just avoid using dots in our folder names...
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 25

Expert Comment

by:Cyclops3590
ID: 17222856
So basically you're going to do what I suggested then since it looks as though the dot thing is a special character used in imap servers that can't be changed and thus there is no solution to your question only a work around like the one I stated

I know you mentioned you want to delete this question and refund points, but I'd say my first post deserves a grade of C.  Since it only gives a work around but doesn't truely solve your issue it deserves a grade of C.  Also, I really don't think this question should be deleted but atleast PAQ'd since it does give valid information that IMAP doesn't handle users using reserved characters well.

just my 2 cents anyway.
0
 

Author Comment

by:TylerRick
ID: 17229586
If your workaround was "avoid using dots in folder names; use some other character instead" then that's about as useful to someone trying to find a way to use dots in folder names as the workaround "avoid using e-mail; use the phone instead" is for someone who's having trouble getting their e-mail to work...

(No offense meant, by the way...that's just my humble opinion...)

As for PAQing instead of deleting, that's certainly fine with me! I didn't even realize there was a difference...

0
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 17233694
well if email can't do what you want, then you really have no choice but to use the phone now do you.  But a better comparison is someone asking to use "\" in directory or file names in windows.  Just isn't possible since its a reserved char.

my point is that what you are asking for isn't possible, thus a work around has to be used.  This happens a lot when dealing with computers or really anything.

I stand by my original statement that the work around solution may not be what you wanted to hear but since that's what you're going to end up doing anyway, its obviously the answer that should be accepted but just with a low grade (of C) due to the fact that it is a workaround and doesn't directly solve your issue, but does indirectly solve it

However, if you want to PAQ/Refund it go ahead.
0
 

Author Comment

by:TylerRick
ID: 17235076
I feel like you're missing the point of my question. I was asking for a way to ALLOW dots in folder names, not for a way where we aren't using dots to begin with. We WANT to use dots. Period. That's the whole point of the question. I wasn't really asking whether or not it's possible (it IS), but rather HOW to make it possible.

I don't need an expert to tell me "just call your folder folder_with_dots instead of folder.with.dots" -- I already KNOW I can do that.

When I asked "How do I get around this apparent limitation of courier?" I meant, "Courier doesn't SEEM to support dots in folder names right out of the box.  How do I configure it, hack it, replace it, etc., etc. so that I CAN use dots in folder names?" Any acceptable "workaround" would have to involve allowing dots in folder names. Period.

These are some of the other alternative solutions I said I was willing to accept:

* Is there any way to configure courier to use a different folder separator/delimiter ... like '/' or '\' perhaps??

* Are there actually any IMAP clients out there that play nicely with courier--that is, clients that display/create folders.with.dots intelligently?

The developers of courier-imap seem to believe that their software is following the standard correctly and it's a CLIENT problem... which seems pretty arrogant, since I had no problems making folders.with.dots using my current client (Thunderbird) when we were using binc-imap!!!

Here is part of my post to the Courier-imap mailing list on 2006-07-10 and the reply given by Sam Varshavchik:

-------------------------
Tyler Rick writes:
> I know this was asked back in 2005 (see quote below), but I'm wondering if anything has changed since then.
>
> Am I really the only one who really wants to use dots in my folder names?

Probably.

>
> Is there really no way to do this with Courier-IMAP?

Correct.

Well, it's really an issue for your IMAP client.  Cone, for example, can do it.  It's smart enough to actually understand how a fscking IMAP client should work, and realize that since the dot is a hierarchy delimiter, quietly pull a switcheroo, and, as far as the user is concerned, create a folder that's shown to the user as, apparently, containing a dot; but really use a substitute character on the server.
--------------------------

* Is there some (fairly simple) hack that would cause courier to escape the dots ('.' -> '\.')?

Since you seem to believe it's impossible to do with courier, please provide one of the alternatives I said would be acceptible in that case, such how to set up qmailtoaster+BincIMAP or some package similar to qmailtoaster:

* Or... if it is simply impossible to do this with courier, is there a way to drop in another IMAP server (like Binc IMAP) and have it coexist with qmailtoaster?

* Or... failing ALL THAT, recommendations on a package similar in function to qmailtoaster?

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

I gave it 500 points because I knew it was a very hard problem. I had already read in various mailing lists and posts that it was impossible to use dots (.) in courier imap. But that answer wasn't the one I was looking for. I KNOW there's a way to do this (allow dots in folder names); I just didn't know if anyone had bothered figuring out how exactly that way is.

It IS possible to make it work. Binc-IMAP did it. If it came right down to it, this problem COULD be fixed by a patch to the courier source code. Just change everywhere it uses '.' as a separator to some other character like '*' (yes, you can have file names with * in them)! So if you want to submit a patched version of courier, that might be an acceptable solution.

I never said the solution would be easy. In fact, based on the preliminary research I had done, I expected it to be quite hard. That's why I gave it the max point value (500 points).

I was also hoping that it would attract many experts to look at / try to solve my problem, but instead it looks like I only got one person to post a comment.

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

I had already done a whole bunch of background research on this topic (because I am NOT an IMAP expert). But I still figured it might be worth asking on EE, where there would be real, live IMAP experts.

You are apparently not an IMAP expert. If you were, you would not have mistaken my question about dots in the middle of a folder name (the "hierarchy delimiter") with dots at the beginning of the file name. These are completely different issues. The fact that all folder names are prefixed with a dot is annoying, to be fair, but that is NOT the problem I am seeking a solution to.

You said: "Starting a directory or file with a dot is usually only done in linux to hide the directory or file.  As for IMAPs use of the dot, I honestly never thought much about it, but have always seen it using the dot in front [<-- not what I'm talking about] and have never noticed (or found in courier-imap that I use) any options to change the char used."

I will post more about the "hierarchy delimiter" and RFC2342 in my next post. I just assumed that if a mail expert were answering this question that he/she would already be familiar with such things...
0
 

Author Comment

by:TylerRick
ID: 17235116
From RFC2342 (http://rfc.net/rfc2342.html):


5. NAMESPACE Command


   Arguments: none

   Response:  an untagged NAMESPACE response that contains the prefix
                 and hierarchy delimiter to the server's Personal
                 Namespace(s), Other Users' Namespace(s), and Shared
                 Namespace(s) that the server wishes to expose. The
                 response will contain a NIL for any namespace class
                 that is not available. Namespace_Response_Extensions
                 MAY be included in the response.
                 Namespace_Response_Extensions which are not on the IETF
                 standards track, MUST be prefixed with an "X-".

   Result:    OK - Command completed
                 NO - Error: Can't complete command
                 BAD - argument invalid

   Example 5.1:
   ===========

      < A server that supports a single personal namespace.  No leading
      prefix is used on personal mailboxes and "/" is the hierarchy
      delimiter.>

      C: A001 NAMESPACE
      S: * NAMESPACE (("" "/")) NIL NIL
      S: A001 OK NAMESPACE command completed





Gahrns & Newman             Standards Track                     [Page 3]


RFC 2342                    IMAP4 Namespace                     May 1998


   Example 5.2:
   ===========

      < A user logged on anonymously to a server.  No personal mailboxes
      are associated with the anonymous user and the user does not have
      access to the Other Users' Namespace.  No prefix is required to
      access shared mailboxes and the hierarchy delimiter is "." >

      C: A001 NAMESPACE
      S: * NAMESPACE NIL NIL (("" "."))
      S: A001 OK NAMESPACE command completed

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

Applying that to my situation, here is a trace of the IMAP exchange between my client and our courier-imap server:

* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION] Courier-IMAP ready. Copyright 1998-2004 Double Precision, Inc.  See COPYING for distribution information.

1 capability

* CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION

1 OK CAPABILITY completed

2 login "me@domain.com" "pass"

2 OK LOGIN Ok.

3 namespace

* NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." "."))

3 OK NAMESPACE completed.

4 lsub "" "INBOX.*"

* LSUB (\HasNoChildren) "." "INBOX.Folder.with.slashes"
* LSUB (\HasNoChildren) "." "INBOX.Drafts"
* LSUB (\HasNoChildren) "." "INBOX.Sent"
* LSUB (\HasNoChildren) "." "INBOX.My subfolder.My subsubfolder"
* LSUB (\HasChildren) "." "INBOX.My subfolder"
* LSUB (\HasNoChildren) "." "INBOX.folder.with.dots"
* LSUB (\HasNoChildren) "." "INBOX.Trash"
* LSUB (\Noselect \HasChildren) "." "INBOX.Folder.with"
* LSUB (\Noselect \HasChildren) "." "INBOX.Folder"
* LSUB (\Noselect \HasChildren) "." "INBOX.folder.with"
* LSUB (\Noselect \HasChildren) "." "INBOX.folder"

4 OK LSUB completed

5 lsub "" "#shared.*"

* LSUB (\HasNoChildren) "." "#shared.folder"

5 OK LSUB completed

6 lsub "" "shared.*"

6 OK LSUB completed

7 list "" "INBOX"

* LIST (\Marked \HasChildren) "." "INBOX"

7 OK LIST completed

8 select "INBOX"

* FLAGS (\Draft \Answered \Flagged \Deleted \Seen \Recent)
* OK [PERMANENTFLAGS (\Draft \Answered \Flagged \Deleted \Seen)] Limited
* 5 EXISTS
* 0 RECENT
* OK [UIDVALIDITY 1151951399] Ok
* OK [MYRIGHTS "acdilrsw"] ACL

8 OK [READ-WRITE] Ok

9 getacl "INBOX"

* ACL "INBOX" "owner" "acdilrsw"

9 OK GETACL completed.

10 myrights "INBOX"

* MYRIGHTS "INBOX" "acdilrsw"

10 OK MYRIGHTS completed.

11 getquotaroot "INBOX"

* QUOTAROOT "INBOX" "ROOT"
* QUOTA "ROOT"

11 OK GETQUOTAROOT Ok.

12 UID fetch 1:* (FLAGS)

* 1 FETCH (UID 1 FLAGS (\Seen))
* 2 FETCH (UID 2 FLAGS (\Seen))
* 3 FETCH (UID 15 FLAGS ())
* 4 FETCH (UID 16 FLAGS ())
* 5 FETCH (UID 17 FLAGS ())

12 OK FETCH completed.

13 UID fetch 15:17 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type)])

* 3 FETCH (UID 15  FLAGS () )
* NO Cannot open message 3
* 4 FETCH (UID 16  FLAGS () )
* NO Cannot open message 4
* 5 FETCH (UID 17  FLAGS () )
* NO Cannot open message 5

13 OK FETCH completed.

14 IDLE

In particular, this line:

* NAMESPACE (("INBOX." ".")) NIL (("#shared." ".")("shared." "."))
0
 

Author Comment

by:TylerRick
ID: 17235172
http://www.experts-exchange.com/Networking/Email_Groupware/help.jsp#hi70

It looks like Refund/PAQ is for when someone anwers his own question. I didn't really answer my own question.

It looks like Refund/Delete is for when nobody answers the question. That seems to be the case here.

I'd prefer Refund/PAQ if it means others can benefit from this thread, but really, we didn't come up with any solution so I'm not sure if that works...
0
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 17235318
>>It IS possible to make it work. Binc-IMAP did it.
Then why don't you use that instead.  You mentioned that Courier-IMAP doesn't do it and gave proof from the courier-imap mailing list (where you're going to find the true IMAP experts)
>> Is there really no way to do this with Courier-IMAP?
>Correct.

Also, since I've only ever used Courier-IMAP, I'm not ever going to suggest switching to a different imap daemon as it would be irresponsible to suggest something I've never used.  I've only ever used Thunderbird and Outlook (and Netcape mail for a brief time) so I can't even recommend a different email client since based on your posts its reasonable to assume you've tried Thunderbird with courier (as I did to and got the same results as you)

And you're right I'm not an IMAP expert by any stretch of the imagination.  That is why my point was if what you plan on doing is what I posted, then that answer should be selected.  If you are not going to do what I suggested then yes a Delete/Refund is in order.  If you want PAQ/Refund fine don't care.  I don't care about the points, I care more about someone searching the database and finding solutions to their problems even if the solution is not possible you have to do it this other way instead.  This is why I don't care if you had thought about just switching your delimiter before because I think its valuable information to someone searching the database that if you use Courier-IMAP and want to use dots in your folder names, then your just out of luck.

You clearly did the research and from what I can tell already knew that what you were asking was not possible (WITH Courier-IMAP since that is the daemon you were asking about) but asked anyway.

I'm switching my recommendation to a Delete/Refund for this question as it shouldn't clutter up the PAQ database.
0
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 17235340
>>It looks like Refund/Delete is for when nobody answers the question. That seems to be the case here.

True, but if you read more (its somewhere in there) PAQ/Refund is also used in rare occasions where there is valuable information for someone searching the DB, but nothing seemed to even lead the asker towards an answer.

As a cleanup volunteer for the Linux Admin and Linux Networking areas I can tell you I try to stay away from this personally and I believe others will tell you the same because if there's value to any posts then chances are it should be accepted then, but just with a low grade.
0
 

Author Comment

by:TylerRick
ID: 17235818
I don't care about points either. I guess the question I asked was too hard. I'll just accept your first recommendation since I guess there is no better alternative that either of us has come up with.
0
 

Expert Comment

by:username4242
ID: 37583513
if you used dovecot you would be able to change the path delimiter: http://wiki.dovecot.org/Namespaces

i dont know how to do this for courier-imap though.

as far as i know dovecot runs on all platforms courier-imap is able to run. so maybe you could just use dovecot instead of courier-imap and your problem would be solved.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In this post, we will have a look on how to install Exchange Server 2013 from command prompt, instead of using the graphical user interface. Below are the steps that are to be performed to install Exchange Server 2013. 1. Domain Controller and…
Today, security is a big concern in an organization to prevent sensitive data leakage. In Outlook you can secure your Outlook items (emails, calendars, contacts and other stuff) using various techniques like by marking item as private, or you can pu…
The purpose of this video is to demonstrate how to set up Lists in Mailchimp. This will be demonstrated using a Windows 8 PC. Mailchimp will be used. Log into your Mailchimp account. : Click on Lists. Click on Create List Button : Choose the desi…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now