I got it working somewhat...... It got all but 2 aliased accounts for me. I can post it here for you for now, and once i've refined it a little (probably over the weekend or next week) post a nice "I know this'll work version". The only problem I have with it is you HAVE to run this code as eith root or zimbra either way it will sudo -u zimbra for parts that require zimbra user do the work. It's ugly, but works.
I've also discovered " zmprov sa mail=*@domain.tld " to get a full list of accounts. Up until now I've been connecting to and querying the mysql database directly. Since this would be used in production I think just querying the ldap would be quicker. It took me about 5 hrs to run through my 1900 accounts (as of this afternoon) and almost doubled the load on my server.
zimbra@mailserv6:~> zmprov sa mail=*@mydomain.com |wc -l
1907
Keeping all of this in mind (and the fact that it did miss 2 or 3 accounts on my server.) If you still want this release posted on the wiki I'll get right on it.
If you want a nice (hopefully more processor friendly) release give me the this weekend and some of next week and I'll see what I can do to improve on it.
Thanks,
Kyle
Last edited by kechols; 09-01-2006 at 03:32 PM..
|