View Single Post
  #1 (permalink)  
Old 06-26-2007, 07:21 PM
badrian badrian is offline
Starter Member
 
Posts: 2
Default zmmailbox and spaces in folder names

Running ZCS Open Source Edition, v4.5

I'm working on a (BASH shell) script to iterate through a user's mailbox folder tree, and am running into a problem with folders containing spaces in the name. My syntax is as follows:

Code:
#zmmailbox -z -m $ACCOUNT search -l 10 "in:$cof"
Where "$ACCOUNT" is the user mailbox, and "$cof" is the variable containing the folder name

The command works fine with folder names containing no spaces, but when the variable contains a space zmmailbox treats the space as the end of the value. As an example, in the case of the variable "$cof" expanding to "/Classroom/session 1":

Code:
#zmmailbox -z -m user@domain search "in:/Classroom/session 1"

The result returned is:

#ERROR: mail.NO_SUCH_FOLDER (no such folder path: /Classroom/session)
I've tried the standard UNIX/Linux trick of using a backslash preceding spaces, and have tried all manner of quotes around the folder names. Am I missing something really simple here?... any assistance with this would be greatly appreciated.
Reply With Quote