[Dovecot] Dovecot Alpha 4

Tomi Hakala tomi.hakala at clinet.fi
Thu Oct 27 21:38:13 EEST 2005


Marcus Don wrote:
 > Also, how do you turn off index files altogether?

Put "INDEX=MEMORY" on your default_mail_env, by this you make
Dovecot to use non-persistent memory indexes, for example:

default_mail_env = maildir:/nfs/%d/%u/Maildir:INDEX=MEMORY

> So, whenever a user is deleted, we have to delete the index files from every
> machine in the cluster. A better solution would be to make the uid one of
> the variables available in default_mail_env. By naming index files by uid
> rather than username, this wouldn't be an issue.

If you move to memory indexes you have no use for this but since you
use SQL authentication backend you could have very flexible layout for
your mail spool and indexes. Just return properly formatted "mail"
field on user_query, this will overwrite your default_mail_env you
have in dovecot.conf.

For example

user_query = SELECT uid, .., concat('maildir:/nfs/', domain, '/', uid,
	'/Maildir:INDEX=/var/index/', domain, '/' uid) AS mail, ..

would read mail from /nfs/%domain/%uid/Maildir and store indexes to
/var/index/%domain/%uid

Cool but not very neat.

More clean way to do this would be to have templates for environment
variables like home, mail and index and use field names from SQL as
fill in variables, like:

  userdb sql {
    set home = /nfs/%%spool%%/%d/%%uid%%
    set mail = maildir:/nfs/%%spool%%/%d/%%uid%%/mail
    set index = /var/%3RHu/%d/%%uid%%
    args = /opt/dovecot/etc/sql.conf
  }

and then get fields like "spool" and "uid" from SQL and let the Dovecot
to fill them into template environments you defined.

I know that Timo has more than enough work at the moment so if anyone
on the list have some spare time please feel free to take a look on
this :)

 > 4. authentication caching
> 
> Also since the alpha 4 release, we have found that, once the authentication
> cache is full, all subsequent login attempts for users that haven't been
> cached return "password mismatch". I though this might be a conflict with
> nscd, but it happens whether nscd is running or not. So, for the time being,
> we have had to disable the authentication cache.

Authentication caching was more or less broken in all of alpha series,
there are fixes for those in CVS.

> I'd be very keen to hear from anyone who has any feedback on any of the
> points above.

Have you thought of clustered file system to go with your Dovecot
hosts and CLARiiON device?

-- 
Tomi Hakala


More information about the dovecot mailing list