[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [SOLVED] Re: Ldap browsing script



Yes your solution is similar the one I found here :
http://www.zimbra.com/forums/administrators/22998-automated-ad-users-sync-script.html

I work on a mail server with postfix, procmail, amavis, spamassassin,
dovecot.
The authentication is base on a ldap server on another host.
The users maildir are hosted on the mail server.
The problem is to easily create the users maildir :
- at mail reception ? I don't know if it's possible
- at mail consultation (squirrelmail + dovecot) ? I was unsuccessfull

I choose to write a script that :
- list ldap users to file1
- list homedir to file2
- diff file1 and file2
- add new users homedir+maildir
- delete old users homedir+maildir

I don't know if it's a good solution but it'll be ok for me.

Philippe


Le Tuesday 28 April 2009 14:09:33 Javier Barroso, vous avez écrit :
> On Tue, Apr 28, 2009 at 1:50 PM, Eduardo M KALINOWSKI
>
> <eduardo@kalinowski.com.br> wrote:
> > On Ter, 28 Abr 2009, Philippe Le Gal wrote:
> >> Probleme solved.
> >
> > You might want to tell the list how you did that, in case other people
> > have a similar problem and could benefit from the solution.
>
> A simple solution is:
>
> function create_home
> {
> ...
> }
> function create_maildir
> {
> ...
> }
> for uid in $(ldapsearch -x -h ldap -bdc=example,dc=com uid | awk
> '/^uid/ {print $2})
> do
>      create_home $uid
>      create_maildir $uid
> done
>
> Perhaps better having pam_mkhomedir installed


Reply to: