[Dovecot] default_realm problem

Anton Martchukov antonm at mxc.ru
Wed Aug 16 14:39:05 EEST 2006

Hello List,

I've upgraded to dovecot from FreeBSD ports, changed the config from
previous 0.99 version, but meet a problem
with %d variable beeing empty in userdb static configuration directive.

Our server supports multiple domains, e.g. 'mxc.ru' and 'mail.mxc.ru'.
Users can log into using their full e-mail address like
antonm at mxc.ru or antonm at mail.mxc.ru, but the feature of adding default
domain should also be present, e.g. when logging
 with user name 'antonm' server should assume username to be
'antonm at mxc.ru' cause 'mxc.ru' is the default domain.

This wroked fine in 0.99 version, but, alas, I can't get it working in
newer version. I've tried different settings combination, but
all of them results in '%d' beeing empty

Debug authentication log is:

dovecot: Aug 16 10:59:46 Info: auth(default):
auth(antonm at mxc.ru, username changed antonm at mxc.ru -> antonm
dovecot: Aug 16 10:59:46 Info: auth(default): ldap(antonm,
uid(user)=antonm userPassword(password)=<hidden>
dovecot: Aug 16 10:59:46 Info: auth(default): client out: OK    1      
dovecot: Aug 16 10:59:46 Info: auth(default): master in: REQUEST       
11      97887   1
dovecot: Aug 16 10:59:46 Info: auth(default): master out: USER  11     
antonm  uid=1004        gid=1004        home=/data/mai

The problem here seems to be with "username changed antonm at mxc.ru ->
antonm", but I do not know how to switch it off.

The relevant config file parts are:


auth_default_realm = mxc.ru
auth_username_chars =

auth default {
        mechanisms = plain digest-md5
        passdb ldap {
            args = /usr/local/etc/dovecot-ldap.conf
        userdb static {
            args = uid=1004 gid=1004 mail=maildir:/data/mailspool/%d/%n


#all user attrs here are commented, since we don't get any user info
from ldap, but checking a password
#user_attrs = uid,homeDirectory,,,uidNumber,gidNumber
#user_attrs = ,,,,,,,
#user_filter = (&(objectClass=posixAccount)(uid=%u))

pass_filter = (&(objectClass=mailUser)(dc=%d)(uid=%n)(accountActive=TRUE))
default_pass_scheme = PLAIN

The authentication is working, so on the pass_filter in
dovecot-ldap.conf '%d' is resolved properly,
but in userdb static's mail argument it's empty whatever I do.

Thank you for your help!

Anton Martchukov  - http://www.martchukov.com

More information about the dovecot mailing list