i am running qmail-ldap with courier and php with horde's imp as the webmail frontend.
i have a situation where i need to delete a user account once he resigns from the company. it involves two operations: a) delete user account in ldap database b) delete user directory in /var/qmail/maildirs/username part a) is ok which i accomplished with a simple php script. however part b) poses a problem, which i need help here. i am thinking of doing part b) by inserting extra commands in custom_dirmaker shell script. the script will check for the existence of ~/username. if exists, then it will delete it first, b4 creating a new one. BUT, it does *not* work. can sombody help me to troubleshoot the script below. nb: i have tested it from the command prompt and it works fine. ---- custom_dirmaker ---- #!/bin/sh if [ -d $1 ] then /bin/rm -rf $1 logger "$1 exists, so I delete the whole directory" fi #Then we create $1 logger "Creating Maildir/ for $1" mkdir -m 700 -p $1 ------------------------- -- roger __________________________________________________ Do you Yahoo!? Yahoo! Web Hosting - establish your business online http://webhosting.yahoo.com
