#!/bin/bash
user=""
cd /var/spool/mail
for user in `ldapsearch -x -b "ou=user,ou=login,dc=l-penguin,dc=idv,dc=tw" | egrep 'uid\:' | awk '{print $2}'`
do
        if !([ -f ${user} ]); then
                touch ${user}
                chown ${user}.mail ${user}
                chmod 660 ${user}
        fi
done
