[Dovecot] bad maildir location

denis denlistes at altern.org
Thu Apr 23 12:47:29 EEST 2009


Noel Butler a écrit :
>> 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?
>   
Yes, because it comes from the hosting control/ panel Alternc
http://www.alternc.org

I am trying to use dovecot in place of courrier
/
>   
>> 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
>   
In my /etc/dovecot/dovecot-sql.conf, i use user_query = SELECT path, 33 AS uid, uid AS gid FROM mail_users WHERE alias = '%u'

The user can be denis_collectifs.net or denis at collectifs.net and the path is always like this /var/alternc/mail/d/denis_collectifs.net (the Maildir is created by an script)

If i set mail_location = maildir:/var/alternc/mail/%1u/%u/Maildir

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 in place of using /var/alternc/mail/d/denis_collectifs.net

If i set mail_location = maildir:/var/alternc/mail/%1u/%n_%d/Maildir

All is working well, except is use denis_collectifs as user because dovecot creates a directory /var/alternc/mail/d/denis_collectifs.net_

Maybe that the best way is to modify the user_query , something like REPLACE(alias,'@','_') but i don't now if it's possible.

Thanks
Denis



More information about the dovecot mailing list