[Dovecot] Deliver - Virtual users

Tobias Balle-Petersen tbp at kontrapunkt.com
Fri Feb 22 13:09:08 EET 2008


Hello...

I have dovecot 1.0.10 running with users in an LDAP database. Things are 
working as they should with IMAP.

However, I can't seem to make deliver w. postfix work they way I want.

My problems are:
Mail to users who do not exist in LDAP or locally are accepted and 
mailfolders are created. I want mail to users that do not exist in LDAP 
or locally to be rejected.

Mail is delivered to users even though they are over quota.



Below I have included a bit of my log. This is what I see when
sending a mail to an existing user. I don't understand the part that says:
dovecot: auth(default): passwd(tbp at kontrapunkt.dk): lookup

In my database users are stored as usernames without domains. Deliver 
seems to lookup the name with domain?
The lookup ends with "unknown user". Then I wonder, why is the mail 
delivered if the user is unknown?

I have included the "protocol lda" part from my dovecot.conf and the 
result of "dovecot -n".


Can someone help me get this sorted out?


Thanks,
Tobias


####################################################

Feb 22 11:31:40 mihoko postfix/smtpd[16944]: 2A8F7137E6: 
client=unknown[192.168.0.225]
Feb 22 11:31:50 mihoko postfix/cleanup[17942]: 2A8F7137E6: 
message-id=<20080222103140.2A8F7137E6 at frontdesk.kontrapunkt.dk>
Feb 22 11:31:50 mihoko postfix/qmgr[2255]: 2A8F7137E6: 
from=<slik at kontrapunkt.com>, size=362, nrcpt=1 (queue active)
Feb 22 11:31:50 mihoko dovecot: auth(default): master in: 
USER^I1^Itbp at kontrapunkt.dk^Iservice=deliver
Feb 22 11:31:50 mihoko dovecot: auth(default): 
passwd(tbp at kontrapunkt.dk): lookup
Feb 22 11:31:50 mihoko dovecot: auth(default): 
passwd(tbp at kontrapunkt.dk): unknown user
Feb 22 11:31:50 mihoko dovecot: auth(default): master out: 
USER^I1^Itbp at kontrapunkt.dk^Iuid=1000^Igid=1000^Ihome=/home/vmail/tbp
Feb 22 11:31:50 mihoko deliver(tbp at kontrapunkt.dk): 
msgid=<20080222103140.2A8F7137E6 at frontdesk.kontrapunkt.dk>: saved mail 
to BLAH.SYNTS
Feb 22 11:31:50 mihoko postfix/pipe[17950]: 2A8F7137E6: 
to=<tbp at kontrapunkt.dk>, relay=dovecot, delay=18, delays=18/0.01/0/0.08, 
dsn=2.0.0, status=sent (delivered via dovecot service)
Feb 22 11:31:50 mihoko postfix/qmgr[2255]: 2A8F7137E6: removed


####################################################

 From dovecot.conf:

protocol lda {
  # Address to use when sending rejection mails.
  postmaster_address = postmaster at kontrapunkt.com

  # Hostname to use in various parts of sent mails, eg. in Message-Id.
  # Default is the system's real hostname.
  #hostname =

  # Support for dynamically loadable plugins. mail_plugins is a space 
separated
  # list of plugins to load.
  #mail_plugins =
  #mail_plugin_dir = /usr/lib/dovecot/modules/lda

  mail_plugins = quota

  # Binary to use for sending mails.
  #sendmail_path = /usr/lib/sendmail

  # UNIX socket path to master authentication server to find users.
  auth_socket_path = /var/run/dovecot/auth-master

  # Enabling Sieve plugin for server-side mail filtering
  mail_plugins = cmusieve
 }


####################################################


dovecot -n


# 1.0.10: /etc/dovecot/dovecot.conf
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imaps imap
listen: localhost:143
ssl_listen: *:993
ssl_cert_file: /etc/ssl/certs/imap.kontrapunkt.com.crt
ssl_key_file: /etc/ssl/private/imap.kontrapunkt.com.key
ssl_key_password: XXXXXXXXXX
disable_plaintext_auth: no
login_dir: /var/run/dovecot/login
login_executable: /usr/lib/dovecot/imap-login
login_greeting: System ready.
login_process_per_connection: no
valid_chroot_dirs: /home/vmail
mail_extra_groups: mail
mail_location: maildir:/home/vmail/%n/mail:INDEX=/var/indexes/%n
maildir_copy_with_hardlinks: yes
mail_plugins: quota imap_quota trash
imap_client_workarounds: delay-newmail
auth default:
  username_format: %n
  verbose: yes
  debug: yes
  passdb:
    driver: ldap
    args: /etc/dovecot/dovecot-ldap.conf
  userdb:
    driver: passwd
  userdb:
    driver: static
    args: uid=vmail gid=vmail home=/home/vmail/%n allow_all_users=yes
  userdb:
    driver: ldap
    args: /etc/dovecot/dovecot-ldap.conf
  socket:
    type: listen
    client:
      path: /var/spool/postfix/private/auth-client
      mode: 432
      user: postfix
      group: vmail
    master:
      path: /var/run/dovecot/auth-master
      mode: 432
      user: vmail
      group: mail
plugin:
  quota: maildir:storage=10
  trash: /etc/dovecot/dovecot-trash.conf
  sieve: /home/vmail/%n/.dovecot.sieve



More information about the dovecot mailing list