Occasionally a user will receive so much email that it blows the file system limit for a domain. This can be because they haven’t picked up their mail for a while or the domain has fallen into disuse. Usually when you tell the user they have 6,000 emails to go through they start to cry! You as an administrator can help reduce the number. Generally speaking most of the emails will be spam. Here is a quick clean up program that will find and delete all the mail messages with a subject starting with “*****SPAM". These emails have been tagged by SpamAssassin as junk mail.
cd /var/qmail/mailnames/example.com/firstname.surname/Maildir/new ls | while read file do sub=`grep '^Subject: \*\*\*\*\*SPAM' "$file"` if [ "$sub" != "" ] then echo "$file : $sub" rm -f "$file" fi done
No feedback yet
Form is loading...