2 msgpostmap header_checks error
10 msgmailbox_command (dovecot lda) stopped working, ...

mynetworks via LDAP lookup
\ Ruud Baart (24 Jan 2008)
. \ Rolf E. Sonneveld (24 Jan 2008)
. . \ Ruud Baart (24 Jan 2008)
. . . \ Noel Jones (24 Jan 2008)
. \ (Wietse Venema) (24 Jan 2008)

7 msgLocal recipient table in LDAP problem
2 msgproxy_read_maps
1 msgsmtpd_restriction_class and it's lookup
8 msgMessage Rejected
12 msgCustomize to filter attachment ?
2 msgRelay question
14 msgunnecessary routing?
4 msgdo not use 'reject_maps_rbl'?
9 msgFwd: Postfix in OpenVZ.
2 msgbypass body_checks for local mail?
4 msgcatchall with relay_recipient_maps
4 msg'Name server failure' is output
3 msgsmtp_sasl_password_maps lookups
16 msgPostfix Queues on a Ram Disk
15 msgsendmail compared to smtp sending
3 msgPostfix does not recognize remote emails
2 msgHow to disable SSLv2 on smtpd opportunistic TLS?
Subject:mynetworks via LDAP lookup
Group:Postfix-users
From:Ruud Baart
Date:24 Jan 2008


 
A normal mynetworks parameters looks like:
mynetworks = $config_directory/mynetworks
and in this file are all the networks listed:
192.168.1.0/24
172.23.10.0/24
127.0.0.0/8
217.1.2.3/28

Is it possible to replace this lookup with a LDAP lookup?

I tried this:
mynetworks = ldap:$config_directory/ldap/mynetworks.cf

And the query is:
server_host = ldap://localhost
bind_dn = cn=Postfix,dc=example,dc=com
bind_pw = secret
search_base = ou=Networks,cn=Postfix,dc=example,dc=com
query_filter = (ipNetworkNumber=%s)
result_attribute = ipNetworkNumber

With
postmap -q 192.168.1.0/24 ldap:./mynetworks.cf
I get result back. But with
postmap -q 192.168.1.1 ldap:./mynetworks.cf
I get no result back although it is an allowed network address.

Perhaps it is simple but I can't find a proper solution. Does someone
give me a hint how I can lookup specific IP numbers and storing IP
ranges in LDAP?

Regards
R.J. Baart



© 2004-2008 readlist.com