[Dovecot] dovecot-ldap.conf for usernames/homes/UID/GID

Paul Matthews paul.matthews at cathedral.qld.edu.au
Fri Jan 13 00:33:30 EET 2006


As time goes on I'm convinced more and more the problem is that I can't make
the home directory when I login into squirrel mail ... Has anyone ever
incounted this before?

Q1. Can dovecot use it's LDAP configuration to get information from Active
Directory? if so can someone show me and example dovecot-ldap.conf file?

Q2. To this me seams like just virtual user scenario, in virtual users how
do you get a home directory for mail to be stored in automatically?

Q3. In my /etc/pam.d/dovecot pam module (shown below) it requests that you
make a home directory, when i use this in my sshd pam module and login i
make a home directory, when i do it via squirrel mail it dosn't make a home
directory, why?

auth        required      pam_winbind.so
account 	required      pam_winbind.so
session	optional      pam_mkhomedir.so

Q4. Here is both my configuration files, can someone tell me what i'm doing
wrong?

/etc/dovecot-ldap.conf

hosts = server2000.mydomain.com.au:389
dn = cn=administrator,cn=users,dc=mydomain,dc=com,dc=au
dnpass = password
ldap_version = 3
base = dc=mydomain,dc=com,dc=au
deref = never
scope = subtree

user_attrs = uid,homeDirectory,,uid,uidNumber,gidNumber

user_filter = (&(objectClass=posixAccount)(cn=%u))
pass_attrs = uid,userPassword
pass_filter = (&(objectClass=posixAccount)(uid=%u))
CRYPT
default_pass_scheme = CRYPT
user_global_uid = 100
user_global_gid = 100

/etc/dovecot.conf

#base_dir = /var/run/dovecot/
protocols = imap imaps
imap_listen = [::]
pop3_listen = [::]
#imaps_listen =
#pop3s_listen =
#ssl_disable = no
#ssl_cert_file = /usr/share/ssl/certs/dovecot.pem
#ssl_key_file = /usr/share/ssl/private/dovecot.pem
#ssl_parameters_file = /var/run/dovecot/ssl-parameters.dat
#ssl_parameters_regenerate = 24
#disable_plaintext_auth = yes
log_path = /var/log/dovecot.log
#info_log_path =
#log_timestamp = "%b %d %H:%M:%S "
login_dir = /var/run/dovecot-login
#login_chroot = yes
login = imap
#login_executable = /usr/libexec/dovecot/imap-login
#login_user = dovecot
#login_process_size = 32
#login_process_per_connection = yes
#login_processes_count = 3
#login_max_processes_count = 128
#login_max_logging_users = 256
login = pop3
#max_mail_processes = 1024
#verbose_proctitle = no
#verbose_ssl = no
#first_valid_uid = 500
#last_valid_uid = 0
#first_valid_gid = 1
#last_valid_gid = 0
#mail_extra_groups =
valid_chroot_dirs = /home
default_mail_env = maildir:~/Maildir
#mail_cache_fields = MessagePart
#mail_never_cache_fields =
#client_workarounds =
#mailbox_check_interval = 0
#mailbox_idle_check_interval = 30
#mail_full_filesystem_access = no
#mail_max_flag_length = 50
#mail_save_crlf = no
#mail_read_mmaped = no
#maildir_stat_dirs = no
#maildir_copy_with_hardlinks = no
#maildir_check_content_changes = no
mbox_locks = fcntl
#mbox_read_dotlock = no
#mbox_lock_timeout = 300
#mbox_dotlock_change_timeout = 30
# umask to use for mail files and directories
#umask = 0077
#mail_drop_priv_before_exec = no
#imap_executable = /usr/libexec/dovecot/imap
#imap_process_size = 256
#imap_use_modules = no
#imap_modules = /usr/lib/dovecot/imap
#pop3_executable = /usr/libexec/dovecot/pop3
#pop3_process_size = 256
#pop3_use_modules = no
#pop3_modules = /usr/lib/dovecot/pop3
auth = default
auth_mechanisms = plain
#auth_realms =
#auth_default_realm =
auth_userdb = ldap /etc/dovecot-ldap.conf
auth_passdb = pam
#auth_executable = /usr/libexec/dovecot/dovecot-auth
#auth_process_size = 256
auth_user = root
#auth_chroot =
#auth_count = 1
#auth_username_chars =
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@
#auth_anonymous_username = anonymous
#auth_verbose = no
#auth_debug = no
#auth = digest_md5
#auth_mechanisms = digest-md5
#auth_realms =
#auth_userdb = passwd-file /etc/passwd.imap
#auth_passdb = passwd-file /etc/passwd.imap
#auth_user = imapauth
#auth_chroot =
# simply set "auth_methods = plain digest-md5"

"/etc/dovecot.conf" 487L, 20333C
-----Original Message-----
From: dovecot-bounces at dovecot.org [mailto:dovecot-bounces at dovecot.org]On
Behalf Of Paul Matthews
Sent: Thursday, 12 January 2006 3:30
To: dovecot at dovecot.org
Subject: [Dovecot] dovecot-ldap.conf for usernames/homes/UID/GID


hi there,

I’m getting such a headache today, I’ve added myself to three mailing lists
trying to figure this out, okay here it goes.

I’ve got a Fedora Core 4 box running dovecot imap, squirrel mail, postfix,
samba/winbind.

I’m running winbind to authenticate against Active Directory, I’ve edited my
‘/etc/pam.d/dovecot’ pam module so to let my users login with there Active
directory password, but squirrel mail wont let them 
 I think, let me stress
the term, ‘think’ is has something to do with there home directories,
because I have some local users as well, they can login no issues & my users
with the same usernames on unix and ADS can login with there ADS passwords 


Now I’m looking at the dovecot webmin module and I see that ‘Data source for
users, homes and Ids’ is set to use ‘Standard unix username database’. There
is now option of PAM like in ‘Password authentication source’. Although I do
see LDAP, using config file. Can I set that to query Active directory ldap
database and go there Data source for users, homes and Ids’?

If I can can someone tell me how to, if not can someone tell me what I need
to do?




More information about the dovecot mailing list