[Dovecot] bad maildir location

Noel Butler noel.butler at ausics.net
Thu Apr 23 00:15:57 EEST 2009


On Wed, 2009-04-22 at 19:29, denis wrote:

> Noel Butler a écrit :
> > On Fri, 2009-04-17 at 18:09, denis wrote:
> >> /But the problem is that dovecot creates (when you log in for the first time) a directory in the form of the exact address. Here for example,
> >> /var/alternc/mail/d/denis at collectifs.net
> >>
> >> And so all connections will be on an empty location.
> >>
> >> How is it possible to resolve this?
> >>
> >> As mail_location I have this "maildir:/var/alternc/mail/%1u/%u/Maildir" which is not really correct.
> >> /
> >
> > Dovecot is doing what you have told it. 
> > %u is complete username
> >
> > if you want name use %n ...  and %d where (if) you want domain
> > Bascially replace your %u with %n
> Thanks, it's working well with
> 
> mail_location = maildir:/var/alternc/mail/%1u/%n_%d/Maildir
> 
> But, for some users logging with name_domain the directory which is
> created is  not correct and look like
> 
> /var/alternc/mail/d/denis_collectifs.net_
> 

I can't see how it's doing that, given you have told it where to put the
underscore.
Is there any reason you can't use
/var/alternc/mail/collectifs.net/d/denis   format?
Do you need underscores?



> Is it a way to transform a login with _ like denis_collectifs.net to
> denis at collectifs.net to have a the mail_location correct ?
> 


I can't recall if you mentioned earlier what MTA you are using, our
setup uses postfix/dovecot/mysql
How are you storing your users/auth ? Perhaps using my suggestion above
will work better? just adjust your database  query to match



Noel



More information about the dovecot mailing list