On 02/22/2011 10:38 AM, J4K wrote:
> On 02/22/2011 09:53 AM, Timo Sirainen wrote:
>> On Mon, 2011-02-21 at 16:53 +0100, J4K wrote:
>>> As a result I have maildirs being created for both (e.g):
>>> /var/vmail/bigdomain.com/d...@bigdomain.com
>>> /var/vmail/bigdomain.com/dirk
>>>
>>>
>>> The actual email is placed in
>>> /var/vmail/bigdomain.com/d...@bigdomain.com, which I am happy with.
>>>
>>> I would liek to tidy up the configuration so that these extra maildirs
>>> are not created, without breaking everything.  Would someone recommend
>>> what the best steps are?  (other than reinstalling and starting from
>>> scratch - Its in production). 
>> Write a script that moves all mails from %n to %u directory and then
>> deletes the %n directory. Stop Dovecot, run the script, start Dovecot.
>>
>>
> Hi Timo,
>    
> Ahh, I see now.
> %u = the whole email address e.g f...@fred.com,  whereas
> %n = the user name e.g fred, but not f...@fred.com.
> I thought it was the other way around.
>
> Thus I require %d %u to keep the format /var/vmail/fred.com/f...@fred.com.
> Thank-you.
>
> S.
is it possible that this is the entry that is incorrect:
userdb static {
    args = uid=5000 gid=5000 home=/var/vmail/%d/%n allow_all_users=yes
}

and it ought to be written:
userdb static {
    args = uid=5000 gid=5000 home=/var/vmail/%d/%u allow_all_users=yes
}

Reply via email to