LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-02-2008, 07:17 AM   #1
ssilayaraja
Member
 
Registered: Aug 2003
Location: chennai
Posts: 115

Rep: Reputation: 15
script for deleting spam mails


i have configured fetchmail+procmail+spamassassin for 70 users in centos5 box in my office it is working well all the spam mails are stored in spam folder in user home dir in maildir format like (/home/users/mail/.spam/cur|new|tmp ) folder. it is increasing disk space. so i want a single script to delete spam mails periodically. is this possible
 
Old 07-02-2008, 07:34 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If you already know shell you could try converting pseudo code like:

"find /home/directory and type directory and maximum depth is 1 and while read userhome; do
find userhome and type directory and caseinsensitive name [regex matches spam] and while read foldername; do
remove folder; create folder and chmod && chown it to the userid. (done; done)"

or

"find /home/directory and type directory and maximum depth is 1 and while read userhome; do
find userhome and type directory and caseinsensitive name [regex matches spam] and while read foldername; do
find foldername and type file and while read file; xargs remove file. (done; done)"

else post whatever you tried to script and we could comment on that.

Last edited by unSpawn; 07-02-2008 at 07:36 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to delete spam mails sachin1361 Linux - Enterprise 1 03-08-2008 09:30 AM
Setting in amavisd For SPAM mails. combilli Linux - Software 1 07-15-2007 09:30 PM
Problem Deleting E-mails With Postfix xauron Linux - Networking 1 11-18-2004 08:25 AM
Mozilla 1.6 not deleting IMAP e-mails bitpicker Linux - Software 2 06-18-2004 12:47 AM
Scripts to filter spam mails grubjo Linux - Software 2 04-14-2003 12:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:08 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration