View Single Post
  #3 (permalink)  
Old 12-03-2007, 09:38 AM
speculatrix speculatrix is offline
Junior Member
 
Posts: 6
Default

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

Last edited by speculatrix; 12-03-2007 at 09:43 AM..
Reply With Quote