Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Delete Old Spam Emails Custom Cron Post 302219672 by plxkarl on Tuesday 29th of July 2008 09:48:19 PM
Old 07-29-2008
Delete Old Spam Emails Custom Cron

Hey Guys,

I've done some research however I got stuck. My goal is to create a cron job that runs every hour and goes through all web accounts on my server and deletes spam emails that are older than 3 days. This is what I came up with:

Code:
0 * * * * find /home/*/mail/*/*/.spam/cur/* -type f -mtime +3 -exec rm{}

HOWEVER Smilie ... when i test just a piece of that command:

Code:
find /home/*/mail/*/*/.spam/cur/* -type f -print |xargs ls|wc -l

I get the pretty "Argument list too long" error. I dont want to proceed setting up that cron job until I'm 100% sure that it is correct and will work on all user accouts with some of them having over 50,000 spam emails in ther .spam/cur folder. Any advice?
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do we delete spam email on mmdf

Please advise on how to delete spam email from mmdf email, and The Unix spec below: System = SCO_SV Release = 3.2v5.0.5 (2 Replies)
Discussion started by: esh
2 Replies

2. UNIX for Dummies Questions & Answers

CRON. How to delete files within a directory

I'd like to delete ALL files on a daily basis within a directory that are over a day old. Anyone know how I can automate this through Cron as I have 146 websites to administer. I've tried... 30 02 * * * /home/myspace/tmp/webalizer -atime + 1\! -type d -exec rm -f {} \; but all i get is an... (1 Reply)
Discussion started by: southoxon
1 Replies

3. UNIX for Dummies Questions & Answers

Cron job to delete files

Hi everyone! I'm sorry, I'm a total noob but would really appreciate any advice or help. I want to create a cron job that would run every hour and would look inside a few different folders. If any new files were created within those folders within the last hour they would be destroyed, but any... (2 Replies)
Discussion started by: jessn
2 Replies

4. UNIX for Dummies Questions & Answers

Cron to delete email help needed

I would like to know if I can place a cron job (and what it might be of course) to delete all the mail in an inbox? Here are the servers specs: Operating systemLinuxService StatusClick to ViewKernel version2.6.28.9Machine Typei686Apache version2.2.11 (Unix)PERL version5.8.8Path to... (2 Replies)
Discussion started by: markmatu
2 Replies

5. Shell Programming and Scripting

Using cron to delete directories 90 days old

We use Solaris 10 x86 and I want to use a cron job to remove directories +90 old. Currently I have the command below but it only cleans the files and keeps the directory. What am I doing wrong? /opt/tesk/batch/kit/archive/* -mtime +90 -exec rm -r {} \: Thank you (3 Replies)
Discussion started by: oh-daa
3 Replies

6. Shell Programming and Scripting

Shell Script to Delete Old Cron Jobs

I have a cron entry to deploy a website portal from a staging server to a series of production servers on a weekly basis. On occasion, a random office worker who knows nothing about Linux let alone cron, will be tasked to update news picks on the staging server and then run a manual deployment... (2 Replies)
Discussion started by: AndrewT
2 Replies

7. Shell Programming and Scripting

How to disable cron emails, but only for logrotate only not for other logs?

Guys, is there a script or command? how to disable cron emails, but only for logrotate only not for other logs (3 Replies)
Discussion started by: kenshinhimura
3 Replies

8. Emergency UNIX and Linux Support

How to prevent emails as spam?

If an email is sent from our application server(running on AIX) to an id that is outside of the organization like gmail etc, and if gmail should not treat the mail as spam, what has to be done from unix level? (7 Replies)
Discussion started by: ggayathri
7 Replies
CLAWS-MAIL-SPAM-REPORT(1)				      General Commands Manual					 CLAWS-MAIL-SPAM-REPORT(1)

NAME
claws-mail-spam-report -- Mail notification using laptop's mail LED DESCRIPTION
This manual page documents briefly the claws-mail-spam-report This manual page was written for the Debian distribution because the original program does not have a manual page. claws-mail-spam-report is a plugin (loadable module) for the Claws Mail mailer. This plugin allows sending reports about received spam messages to online spam harvesters, in order to improve the shared databases of known spam. Support includes two sites: www.signal-spam.fr and www.spamcop.net, and also the Debian lists spam nomination system (http://lists.debian.org/archive-spam-removals/review/). USAGE
Before using a plugin you must instruct Claws Mail to load it on startup. For this you must go ``Configuration'' menu on main window toolbar, open ``Plugins...'' dialog, click on the ``Load plugin...'' button and select the plugin file, named spam_report.so, and press the ``Open'' button. SEE ALSO
claws-mail (1), claws-mail-extra-plugins (1). AUTHOR
claws-mail-spam-report was written by Colin Leroy colin@colino.net This manual page was written by Ricardo Mones mones@debian.org for the Debian system (but may be used by others). Permission is granted to copy, distribute and/or modify this document under the terms of the GNU General Public License, Version 2 any later version published by the Free Software Foundation. On Debian systems, the complete text of the GNU General Public License can be found in /usr/share/common-licenses/GPL. CLAWS-MAIL-SPAM-REPORT(1)
All times are GMT -4. The time now is 03:17 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy