[Dovecot] Getting dovecot to recognize existing folders, was Re: Okay, so what's with "mail storage creation failed", was Cannot connect to dovecot imap server -- nothing in log

David Benfell dbenfell at gmail.com
Fri Apr 18 21:48:17 EEST 2008


On Fri, 2008-04-18 at 00:27 -0400, Bill Cole wrote:
> At 8:36 PM -0700 4/17/08, David Benfell wrote:
> 
> (reduced to the key pieces of information.)
> 
> >dovecot: 2008-04-17 20:24:51 Error: IMAP(benfell): Ambiguous mail
> >location setting, don't know what to do with it:
> >/home/benfell/imap-folders (try prefixing it with mbox: or maildir:)
> 
> [...]
> 
> >namespace:
> >   type: private
> >   separator: /
> >   prefix: folders/
> >   location: ~/imap-folders
> 
> Apply the clue in the log line to the namespace 'location' parameter.
> 
> http://wiki.dovecot.org/Namespaces?highlight=%28location%29
> 
> 
Once again, thanks.  I was trying to understand the configuration file
and I guess that just didn't work.  But I still seemed to be missing
something.

I wanted to get it to recognize my existing folders.  I created a test
folder and saw that in the actual file space, dovecot uses periods to
separate layers of the hierarchy, and that the folder name at the top of
the hierarchy also begins with a period.

If this is the case, I'm not sure what defining "/" as a separator is
for.

So, though I'm not much of script writer, I created a script to go
through and set symbolic links to those folders (Maildirs):

#!/usr/bin/zsh

cd ${HOME}/imap

find . -type d | grep -v "\/\." \
        | grep -v "\/tmp$" \
        | grep -v "\/cur$" \
        | grep -v "\/new$" | while read folder
do
        target=$(print "${folder}"|sed 's_/_._'g|sed 's_\.\._._'g)
        if [[ ! -e "${target}" ]]
        then
                ln -s "${folder}" "${target}"
                ls -al "${target}"
        fi
done


It still didn't appear to work.  There are thousands of these folders in
a nested hierarchy, because I rotate mail folders by year, month,
and--in some cases--day.  Thus, not only do I need to get these folders
recognized initially, but I have an ongoing automatic process that
generates new folders daily, that I want dovecot to also recognize.

So about the time I was just about to fire this off, evolution greyed
out.  When it came back, I could see that it was going through my
folders.  I sure hope it doesn't have to go through all *this* every
time, because it is taking a while.

-- 
David Benfell <dbenfell at gmail.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20080418/10b9c4ff/attachment.bin 


More information about the dovecot mailing list