LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-17-2004, 09:20 AM   #1
macnut
LQ Newbie
 
Registered: Sep 2004
Posts: 18

Rep: Reputation: 0
Cleaning Mail Queues in Qmail


A hypothetical situation, but one that comes up now and then at the ISP where I work:

You've got a Redhat Linux 7.1 server running compatible version of qmail (if the answer varies by version, please say so) and it's being overwhelmed by spam, so much so that other users of the server are having a hard time sending/receiving email.

We'll assume that you'll be hardening the server or booting the offending spammer user shortly, but first you've got to get rid of the thousands of spam messages so normal email can get through. How do you do it? Step by step if you don't mind.
 
Old 10-17-2004, 09:33 AM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 79
You could try this:
http://sourceforge.net/projects/qmhandle/

There is also a web based program but I can't fidn the url for some reason.
 
Old 10-18-2004, 08:43 AM   #3
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
Before you try cleaning the queue, how many do you have in there?

Run and post...
/var/qmail/bin/qmail-qstat

What spam control methods are you currently using? Have you applied any patches to qmail to help control spam?

I'm a firm believer that you should not mess with the queue unless you absolutely must. The queue is self-cleaning. It will keep trying to deliver messages until the queuelifetime has been reached and then it will try one last time and then bounce the message to the postmaster if it's still undeliverable. This means you should never have to clean the queue.

If you want to empty the queue, you can use qmHandle, as David suggested, but in any case, I have learned that messing with the queue contents (even using qmHandle) is a bad idea and can lead to more problems that it solves.
 
Old 10-24-2004, 03:01 PM   #4
macnut
LQ Newbie
 
Registered: Sep 2004
Posts: 18

Original Poster
Rep: Reputation: 0
Sorry it took so long to reply, I've been busy offline...

Anyway, I'm not 100% familiar with the spam control methods/patches applied, as I didn't set up the servers in the first place-I think my ISP uses an outsourced spam control service. I don't think there's any anti-spam software installed on the servers themselves-if there is, it doesn't seem to be working very well. I also think a big part of the problem is certain customers may be using their accounts to send spam through the servers.

By the time the queue gets so loaded down that intervention seems to be required, there may be thousands to tens of thousands of messages backed up. I would prefer to leave it alone and let it sort itself out, but when customers start complaining about missing email, I have few options.

BTW thanks for the link to that Qmail guide-I'm sure I'll find it quite useful.
 
Old 10-24-2004, 03:55 PM   #5
Donboy
Member
 
Registered: Aug 2003
Location: Little Rock, Arkansas
Distribution: RH, Fedora, Suse, AIX
Posts: 736

Rep: Reputation: 31
>> certain customers may be using their accounts to send spam through the servers.

Well, let's see what kind of spam control methods you have in place...

I'd start by checking out rblsmtpd to stop spam:

http://www.linuxquestions.org/questi...light=rblsmtpd

If you're using this, it will help to stop a great deal of spam at the door.

You should also check to see if you have qmail-scanner installed. At the prompt, enter...

ls -l /var/qmail/bin/qmail-scanner-queue.pl
-rwsr-xr-x 1 qscand qscand 109384 Aug 25 12:09 /var/qmail/bin/qmail-scanner-queue.pl

If you have it, that's good. If not, I think I woudl recommend installing a qmail server with a lot more features. These days, a standard vanilla installation of qmail just ins't enough to maintain a production server for a lot of users. Check the link in my signature for a great qmail howto that has all the bells and whistles you need to run a good system. Or you can also try qmailrocks.org for a good howto. This will get you some good spam control methods in palce (qmail-scanner + ClamAV + Spamassassin) which helps a great deal. Once you have all of these in place, you can modify your installation to begin scanning your OUTGOING mail with the same tools. This will help you to more easily identify and tag who among your customers is behaving improperly. You'll also have some good logging tools (qmailAnalog + qmail MRTG) so you can see how much outgoing bandwidth you're using. This will also help you identify who on your local network is causing you trouble.
 
  


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
POSIX message queues(Solaris) to SYS V message queues(Linux) devershetty Programming 1 01-22-2007 10:15 AM
Qmail problem: ISP mail and virtual mail, "sorry no mailbox, here by that user" barryw Linux - Networking 7 05-28-2005 12:43 PM
Flushing mail queues using finger lapthorn Linux - General 0 08-06-2004 07:57 AM
qmail +qmail-qfilter + qmail-scanner-queue+qmail-user-masq.pl problem countcobolt Linux - Networking 0 07-08-2004 11:29 AM
qmail log says mail delivered, mail nowhere to be found svartrev Linux - Software 0 03-24-2004 05:12 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:05 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