[Dovecot] mail_location %d expansion

Mark Par mrbpar at gmail.com
Mon May 21 12:47:23 EEST 2007


hi,

i'm trying to read the mails of virtual users by setting the value of
mail_location to /mail/virtual/%d/%u/Maildir.  however, the %d does
not resolve to the domain.  i am using ldap as my passdb and userdb.
what am i missing here?

using this telnet session,

| $ telnet localhost imap
| Trying 209.235.254.94...
| Connected to localhost
| Escape character is '^]'.
| * OK Dovecot ready.
| 1 login foo.bar at mydom.com TopSecret
| 1 OK Logged in.
| 2 select inbox
| 2 NO Internal error occurred. Refer to server log for more
information. [2007-05-21 04:32:42]

here are the relative entries from the log:

| May 21 04:32:42 localhost dovecot: auth(default):
auth(iris.lames at pointwest.com.ph,xx.xx.xx.xx): username changed
foo.bar at mydom.com -> foo.bar
| May 21 04:32:42 localhost dovecot: auth(default):
ldap(foo.bar,xx.xx.xx.xx): result: uid(user)=foo.bar
uidNumber(userdb_uid)=2301 gidNumber(userdb_gid)=2301
userPassword(password)=TopSecret
| May 21 04:32:42 localhost dovecot: auth(default): client out: OK  1
     user=foo.bar
| May 21 04:32:42 localhost dovecot: auth(default): master in: REQUEST
     3      99112    1
| May 21 04:32:42 localhost dovecot: auth(default):
prefetch(foo.bar,xx.xx.xx.xx): success
| May 21 04:32:42 localhost dovecot: auth(default): master out: USER
     3      foo.bar       uid=2301        gid=2301
| May 21 04:32:42 localhost dovecot: imap-login: Login:
user=<foo.bar>, method=PLAIN, rip=xx.xx.xx.xx, lip=xx.xx.xx.xx,
secured
| May 21 04:32:42 localhost dovecot: IMAP(foo.bar):
mkdir(/mail/virtual//foo.bar/Maildir/cur) failed: Permission denied
| May 21 04:32:59 ptwest1 dovecot: IMAP(foo.bar):
mkdir(/mail/virtual//foo.bar/Maildir/cur) failed: Permission denied

dovecot --version:

1.0rc29

dovecot.conf:

ssl_disable: yes
ssl_cert_file:
ssl_key_file:
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
verbose_proctitle: yes
first_valid_gid: 0
mail_extra_groups: mail
mail_location: maildir:/share/mail/virtual/%d/%u/Maildir
imap_client_workarounds: delay-newmail outlook-idle netscape-eoh
tb-extra-mailbox-sep
auth default:
  verbose: yes
  debug: yes
  debug_passwords: yes
  passdb:
    driver: ldap
    args: /usr/local/etc/dovecot-ldap.conf
  userdb:
    driver: prefetch

dovecot-ldap.conf:

auth_bind = no
hosts = localhost
base = dc=mycompany,dc=com
dn = uid=dovecot,ou=auth,dc=mycompany,dc=com
dnpass = TooMuchToAsk
pass_attrs = uid=user,userPassword=password,uidNumber=userdb_uid,gidNumber=userd
b_gid
pass_filter = (&(objectClass=posixAccount)(uid=%n))
default_pass_scheme = PLAIN
ldap_version = 3


More information about the dovecot mailing list