thanks for that... eek, the output is a bit raw... so here's my scriptlet to extract the right things.
Code:
DOMAIN='@example.com'
/opt/zimbra/openldap/bin/ldapsearch -LLL -x -D"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_userdn | \
awk '{print $3}'`" -w"`/opt/zimbra/bin/zmlocalconfig -s zimbra_ldap_password | \
awk '{print $3}'`" -H `/opt/zimbra/bin/zmlocalconfig ldap_url | \
awk '{print $3}'` $* | \
grep ^mail | \
grep "$DOMAIN" | \
awk '{print $2}' | \
sort This definitely does get all the valid recipients (note, I put the '@' in the domain grep because we also use subdomains - e.g.
fred@test.example.com for testing), so now I'll have a go at postini auto-prov hacking.
cheers
Paul