Petri Asikainen
2008-Aug-29 14:08 UTC
[Dovecot] Virtual users, postfix and dovecot deliver LDA
Hi, I have question about how to setup ldap-lookups in dovecot. I have
done my homework by googling and reading documention and sample
configuration files. But cant resolve this issue.
Background:
I have setup postfix and dovecot. Postix is configured to ldap alias
maps and is delivering mails to /var/spool/vmail/username/Maildir
correctly . Username is ldap attribute sAMAccountName from active directory.
Goal:
To use dovecots sieve plugin I have to setup postfix to use dovecots
deliver. Changed postfix main.cf to virtual_transport = dovecot and
master.cf to include lines:
dovecot unix - n n - - pipe
flags=DRhu user=vmail:mail argv=/usr/lib/dovecot/lda/deliver -d
${recipient}
Problem is that mail get delivered to /var/spool/vmail/users.email at address ,
not folder named as ldap attribute sAMAccountNameas it should.
The question is:
How I can configure deliver to do map email address to ldap attribute
sAMAccountName? Second question is can I use ldap groups as distribution
lists whit deliver?
Dovecot version is 1.1.2 and postfix 2.5.1
Cheers,
Petri
Timo Sirainen
2008-Aug-29 14:14 UTC
[Dovecot] Virtual users, postfix and dovecot deliver LDA
On Fri, 2008-08-29 at 17:08 +0300, Petri Asikainen wrote:> Problem is that mail get delivered to /var/spool/vmail/users.email at address , > not folder named as ldap attribute sAMAccountNameas it should.I'm guessing your user_attrs setting doesn't contain "sAMAccountName=user" so Dovecot uses the email destination as username. If that doesn't help, post your dovecot-ldap.conf> Second question is can I use ldap groups as distribution > lists whit deliver?deliver can write the mail only to a single recipient. I'd guess you could do this on Postfix side. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 197 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20080829/f245046c/attachment-0002.bin>
Petri Asikainen
2008-Sep-01 04:51 UTC
[Dovecot] Virtual users, postfix and dovecot deliver LDA
Thanks, Now I'm starting to get it. but cant get ldap userdb working.
First I was using static userdb (Stubid me ... ;)
I added dovecot-ldap-userdb.conf and it's in auth default, but now
it does lookup users at all. Account that I try to use to bind ldap is
working with postfix. Theres probably something wrong with my static
attributes syntax.
## dovecot.conf: (part of it)
auth default {
passdb ldap {
args = /etc/dovecot/dovecot-ldap.conf
}
userdb ldap {
args = /etc/dovecot/dovecot-ldap-userdb.conf
}
## new dovecot-ldap-userdb.conf
hosts = 172.16.0.2
base = ou=Oppilaitokset,dc=domain,dc=local
ldap_version = 3
dn = ad_postfix at domain.local
dnpass = ***********
user_attrs = sAMAccountName=user,=home=/var/spool/vmail/%u,=gid=12,=uid=1001
## and in dovedot-ldap.conf
hosts = 172.16.0.2
base = ou=Oppilaitokset,dc=domain,dc=local
ldap_version = 3
auth_bind = yes
auth_bind_userdn = domain\%u
Timo Sirainen wrote:> On Fri, 2008-08-29 at 17:08 +0300, Petri Asikainen wrote:
>> Problem is that mail get delivered to /var/spool/vmail/users.email at
address ,
>> not folder named as ldap attribute sAMAccountNameas it should.
>
> I'm guessing your user_attrs setting doesn't contain
> "sAMAccountName=user" so Dovecot uses the email destination as
username.
> If that doesn't help, post your dovecot-ldap.conf
>
>> Second question is can I use ldap groups as distribution
>> lists whit deliver?
>
> deliver can write the mail only to a single recipient. I'd guess you
> could do this on Postfix side.