Someone recently said our server email queue contains very old email and that we should flush it. This is probably an easy proceedure, I am not sure how to do it?
Someone recently said our server email queue contains very old email and that we should flush it. This is probably an easy proceedure, I am not sure how to do it?
Theoreticaly the following should work:
exim -qff
It doesn't always do very much. If you're using MailScanner, also try:
exim -qff -C /etc/exim_outgoing.conf
Jonathan Michaelson
Need your cPanel servers secured and tuned?
cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
http://www.configserver.com
Thanks, but does this flush the entire queue? Live/current email and all? Or just the really old/dormant stuff?
There's also a nice script here that will give you a little control over what you flush...
WHM Clean Mail Queue script
I like that script.Originally Posted by verdon
![]()
I thought you mightIt's a nice script.
FYI... I found a nice tip here that helped me put the script in the add-ons section of WHM nicely and properly. I only had to add a couple lines to the script near the top...
...and rename the script to addon_PWScleanmailqueue.cgiCode:#WHMADDON:cleanmailqueue:Clean Mail Queue BEGIN { push(@INC,"/usr/local/cpanel"); push(@INC,"/usr/local/cpanel/whostmgr/docroot/cgi"); }
...and change the post url at line 106 to match the new name
Now the script is where I want it in WHM, and the link to it has not been lost in cPanel/WHM updates.
I know. That's what I'm working on, when I get a bit of free time. I'm going to switch all my WHM scripts to that and once the switch is made, all WHM scripts will be members only ones. I think I may actually have time to do that this weekend.![]()
Originally Posted by verdon
My mail queue now has over 750 messages "frozen" in it. If I attempt to deliver any of them automatically or manually, I get the reason why they have not gone through (user unknown, invalid recipient, etc) but WHY can't I force the mails all the way out so that the SENDER receives back a message as to why it failed or rejected? If I delete the queue, the sender's (my clients) will assume their mails were delivered.
Am I correct?
If you delete messages in the queue, the sender thinks it was sent and the recipient never gets it, but 99% of messages in the queue for more than a few days are either spam with invalid return addresses, or going to an account that is over it's limit.
With my "clean mail queue" script, you can delete all emails over 3 days old which is pretty safe.
the more important question is why do you have so many in the queue to begin with? I never have more than a few stuck in the queue. This number suggests that somebody is spamming through you server, or these is some other weakness in your setup.
Originally Posted by verdon
A fair amount of clients forward their emails off to another account, say their ISP. This means that spam intended for that recipient is forwarding off as well. I did look at many mails and see this dilemma. The new receiving server does perceive some of these forwarded mails as spams, and says "no, thank you." I have no trouble deleting those.
BUT, I do see some valid error messages that should go back to the sender, say invalid recipient. ALSO, all of the mailman lists stopped getting any bounces recently. I am trying to see if this issue is connected. I see "bad" test addresses we have been testing on mailman lists stuck in the queue.
I was getting a lot of those too, until I switched to mailscanner. If you're not enabling scanning by default on domains, then strongly encourage users to start doing so. Also, I've found that 99.9% of the stuff flagged as low-level (likely to be) spam is indeed spam, so except in a very few cases, I just have that deleting and not being delivered or forwarded.Originally Posted by innsites
I'm sorry I can't remember the exact reference, but there is a post in these forums that discusses get mail sent as nobody@host.com (what many webscripts will do) identified as what user it actually was and therefore getting bounces properly delivered.BUT, I do see some valid error messages that should go back to the sender, say invalid recipient. ALSO, all of the mailman lists stopped getting any bounces recently. I am trying to see if this issue is connected. I see "bad" test addresses we have been testing on mailman lists stuck in the queue.
Good luck,
One more thing, some of those invalid recipient bounces may also be from fwd'ed spam bouncing. I know a couple instance for sure where the recipient is valid, but spam sent to that address will bounce with an invalid recipient error.
Last edited by verdon; 01-29-2006 at 12:59 PM.