I set the "debuglevel =1" , the detailed log is as follows. Pls help to analyze why the output has duplicate records.
# postmap -q testgroup@h3cmt.com ldap:/etc/postfix/ad_virtual_group_maps.cf
postmap: dict_ldap_debug: ldap_create
postmap: dict_ldap_debug: ldap_url_parse_ext(ldap://10.63.16.115:389)
postmap: dict_ldap_debug: ldap_sasl_bind
postmap: dict_ldap_debug: ldap_send_initial_request
postmap: dict_ldap_debug: ldap_new_connection 1 1 0
postmap: dict_ldap_debug: ldap_int_open_connection
postmap: dict_ldap_debug: ldap_connect_to_host: TCP 10.63.16.115:389
postmap: dict_ldap_debug: ldap_new_socket: 4
postmap: dict_ldap_debug: ldap_prepare_socket: 4
postmap: dict_ldap_debug: ldap_connect_to_host: Trying 10.63.16.115:389
postmap: dict_ldap_debug: ldap_connect_timeout: fd: 4 tm: 10 async: 0
postmap: dict_ldap_debug: ldap_ndelay_on: 4
postmap: dict_ldap_debug: ldap_is_sock_ready: 4
postmap: dict_ldap_debug: ldap_ndelay_off: 4
postmap: dict_ldap_debug: ldap_open_defconn: successful
postmap: dict_ldap_debug: ldap_send_server_request
postmap: dict_ldap_debug: ber_scanf fmt ({it) ber:
postmap: dict_ldap_debug: ber_scanf fmt ({i) ber:
postmap: dict_ldap_debug: ber_flush: 55 bytes to sd 4
postmap: dict_ldap_debug: ldap_result ld 0x89443a0 msgid 1
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 1 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: wait4msg ld 0x89443a0 msgid 1 (timeout 10000000 usec)
postmap: dict_ldap_debug: wait4msg continue ld 0x89443a0 msgid 1 all 1
** ld 0x89443a0 Connections:
* host: 10.63.16.115 port: 389 (default)
refcnt: 2 status: Connected
last used: Mon Mar 21 10:29:21 2011
** ld 0x89443a0 Outstanding Requests:
* msgid 1, origid 1, status InProgress
outstanding referrals 0, parent count 0
** ld 0x89443a0 Response Queue:
Empty
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 1 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: ldap_int_select
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 1 all 1
postmap: dict_ldap_debug: ber_get_next
postmap: dict_ldap_debug: ber_get_next: tag 0x30 len 16 contents:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 1 message type bind
postmap: dict_ldap_debug: ber_scanf fmt ({eaa) ber:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 0 new referrals
postmap: dict_ldap_debug: read1msg: mark request completed, ld 0x89443a0 msgid 1
postmap: dict_ldap_debug: request done: ld 0x89443a0 msgid 1
postmap: dict_ldap_debug: res_errno: 0, res_error: <>, res_matched: <>
postmap: dict_ldap_debug: ldap_free_request (origid 1, msgid 1)
postmap: dict_ldap_debug: ldap_free_connection 0 1
postmap: dict_ldap_debug: ldap_free_connection: refcnt 1
postmap: dict_ldap_debug: ldap_parse_sasl_bind_result
postmap: dict_ldap_debug: ber_scanf fmt ({eaa) ber:
postmap: dict_ldap_debug: ldap_msgfree
postmap: dict_ldap_debug: ldap_search_ext
postmap: dict_ldap_debug: put_filter: "(&(objectClass=group)(mail=testgroup@h3cmt.com))"
postmap: dict_ldap_debug: put_filter: AND
postmap: dict_ldap_debug: put_filter_list "(objectClass=group)(mail=testgroup@h3cmt.com)"
postmap: dict_ldap_debug: put_filter: "(objectClass=group)"
postmap: dict_ldap_debug: put_filter: simple
postmap: dict_ldap_debug: put_simple_filter: "objectClass=group"
postmap: dict_ldap_debug: put_filter: "(mail=testgroup@h3cmt.com)"
postmap: dict_ldap_debug: put_filter: simple
postmap: dict_ldap_debug: put_simple_filter: "mail=testgroup@h3cmt.com"
postmap: dict_ldap_debug: ldap_send_initial_request
postmap: dict_ldap_debug: ldap_send_server_request
postmap: dict_ldap_debug: ber_scanf fmt ({it) ber:
postmap: dict_ldap_debug: ber_scanf fmt ({) ber:
postmap: dict_ldap_debug: ber_flush: 138 bytes to sd 4
postmap: dict_ldap_debug: ldap_result ld 0x89443a0 msgid 2
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 2 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: wait4msg ld 0x89443a0 msgid 2 (timeout 10000000 usec)
postmap: dict_ldap_debug: wait4msg continue ld 0x89443a0 msgid 2 all 1
** ld 0x89443a0 Connections:
* host: 10.63.16.115 port: 389 (default)
refcnt: 2 status: Connected
last used: Mon Mar 21 10:29:21 2011
** ld 0x89443a0 Outstanding Requests:
* msgid 2, origid 2, status InProgress
outstanding referrals 0, parent count 0
** ld 0x89443a0 Response Queue:
Empty
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 2 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: ldap_int_select
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 2 all 1
postmap: dict_ldap_debug: ber_get_next
postmap: dict_ldap_debug: ber_get_next: tag 0x30 len 181 contents:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 2 message type search-entry
postmap: dict_ldap_debug: wait4msg ld 0x89443a0 10 secs to go
postmap: dict_ldap_debug: wait4msg continue ld 0x89443a0 msgid 2 all 1
** ld 0x89443a0 Connections:
* host: 10.63.16.115 port: 389 (default)
refcnt: 2 status: Connected
last used: Mon Mar 21 10:29:21 2011
** ld 0x89443a0 Outstanding Requests:
* msgid 2, origid 2, status InProgress
outstanding referrals 0, parent count 0
** ld 0x89443a0 Response Queue:
* msgid 2, type 100
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 2 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: ldap_int_select
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 2 all 1
postmap: dict_ldap_debug: ber_get_next
postmap: dict_ldap_debug: ber_get_next: tag 0x30 len 16 contents:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 2 message type search-result
postmap: dict_ldap_debug: ber_scanf fmt ({eaa) ber:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 0 new referrals
postmap: dict_ldap_debug: read1msg: mark request completed, ld 0x89443a0 msgid 2
postmap: dict_ldap_debug: request done: ld 0x89443a0 msgid 2
postmap: dict_ldap_debug: res_errno: 0, res_error: <>, res_matched: <>
postmap: dict_ldap_debug: ldap_free_request (origid 2, msgid 2)
postmap: dict_ldap_debug: ldap_free_connection 0 1
postmap: dict_ldap_debug: ldap_free_connection: refcnt 1
postmap: dict_ldap_debug: adding response ld 0x89443a0 msgid 2 type 101:
postmap: dict_ldap_debug: ldap_parse_result
postmap: dict_ldap_debug: ber_scanf fmt ({iaa) ber:
postmap: dict_ldap_debug: ber_scanf fmt (}) ber:
postmap: dict_ldap_debug: ldap_get_values_len
postmap: dict_ldap_debug: ber_scanf fmt ({x{{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt ([V]) ber:
postmap: dict_ldap_debug: ldap_first_attribute
postmap: dict_ldap_debug: ber_scanf fmt ({xl{) ber:
postmap: dict_ldap_debug: ber_scanf fmt ({ax}) ber:
postmap: dict_ldap_debug: ldap_get_values_len
postmap: dict_ldap_debug: ber_scanf fmt ({x{{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt ([V]) ber:
postmap: dict_ldap_debug: ldap_search_ext
postmap: dict_ldap_debug: put_filter: "objectclass=*"
postmap: dict_ldap_debug: put_filter: default
postmap: dict_ldap_debug: put_simple_filter: "objectclass=*"
postmap: dict_ldap_debug: ldap_send_initial_request
postmap: dict_ldap_debug: ldap_send_server_request
postmap: dict_ldap_debug: ber_scanf fmt ({it) ber:
postmap: dict_ldap_debug: ber_scanf fmt ({) ber:
postmap: dict_ldap_debug: ber_flush: 103 bytes to sd 4
postmap: dict_ldap_debug: ldap_result ld 0x89443a0 msgid 3
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 3 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: wait4msg ld 0x89443a0 msgid 3 (timeout 10000000 usec)
postmap: dict_ldap_debug: wait4msg continue ld 0x89443a0 msgid 3 all 1
** ld 0x89443a0 Connections:
* host: 10.63.16.115 port: 389 (default)
refcnt: 2 status: Connected
last used: Mon Mar 21 10:29:21 2011
** ld 0x89443a0 Outstanding Requests:
* msgid 3, origid 3, status InProgress
outstanding referrals 0, parent count 0
** ld 0x89443a0 Response Queue:
Empty
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 3 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: ldap_int_select
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 3 all 1
postmap: dict_ldap_debug: ber_get_next
postmap: dict_ldap_debug: ber_get_next: tag 0x30 len 127 contents:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 3 message type search-entry
postmap: dict_ldap_debug: wait4msg ld 0x89443a0 10 secs to go
postmap: dict_ldap_debug: wait4msg continue ld 0x89443a0 msgid 3 all 1
** ld 0x89443a0 Connections:
* host: 10.63.16.115 port: 389 (default)
refcnt: 2 status: Connected
last used: Mon Mar 21 10:29:21 2011
** ld 0x89443a0 Outstanding Requests:
* msgid 3, origid 3, status InProgress
outstanding referrals 0, parent count 0
** ld 0x89443a0 Response Queue:
* msgid 3, type 100
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 3 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: ldap_int_select
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 3 all 1
postmap: dict_ldap_debug: ber_get_next
postmap: dict_ldap_debug: ber_get_next: tag 0x30 len 16 contents:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 3 message type search-result
postmap: dict_ldap_debug: ber_scanf fmt ({eaa) ber:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 0 new referrals
postmap: dict_ldap_debug: read1msg: mark request completed, ld 0x89443a0 msgid 3
postmap: dict_ldap_debug: request done: ld 0x89443a0 msgid 3
postmap: dict_ldap_debug: res_errno: 0, res_error: <>, res_matched: <>
postmap: dict_ldap_debug: ldap_free_request (origid 3, msgid 3)
postmap: dict_ldap_debug: ldap_free_connection 0 1
postmap: dict_ldap_debug: ldap_free_connection: refcnt 1
postmap: dict_ldap_debug: adding response ld 0x89443a0 msgid 3 type 101:
postmap: dict_ldap_debug: ldap_parse_result
postmap: dict_ldap_debug: ber_scanf fmt ({iaa) ber:
postmap: dict_ldap_debug: ber_scanf fmt (}) ber:
postmap: dict_ldap_debug: ldap_get_values_len
postmap: dict_ldap_debug: ber_scanf fmt ({x{{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt (x}{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt (x}{a) ber:
postmap: dict_ldap_debug: ldap_first_attribute
postmap: dict_ldap_debug: ber_scanf fmt ({xl{) ber:
postmap: dict_ldap_debug: ber_scanf fmt ({ax}) ber:
postmap: dict_ldap_debug: ldap_get_values_len
postmap: dict_ldap_debug: ber_scanf fmt ({x{{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt ([V]) ber:
postmap: dict_ldap_debug: ldap_next_attribute
postmap: dict_ldap_debug: ber_scanf fmt ({ax}) ber:
postmap: dict_ldap_debug: ldap_get_values_len
postmap: dict_ldap_debug: ber_scanf fmt ({x{{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt (x}{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt ([V]) ber:
postmap: dict_ldap_debug: ldap_next_attribute
postmap: dict_ldap_debug: ldap_msgfree
postmap: dict_ldap_debug: ldap_search_ext
postmap: dict_ldap_debug: put_filter: "objectclass=*"
postmap: dict_ldap_debug: put_filter: default
postmap: dict_ldap_debug: put_simple_filter: "objectclass=*"
postmap: dict_ldap_debug: ldap_send_initial_request
postmap: dict_ldap_debug: ldap_send_server_request
postmap: dict_ldap_debug: ber_scanf fmt ({it) ber:
postmap: dict_ldap_debug: ber_scanf fmt ({) ber:
postmap: dict_ldap_debug: ber_flush: 105 bytes to sd 4
postmap: dict_ldap_debug: ldap_result ld 0x89443a0 msgid 4
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 4 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: wait4msg ld 0x89443a0 msgid 4 (timeout 10000000 usec)
postmap: dict_ldap_debug: wait4msg continue ld 0x89443a0 msgid 4 all 1
** ld 0x89443a0 Connections:
* host: 10.63.16.115 port: 389 (default)
refcnt: 2 status: Connected
last used: Mon Mar 21 10:29:21 2011
** ld 0x89443a0 Outstanding Requests:
* msgid 4, origid 4, status InProgress
outstanding referrals 0, parent count 0
** ld 0x89443a0 Response Queue:
Empty
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 4 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: ldap_int_select
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 4 all 1
postmap: dict_ldap_debug: ber_get_next
postmap: dict_ldap_debug: ber_get_next: tag 0x30 len 133 contents:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 4 message type search-entry
postmap: dict_ldap_debug: wait4msg ld 0x89443a0 10 secs to go
postmap: dict_ldap_debug: wait4msg continue ld 0x89443a0 msgid 4 all 1
** ld 0x89443a0 Connections:
* host: 10.63.16.115 port: 389 (default)
refcnt: 2 status: Connected
last used: Mon Mar 21 10:29:21 2011
** ld 0x89443a0 Outstanding Requests:
* msgid 4, origid 4, status InProgress
outstanding referrals 0, parent count 0
** ld 0x89443a0 Response Queue:
* msgid 4, type 100
postmap: dict_ldap_debug: ldap_chkResponseList ld 0x89443a0 msgid 4 all 1
postmap: dict_ldap_debug: ldap_chkResponseList returns ld 0x89443a0 NULL
postmap: dict_ldap_debug: ldap_int_select
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 4 all 1
postmap: dict_ldap_debug: ber_get_next
postmap: dict_ldap_debug: ber_get_next: tag 0x30 len 16 contents:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 msgid 4 message type search-result
postmap: dict_ldap_debug: ber_scanf fmt ({eaa) ber:
postmap: dict_ldap_debug: read1msg: ld 0x89443a0 0 new referrals
postmap: dict_ldap_debug: read1msg: mark request completed, ld 0x89443a0 msgid 4
postmap: dict_ldap_debug: request done: ld 0x89443a0 msgid 4
postmap: dict_ldap_debug: res_errno: 0, res_error: <>, res_matched: <>
postmap: dict_ldap_debug: ldap_free_request (origid 4, msgid 4)
postmap: dict_ldap_debug: ldap_free_connection 0 1
postmap: dict_ldap_debug: ldap_free_connection: refcnt 1
postmap: dict_ldap_debug: adding response ld 0x89443a0 msgid 4 type 101:
postmap: dict_ldap_debug: ldap_parse_result
postmap: dict_ldap_debug: ber_scanf fmt ({iaa) ber:
postmap: dict_ldap_debug: ber_scanf fmt (}) ber:
postmap: dict_ldap_debug: ldap_get_values_len
postmap: dict_ldap_debug: ber_scanf fmt ({x{{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt (x}{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt (x}{a) ber:
postmap: dict_ldap_debug: ldap_first_attribute
postmap: dict_ldap_debug: ber_scanf fmt ({xl{) ber:
postmap: dict_ldap_debug: ber_scanf fmt ({ax}) ber:
postmap: dict_ldap_debug: ldap_get_values_len
postmap: dict_ldap_debug: ber_scanf fmt ({x{{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt ([V]) ber:
postmap: dict_ldap_debug: ldap_next_attribute
postmap: dict_ldap_debug: ber_scanf fmt ({ax}) ber:
postmap: dict_ldap_debug: ldap_get_values_len
postmap: dict_ldap_debug: ber_scanf fmt ({x{{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt (x}{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt ([V]) ber:
postmap: dict_ldap_debug: ldap_next_attribute
postmap: dict_ldap_debug: ldap_msgfree
postmap: dict_ldap_debug: ldap_next_attribute
postmap: dict_ldap_debug: ber_scanf fmt ({ax}) ber:
postmap: dict_ldap_debug: ldap_get_values_len
postmap: dict_ldap_debug: ber_scanf fmt ({x{{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt (x}{a) ber:
postmap: dict_ldap_debug: ber_scanf fmt ([V]) ber:
postmap: dict_ldap_debug: ldap_next_attribute
postmap: dict_ldap_debug: ldap_msgfree
www@H3CMT.COM,www@h3cmt.com,vmail@H3CMT.COM,vmail@h3cmt.com
postmap: dict_ldap_debug: ldap_free_connection 1 1
postmap: dict_ldap_debug: ldap_send_unbind
postmap: dict_ldap_debug: ber_flush: 7 bytes to sd 4
postmap: dict_ldap_debug: ldap_free_connection: actually freed