Koozali.org: home of the SME Server
Obsolete Releases => SME Server 9.x => Topic started by: john56 on June 19, 2017, 04:22:37 PM
-
Hi,
is there a way to delete the emails for all users ?
Thanks.
-
how many users?
how many emails?
why? :-)
-
for 150 teachers users (i've delete the 550 others school users so that's ok).
of course , I will keep their account and home. But need to clean their emails (not used anymore)
-
I think you could use something like:
pushd /home/e-smith/files/users/; \
for u in `ls | grep -v admin`; \
do \
rm -rf $u/Maildir/*
done; \
popd
NOT TESTED!
If you´re not sure, add an "echo " before the rm -rf line to see the result, copy/paste one sample line and try it! ;)
-
That seems ok to delete with :
pushd /home/e-smith/files/users/; \
for u in `ls | grep -v admin`; \
do \
rm -rf $u/Maildir/*
done; \
popd
pushd /home/e-smith/files/users/; \
for u in `ls | grep -v admin`; \
do \
rm -rf $u/Maildir/*.*
done; \
popd
pushd /home/e-smith/files/users/; \
for u in `ls | grep -v admin`; \
do \
rm -f $u/welcome.msg
done; \
popd
but not for the send messages ... where are they to delete them too ?
-
Hi
This command should be EVEN MORE DESTRUCTIVE:
pushd /home/e-smith/files/users/; \
for u in `ls | grep -v admin`; \
do \
rm -rf $u/Maildir
done; \
popd
I think his will destroy all maildir folders for all users but admin.
Maybe you need a signal-event email-update or something else to recreate it.
Not sure if daemons will reconstruct them if not there or if they'll fail to delivery e-mails.
-
I will keep their account and home. But need to clean their emails (not used anymore)
Some bright advisor said to go for 365 or gma*l email solutions?
-
Hi !
pushd /home/e-smith/files/users/; \
for u in `ls | grep -v admin`; \
do \
rm -rf $u/Maildir
done; \
popd
It works fine with that command (strange no ?)
RequestedDeletion, yes ... school is business too :)
My students and teachers don't really like horde and that mail system ... i don't know why...
Me, i like it because of ldap rules.
-
So, in fact, i have another issue now with cron command
"perl /etc/e-smith/events/actions/purge-junkmail-folders"
Couldn't chdir to junkmail folder of user angotr: Aucun fichier ou dossier de ce type
because there is no more folder Maildir etc ...
How can generate them again ?
-
up