LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
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
 
LinkBack Search this Thread
Old 10-29-2009, 11:39 AM   #1
Samael
Member
 
Registered: Oct 2008
Location: England
Distribution: Ubuntu and Fedora (64-bit)
Posts: 81

Rep: Reputation: 15
Command for clearing unwanted email from Qmail.


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'
 
Old 10-30-2009, 05:09 AM   #2
slimjim
Member
 
Registered: Apr 2004
Location: east midlands, england
Distribution: Ubuntu 9.04
Posts: 48

Rep: Reputation: 15
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
 
Old 10-30-2009, 06:33 AM   #3
linuxlover.chaitanya
Senior Member
 
Registered: Apr 2008
Location: Nagpur, India
Distribution: Cent OS 5/6, Ubuntu Server 10.04
Posts: 4,560

Rep: Reputation: Disabled
Is not Qmail marking the mails as spam? There is an anti spam that comes with Qmail and very effective as well.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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


All times are GMT -5. The time now is 02:17 AM.

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
Open Source Consulting | Domain Registration