[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: Integrate openldap with postfix

Aravind Arjunan wrote:
I had configured postfix for my mail server which is working fine.
I had configured openldap on the same server and added many entries in that.
It is also working fine.when i use ldapsearch i can able to view the entries etc.
The users which i had created in ldap is already there in OS for postfix.
I had integrated openldap with postfix, to fetch the mail infromation from openldap.
like mailid,mailQuota,mailbox location etc.
But when i send mail to user it is fetching from openldap at all.
It is strainght away delivering to mailbox.plz help me with this issue
This is my main.cf <http://main.cf> file parameters.
[root@master ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases, *ldap:aliases
*command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
mydomain = panafnet.com <http://panafnet.com>
myhostname = master.panafnet.com <http://master.panafnet.com>
mynetworks = <>, <>
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
relay_domains = $mydestination
relayhost = $mydomain
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
*aliases_server_host = localhost
aliases_server_port = 389
aliases_search_base = dc=panafnet,dc=com
aliases_scope = sub
aliases_bind = no
aliases_query_filter = (&(objectClass=qmailUser)(mail=%s))
aliases_result_attribute = mailMessageStore
aliases_timeout = 10
aliases_version = 3*

IIRC, this way of doing LDAP lookups is obsolete. You need to move your LDAP configuration to a separate file. Refer to http://www.postfix.org/LDAP_README.html for how it should be done.

When you have set everything up correctly, test your LDAP lookup with "postmap -q". How to do this is also explained in LDAP_README.