brainfreeze
New member
- Joined
- Mar 4, 2013
- Messages
- 2
I have a probelm with some of my user has a lot of mail in their system user inbox
And I found this topic
http://help.directadmin.com/item.php?id=433
--------------------------------
#!/bin/sh
#Deletes emails older than this number of days
OLD_THAN_DAYS=30
for i in `ls /usr/local/directadmin/data/users`; do
{
if [ ! -d /home/$i/Maildir ]; then
continue;
fi
rm -f `find /home/$i/Maildir -mtime +${OLD_THAN_DAYS} | grep -E '/cur/|/new/'`
};
done;
exit 0;
--------------------------------
when I ran the commnad it said
/bin/rm: Argument list too long
I think the inbox is too large to delete
has anybody has the same problem and how you fix the script ?
Thank you in advance![Wink ;) ;)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f609.png)
And I found this topic
http://help.directadmin.com/item.php?id=433
--------------------------------
#!/bin/sh
#Deletes emails older than this number of days
OLD_THAN_DAYS=30
for i in `ls /usr/local/directadmin/data/users`; do
{
if [ ! -d /home/$i/Maildir ]; then
continue;
fi
rm -f `find /home/$i/Maildir -mtime +${OLD_THAN_DAYS} | grep -E '/cur/|/new/'`
};
done;
exit 0;
--------------------------------
when I ran the commnad it said
/bin/rm: Argument list too long
I think the inbox is too large to delete
has anybody has the same problem and how you fix the script ?
Thank you in advance
![Wink ;) ;)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f609.png)