LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 05-27-2003, 12:46 AM   #1
RKris
Member
 
Registered: May 2002
Location: UK
Distribution: Mandriva linux
Posts: 152

Rep: Reputation: 15
Question Automatic deletion of spam folder?


Hi,
I am using SpamAssassin to detect spam mails, and use procmail to redirect the detected spam mails to a separate folder.
Now I want to automate a task which will delete the spam mails (sendmail format) in the mail/spam file of every users home directory and send a warning before 7 days of deletion.

How is this possible?

regards
Krishna
 
Old 05-27-2003, 08:21 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 27,451
Blog Entries: 54

Rep: Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893Reputation: 2893
One idea would be to have spam delivered to people's mailbox in the
/home/${LOGNAME}/mail/spam.${WEEKNUMBER} format.
(and maybe link that to /home/${LOGNAME}/mail/spam if users are accustomed to having the mailbox called like that)
Then you could set up procmail to test for an existing /home/${LOGNAME}/mail/spam.${WEEKNUMBER}. If it is a new week the mailbox would not exist, archive the old one, make one, link one, fire off a message at ${LOGNAME} and finally delete the folder that's date --date='2 weeks ago'.

If you don't want to burden the procmail processes with this you could trigger a script easily.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
BASH: how to automate deletion of oldest folder big_mike_jones Programming 18 11-22-2005 02:59 PM
Automatic file deletion Azhrarn Linux - Newbie 5 08-30-2005 05:01 AM
Another question on automatic file deletion Azhrarn Linux - Newbie 1 08-29-2005 11:18 AM
procmail and spam -- do not send out of office auto replay to spam draix Linux - Software 0 12-30-2004 08:35 AM
ROX-filer: file deletion and trash folder woland Linux - Software 0 08-22-2004 11:16 PM


All times are GMT -5. The time now is 10:45 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration