LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Thread Tools Search this Thread
Old 10-29-2009, 12:39 PM   #1
Samael
Member
 
Registered: Oct 2008
Location: England
Distribution: Sabayon, Fedora, Ubuntu
Posts: 51
Thanked: 0
Command for clearing unwanted email from Qmail.


[Log in to get rid of this advertisement]
Hello, I'm currently using the following to delete spam from Qmail:

find /var/qmail/queue/mess/ -type f -exec grep -l -i 'SEARCH CRITERIA' {} \; | xargs rm

What I want to know is; is there a way that I can change it to search for multiple search criteria at the same time? eg: 'unknown sender', 'rolex', 'penis', 'viagra'
windows_xp_2003 Samael is offline     Reply With Quote
Old 10-30-2009, 06:09 AM   #2
slimjim
Member
 
Registered: Apr 2004
Location: east midlands, england
Distribution: Ubuntu 9.04
Posts: 33
Thanked: 0
Quote:
Originally Posted by Samael View Post
Hello, I'm currently using the following to delete spam from Qmail:

find /var/qmail/queue/mess/ -type f -exec grep -l -i 'SEARCH CRITERIA' {} \; | xargs rm

What I want to know is; is there a way that I can change it to search for multiple search criteria at the same time? eg: 'unknown sender', 'rolex', 'penis', 'viagra'

Yes, use egrep.

find /var/qmail/queue/mess/ -type f -exec egrep -l -i 'rolex|viagra|penis' {} \; | xargs rm
linuxubuntu slimjim is offline     Reply With Quote
Old 10-30-2009, 07:33 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Ubuntu Karmic, CentOS 5.4
Posts: 2,746
Thanked: 188
Is not Qmail marking the mails as spam? There is an anti spam that comes with Qmail and very effective as well.
linuxubuntu linuxlover.chaitanya is offline     Reply With Quote

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Find command, eliminating unwanted output swamprat Linux - Newbie 7 04-13-2008 07:28 PM
Terminal Executes unwanted command at openning blames Linux - General 4 12-28-2004 05:16 PM
Clearing KDesktop Run Command Cache toadatrix Suse/Novell 1 10-18-2004 03:05 PM
qmail +qmail-qfilter + qmail-scanner-queue+qmail-user-masq.pl problem countcobolt Linux - Networking 0 07-08-2004 12:29 PM
Filter unwanted Email tomdlam Linux - Security 1 11-10-2001 11:59 AM


All times are GMT -5. The time now is 03:14 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.
Advertisement
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Click Here to receive a complimentary subscription courtesy of LQ.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration