[Dovecot] local users and virtual users

Egbert Jan van den Bussche egbert at vandenbussche.nl
Tue Nov 16 13:31:06 EET 2010


Hi list,

I'm facing this problem:
I have a e few local (system) users and a bunch of virtual users (in 
MySQL). To make it easy for the big group, I've set a default domain 
which is not the domain of the server (which is just the servername). So 
the big group logs in with there short name without @<domain>.

BUT the few system users (in passwd) cannot login to pop or imap because 
they get the non-local domain attached and cannot be found in the mysql 
db but they cannot be found in passdb either with their long name. The 
same applies when system users give their longname with the local domain 
which IS the localname of the server. This name is not in mysql nor 
passdb either.

Is there a way to find local users in passdb when the come in with a 
long name? Do I need another passwd like file  (i hope not...)

Recap:
local Domain is :mail-dev.hobby.nl
default domain added bij dovecot is kader.hcc.nl
kader users are found in mysql regardless if they give @kader.hcc.nl or 
not (then it is added)
system user are never found since longname is not in mysql nor in passdb.

dovecot -n:
root at mail-dev:/etc/dovecot# dovecot -n
# 1.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 2.6.32-25-server x86_64 Ubuntu 10.04.1 LTS
log_path: /var/log/dovecot/error.log
info_log_path: /var/log/dovecot/info.log
log_timestamp: %Y-%m-%d %H:%M:%S
protocols: imap pop3 imaps pop3s managesieve
listen: *, [::]
ssl_cert_file: /etc/ssl/certs/ssl-mail.pem
ssl_key_file: /etc/ssl/private/ssl-mail.key
ssl_cipher_list: 
ALL:!LOW:!SSLv2:ALL:!aNULL:!ADH:!eNULL:!EXP:RC4+RSA:+HIGH:+MEDIUM
disable_plaintext_auth: no
verbose_ssl: yes
login_dir: /var/run/dovecot/login
login_executable(default): /usr/lib/dovecot/imap-login
login_executable(imap): /usr/lib/dovecot/imap-login
login_executable(pop3): /usr/lib/dovecot/pop3-login
login_executable(managesieve): /usr/lib/dovecot/managesieve-login
mail_max_userip_connections(default): 10
mail_max_userip_connections(imap): 10
mail_max_userip_connections(pop3): 3
mail_max_userip_connections(managesieve): 10
verbose_proctitle: yes
first_valid_uid: 200
mail_privileged_group: vmail
mail_location: maildir:~/Maildir
mail_debug: yes
mmap_disable: yes
dotlock_use_excl: no
mail_nfs_storage: yes
mail_nfs_index: yes
mbox_write_locks: fcntl dotlock
mail_executable(default): /usr/lib/dovecot/imap
mail_executable(imap): /usr/lib/dovecot/imap
mail_executable(pop3): /usr/lib/dovecot/pop3
mail_executable(managesieve): /usr/lib/dovecot/managesieve
mail_plugins(default): convert autocreate
mail_plugins(imap): convert autocreate
mail_plugins(pop3): convert autocreate
mail_plugins(managesieve):
mail_plugin_dir(default): /usr/lib/dovecot/modules/imap
mail_plugin_dir(imap): /usr/lib/dovecot/modules/imap
mail_plugin_dir(pop3): /usr/lib/dovecot/modules/pop3
mail_plugin_dir(managesieve): /usr/lib/dovecot/modules/managesieve
imap_client_workarounds(default): outlook-idle delay-newmail
imap_client_workarounds(imap): outlook-idle delay-newmail
imap_client_workarounds(pop3):
imap_client_workarounds(managesieve):
pop3_client_workarounds(default):
pop3_client_workarounds(imap):
pop3_client_workarounds(pop3): outlook-no-nuls oe-ns-eoh
pop3_client_workarounds(managesieve):
lda:
   postmaster_address: postmaster
   deliver_log_format: msgid=%m: %$
   rejection_reason: Your message to <%t> was automatically rejected:%n%r
   auth_socket_path: /var/run/dovecot/auth-master
auth default:
   mechanisms: plain login
   realms: kader.hcc.nl hobby.nl
   default_realm: kader.hcc.nl
   cache_size: 1024
   verbose: yes
   debug: yes
   debug_passwords: yes
   passdb:
     driver: pam
     args: failure_show_msg=yes cache_key=%u dovecot
   passdb:
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
   userdb:
     driver: passwd
     args: mail=maildir:~/Maildir
   userdb:
     driver: sql
     args: /etc/dovecot/dovecot-sql.conf
   socket:
     type: listen
     client:
       path: /var/spool/postfix/private/dovecot-auth
       mode: 432
       user: postfix
       group: postfix
     master:
       path: /var/run/dovecot/auth-master
       mode: 384
       user: vmail
       group: vmail
plugin:
   convert_mail: mbox:/disk/mail/convert/%n
   autocreate: Trash
   autocreate2: Sent
   autocreate3: Drafts
   autocreate4: Spam
   autosubscribe: Trash
   autosubscribe2: Sent
   autosubscribe3: Drafts
   autosubscribe4: Spam

Pse help. TIA!
Egbert Jan


More information about the dovecot mailing list