Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.