Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] No mail delivery with postfix and ldap
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Raniz
l33t
l33t


Joined: 13 Sep 2003
Posts: 967
Location: Varberg, Sweden

PostPosted: Sun Feb 22, 2009 12:44 pm    Post subject: [SOLVED] No mail delivery with postfix and ldap Reply with quote

I'm trying to set up a postfix mail server with virtual users and LDAP as backend.
My LDAP database is set up properly, and postfix could deliver mail to local users before I added the ldap entries in main.cf but now I get:
Code:
Feb 22 13:37:47 host postfix/pickup[21859]: 70F141F1380: uid=0 from=<root>
Feb 22 13:37:47 host postfix/cleanup[21862]: 70F141F1380: message-id=<20090222123747.70F141F1380@host.mydomain.org>
Feb 22 13:37:47 host postfix/qmgr[21858]: 70F141F1380: from=<root@host.mydomain.org>, size=304, nrcpt=1 (queue active)
Feb 22 13:37:47 host postfix/virtual[21864]: 70F141F1380: to=<raniz@mydomain.org>, relay=virtual, delay=1.5, delays=1.5/0/0/0.03, dsn=5.1.1, status=bounced (unknown user: "raniz@mydomain.org")
Feb 22 13:37:47 host postfix/cleanup[21862]: 83D6720046B: message-id=<20090222123747.83D6720046B@host.mydomain.org>
Feb 22 13:37:47 host postfix/qmgr[21858]: 83D6720046B: from=<>, size=2082, nrcpt=1 (queue active)
Feb 22 13:37:47 host postfix/bounce[21865]: 70F141F1380: sender non-deliverynotification: 83D6720046B
Feb 22 13:37:47 host postfix/qmgr[21858]: 70F141F1380: removed
Feb 22 13:37:47 host postfix/virtual[21864]: 83D6720046B: to=<root@host.mydomain.org>, relay=virtual, delay=0.06, delays=0.03/0/0/0.02, dsn=5.1.1, status=bounced (unknown user: "root@host.mydomain.org")
Feb 22 13:37:47 host postfix/qmgr[21858]: 83D6720046B: removed

Here is (what I think) the relevant parts of main.cf:
Code:
local_transport = virtual
virtual_mailbox_base = /
virtual_mailbox_maps = ldap:/etc/postfix/ldap-virtual.cf
virtual_alias_maps = ldap:/etc/postfix/ldap-alias.cf
virtual_uid_maps = static:25
virtual_gid_maps = static:25
virtual_minimum_uid = 1000
virtual_mailbox_limit = 0

ldap-virtual.cf:
Code:
bind = yes
bind_dn = cn=Manager,dc=mydomain,dc=org
bind_pw = secret
search_base = ou=People,dc=mydomain,dc=org
domain = dc=mydomain,dc=org
query_filter = (&(mail=%s)(objectClass=CourierMailAccount))
server_host = localhost
server_port = 389
version = 2
result_attribute = uid

ldap-alias.cf:
Code:
bind = yes
bind_dn = cn=Manager,dc=mydomain,dc=org
bind_pw = secret
search_base = ou=People,dc=mydomain,dc=org
domain = dc=mydomain,dc=org
query_filter = (&(mail=%s)(objectClass=CourierMailAccount))
server_host = localhost
server_port = 389
version = 3
result_attribute = mail


My syslog doesn't show any ldap searches with my specified filter, so I guess postfix isn't checking ldap for virtual users. Postfix is compiled with ldap support, so that shouldn't be the issue....

Any help is welcome :)


Last edited by Raniz on Sun Feb 22, 2009 1:42 pm; edited 1 time in total
Back to top
View user's profile Send private message
Raniz
l33t
l33t


Joined: 13 Sep 2003
Posts: 967
Location: Varberg, Sweden

PostPosted: Sun Feb 22, 2009 1:42 pm    Post subject: Reply with quote

Fixed it, the problem was with the domain value specified in the ldap config files, it should be mydomain.org instead of dc=mydomain,dc=org
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum