Results 1 to 3 of 3

Thread: auto-provision mailboxes in postini service

  1. #1
    speculatrix is offline Junior Member
    Join Date
    Dec 2007
    Posts
    6
    Rep Power
    7

    Default auto-provision mailboxes in postini service

    we've now been running zimbra 4.5.5 on opensuse10.2-x86-32 for a while and been very happy with it.

    we've now made it our primary mail system, using Postini as a filtering and backup-mx service. we have set up the postini account so that it knows all the valid recipients which improves spam rejection.

    postini provide tools for automatically provisioning mailboxes, however, I've not found anything for doing this from zimbra.

    So, I have started writing a script thus:
    (
    /opt/zimbra/bin/zmprov gaa
    /opt/zimbra/bin/zmprov gadl
    ) | sort > recipients.txt


    the problem is there seems to be no tool for getting lists of aliases. Now, I could use this command to get a list of email addresses:
    zmprov sg mydomain mydomain | grep ^email | awk '{print$2}'
    but this won't list any mailboxes that are hidden in the GAL.

    please can someone give me a few hints for this?

    thanks
    Paul

  2. #2
    Rich Graves is offline Outstanding Member
    Join Date
    Jan 2007
    Location
    Minnesota
    Posts
    719
    Rep Power
    9

    Default

    I don't know a resonable zmprov or zmmailbox command for that, but aliases are in LDAP.

    rootsearch 'zimbraMailAlias=*' zimbraMailAlias|grep zimbraMailAlias|awk '{print $2}'

    where rootsearch is

    Code:
    #!/bin/sh
    /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}'` $*

  3. #3
    speculatrix is offline Junior Member
    Join Date
    Dec 2007
    Posts
    6
    Rep Power
    7

    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 10:43 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. From POP3 and 100 scattered mailboxes to Zimbra
    By spiderman in forum Administrators
    Replies: 5
    Last Post: 08-11-2006, 08:00 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •