About Us  |  Blog  |  Hosting Partners  |  Legal  |  Portal Login

Welcome Guest ( Log In | Register )

2 Pages V   1 2 >  
Reply to this topicStart new topic
> Clear / Clean Qmail Queue Instantly
MinisterAlan
post Oct 4 2004, 04:46 AM
Post #1


Celery
*

Group: Members
Posts: 26
Joined: 31-March 04
Member No.: 13,059



Clear / Clean Qmail Queue Completely, Safely & Fast.

Here is a quick and easy way to clear all email from the queue.
This will not remove anything it should not remove. It just clears
all email from the queue safely. This is just for qmail.
( Not for use with any other email programs )

Thanks goes to my Friend Zike at RS / EV1.

1) login to your server via ssh
2) su -
3) wget http://wepraisehim.org/qmailclear.sh
5) sh qmailclear.sh or sh ./qmailclear.sh
6) done.

For those that receive oversized file truncting errors.
Use the following more intense script. It take a little
longer but gets the job done.

1) login to your server via ssh
2) su -
3) wget http://wepraisehim.org/qmailclean.sh
5) sh qmailclean.sh or sh ./qmailclean.sh
6) done.

Minister Alan Holden
We Praise Him Ministries
http://www.wepraisehim.com
Go to the top of the page
 
+Quote Post
jay
post Sep 26 2005, 04:53 PM
Post #2


Celery
*

Group: Members
Posts: 39
Joined: 14-April 02
Member No.: 2,053



I appreciate it. Worked very well.
Go to the top of the page
 
+Quote Post
red77
post Sep 27 2005, 07:33 AM
Post #3


Master
***

Group: Members
Posts: 313
Joined: 18-February 05
From: Colombia
Member No.: 15,885



Thank you very much, Very good work.


--------------------
Go to the top of the page
 
+Quote Post
MinisterAlan
post Oct 1 2005, 11:49 PM
Post #4


Celery
*

Group: Members
Posts: 26
Joined: 31-March 04
Member No.: 13,059



Happy it works for you.

Take Care. icon_smile.gif
Go to the top of the page
 
+Quote Post
McFunk
post Oct 5 2005, 07:12 PM
Post #5


Newbie


Group: Members
Posts: 7
Joined: 25-March 05
Member No.: 16,274



Is this normal? Here's what I'm getting when I run the script.

CODE
Clearing the Mail Queue

./qmailclear.sh: line 15: /bin/rm: Argument list too long

./qmailclear.sh: line 19: /bin/rm: Argument list too long

./qmailclear.sh: line 21: /bin/rm: Argument list too long

./qmailclear.sh: line 25: /bin/rm: Argument list too long

./qmailclear.sh: line 27: /bin/rm: Argument list too long

./qmailclear.sh: line 29: /bin/rm: Argument list too long

./qmailclear.sh: line 31: /bin/rm: Argument list too long

./qmailclear.sh: line 33: /bin/rm: Argument list too long

./qmailclear.sh: line 37: /bin/rm: Argument list too long

./qmailclear.sh: line 39: /bin/rm: Argument list too long

./qmailclear.sh: line 41: /bin/rm: Argument list too long

./qmailclear.sh: line 43: /bin/rm: Argument list too long

./qmailclear.sh: line 45: /bin/rm: Argument list too long

./qmailclear.sh: line 47: /bin/rm: Argument list too long

./qmailclear.sh: line 49: /bin/rm: Argument list too long

./qmailclear.sh: line 51: /bin/rm: Argument list too long

./qmailclear.sh: line 53: /bin/rm: Argument list too long

./qmailclear.sh: line 55: /bin/rm: Argument list too long

Info folder clean, clearing mess folder

./qmailclear.sh: line 65: /bin/rm: Argument list too long

./qmailclear.sh: line 69: /bin/rm: Argument list too long

./qmailclear.sh: line 71: /bin/rm: Argument list too long

./qmailclear.sh: line 75: /bin/rm: Argument list too long

./qmailclear.sh: line 77: /bin/rm: Argument list too long


--------------------
.....
Go to the top of the page
 
+Quote Post
McFunk
post Oct 5 2005, 07:13 PM
Post #6


Newbie


Group: Members
Posts: 7
Joined: 25-March 05
Member No.: 16,274



Here are the end results:

CODE
./qmailclear.sh: line 153: /bin/rm: Argument list too long

./qmailclear.sh: line 155: /bin/rm: Argument list too long

Remote folder clean, clearing intd folder

Intd folder clean, clearing local folder

Local folder clean, clearing todo folder

Mail queue cleaned

Re-Start Qmail Now !

Starting qmail:  [  OK  ]

Qmail Started - MinisterAlan

Done !

[root@myserver temp]# /var/qmail/bin/qmail-qstat

messages in queue: 552461

messages in queue but not yet preprocessed: 0

[root@redteam temp]#


--------------------
.....
Go to the top of the page
 
+Quote Post
MinisterAlan
post Oct 5 2005, 09:42 PM
Post #7


Celery
*

Group: Members
Posts: 26
Joined: 31-March 04
Member No.: 13,059



Ok,

This is not a problem.
Your queue is just so large that this small script can't clear it
which doesn't happen very often.

However,
In another posting I have another script but I will post it here too.
It takes a little longer to run but it will clear the queue.

The following is all done from command line ( root )

Do,
wget http://www.wepraisehim.org/qmailclean.sh

Then run, sh qmailclean.sh

DO NOT restart any process, reboot, etc... Until the script says it is done.
If you do, it will break qmail. This script is tried and true safe if you let
it run until complete.

Take Care.

Sincerely,
Minister Alan Holden
Go to the top of the page
 
+Quote Post
vien
post Oct 8 2005, 03:14 AM
Post #8


Newbie


Group: Members
Posts: 17
Joined: 26-July 05
Member No.: 17,727



Hey Pastor (MinisterAlan):
Praise Jesus Men, and am so glad by way you lift him up .. Thanks.

Men, am in trouble ..Lately like 2 weeks my server is not sending emails at all. Till yesterday when it blacked out!!.

Some body did the checking of qmail msgs and am told they are over 70,000 msgs in the queue.

Do you think following your instructions above will help solve the problem without necessarily stoping qmail first?

Should I go ahead and just do what you instructed above?

Thanks and Men, God Be With You.
Go to the top of the page
 
+Quote Post
MinisterAlan
post Oct 8 2005, 07:40 AM
Post #9


Celery
*

Group: Members
Posts: 26
Joined: 31-March 04
Member No.: 13,059



Hi Friend,

Thank you for the kind words.

If the qmailclear.sh script won't clear it. Go ahead an run the qmailclean.sh script.
That's the only way to clean the queue and it really won't take that long.

Please let me know how it goes for you. I'm sure you will send me a good report.

Be Blessed.

Sincerely,
Minister Alan Holden
Go to the top of the page
 
+Quote Post
vien
post Oct 8 2005, 12:53 PM
Post #10


Newbie


Group: Members
Posts: 17
Joined: 26-July 05
Member No.: 17,727



Hi Pastor;
I did run the cleaner and it were successfull. Thanks a Bunch. One more question however, what would these statements mean:

[root@host110 control]# /var/qmail/bin/qmail-qstat
messages in queue: 28
messages in queue but not yet preprocessed: 0

When do I know there are emails failing to be delivered: ie I have a value>0 on [messages in queue but not yet preprocessed:] would messages in queue matter when I wake up one morning and it has 20000?

Am kind of a newbie really in this field.

Thanks otherwise for your help and May The Lord Bless Thee
Go to the top of the page
 
+Quote Post
rkane
post Oct 20 2005, 07:04 AM
Post #11


Newbie


Group: Members
Posts: 1
Joined: 20-October 05
Member No.: 18,604



Do I lose all email in the queue when I run the clean script? I don't want to cause my customers to lose email. But I'm not sure the email are sending properly. I have a queue that is staying pretty steady at 250 messages. How do I know that all my messages are going out like they are supposed to?

Thanks, and god Bless.


I would like to comment that I am happy to have found a community I can post to who will not start a debate becuase I Thank God when he helps me find a solution.
Go to the top of the page
 
+Quote Post
MinisterAlan
post Oct 20 2005, 11:54 AM
Post #12


Celery
*

Group: Members
Posts: 26
Joined: 31-March 04
Member No.: 13,059



Friend.
Amen to you last comment.

If your queue is only at 250 I really don't think you need to clear it.
I will guess you are running plesk.
However, messages that stay in the queue for a long period of time
should be removed as they will never be delivered due to other isp's
not allowing them to be delivered.

If the above is the case, run the qmailclear.sh script every few days
to keep you queue as clean as possible.

May God Bless.

Sincerely,
Minister Alan Holden
WePraiseHim.com
Which is now http://www.funlaugh.com because the name of Jesus
and God were getting bounced back to use as bad laug. found in email.
Such is our world today. GOD Help Us !
Go to the top of the page
 
+Quote Post
MinisterAlan
post Oct 20 2005, 11:57 AM
Post #13


Celery
*

Group: Members
Posts: 26
Joined: 31-March 04
Member No.: 13,059



Friend..
If you have that many emails remaining in the queue.
The are not getting delivered at all. The are just going
to sit there until you clear them.

Best Of Luck.

Sincerely,
Minister Alan Holden
WePraiseHim.com
Which is now http://www.funlaugh.com because the name of Jesus
and God were getting bounced back to use as bad laug. found in email.
Such is our world today. GOD Help Us !
Go to the top of the page
 
+Quote Post
cevilian
post Oct 26 2005, 01:22 PM
Post #14


Newbie


Group: Members
Posts: 4
Joined: 26-October 05
Member No.: 18,675



MinisterAlan,
I looked into the scripts you posted, looks like the scripts will remove all the messages in the queue (am I right?). Is it possible to remove messages that are older than certain age (or meet some other criteria?)?

My queue is full of bounce messages and I dont have qmail-remove. Is qmail-remove installation any different on a shared hosting box?

Thank you
Go to the top of the page
 
+Quote Post
bsucards
post Oct 27 2005, 05:41 AM
Post #15


Newbie


Group: Members
Posts: 4
Joined: 27-October 05
Member No.: 18,685



I have been having similar problems, but have not run your script yet. I am getting a lot of messages sitting in the open que. This has been an ongoing problem with the server. Finally I got someone from support to actually look at it, and here is what they said:


Checking into this problem I have found that the queue for qmail is not being cleared out. I have cleared most of the info out how ever there are still about 1k worth of mail that is in there. We suggest trying to clear out all the mail from the queue to see if this will help on the problem. I also checked over you qmila conf and it looks good. The only other thing I can see that you maybe need to do is set up TXT records in DNS. After all most of the mails that are in the queue are e-mails being returned to send for fallers.



Wanted to see your suggestions on this?
Go to the top of the page
 
+Quote Post
lvalics
post Feb 28 2006, 01:52 AM
Post #16


Celery
*

Group: Members
Posts: 35
Joined: 23-January 05
From: Romania
Member No.: 15,612



A very new solution is in Power Toys, Qmail Manager, you can search after text in message and cleanup only that mails.

http://www.web-hosting-control-panel-addon...ys_for_PLESK/1/ - see here.

In PLESK 8 this will be included.


--------------------
Go to the top of the page
 
+Quote Post
vien
post Mar 1 2006, 02:09 AM
Post #17


Newbie


Group: Members
Posts: 17
Joined: 26-July 05
Member No.: 17,727



You are the boy of the year! thanks man for that notification .. its a great tool I suppose.. though havent gotten to the download link!
QUOTE (lvalics)
A very new solution is in Power Toys, Qmail Manager, you can search after text in message and cleanup only that mails.

http://www.web-hosting-control-panel-addon...ys_for_PLESK/1/ - see here.

In PLESK 8 this will be included.
Go to the top of the page
 
+Quote Post
lvalics
post Mar 1 2006, 08:52 AM
Post #18


Celery
*

Group: Members
Posts: 35
Joined: 23-January 05
From: Romania
Member No.: 15,612



I'n glad you like it, we will add new features soon, just wait PLESK 8 ...


--------------------
Go to the top of the page
 
+Quote Post
omansur
post Mar 17 2008, 10:53 AM
Post #19


Newbie


Group: Members
Posts: 1
Joined: 17-March 08
Member No.: 50,577



QUOTE (MinisterAlan @ Oct 4 2004, 06:46 AM) *
Clear / Clean Qmail Queue Completely, Safely & Fast.
Here is a quick and easy way to clear all email from the queue.
This will not remove anything it should not remove. It just clears
all email from the queue safely. This is just for qmail.
( Not for use with any other email programs )
Thanks goes to my Friend Zike at RS / EV1.
1) login to your server via ssh
2) su -
3) wget http://wepraisehim.org/qmailclear.sh
5) sh qmailclear.sh or sh ./qmailclear.sh
6) done.
For those that receive oversized file truncting errors.
Use the following more intense script. It take a little
longer but gets the job done.
1) login to your server via ssh
2) su -
3) wget http://wepraisehim.org/qmailclean.sh
5) sh qmailclean.sh or sh ./qmailclean.sh
6) done.
Minister Alan Holden
We Praise Him Ministries
http://www.wepraisehim.com

Hi. I tried this and it worked well, but now my Queue is stuck and email is not being delivered to any users. "Messages in queue: 415 not preprocessed, 35 local, 4 remote, 454 total." Any idea? Thanks for the help.
Go to the top of the page
 
+Quote Post
Squire
post Mar 17 2008, 05:48 PM
Post #20


Computer Chip
***

Group: Members
Posts: 682
Joined: 24-November 01
Member No.: 680



Sounds like you didn't stop qmail first omansur. eg service qmail stop You should always stop qmail before trying to clean out the queue, or doing anything with the queue really.

Instructions for rebuilding qmail's queue are in this knowledgebase entry.
Go to the top of the page
 
+Quote Post

2 Pages V   1 2 >
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 22nd November 2009 - 02:56 AM
 

Dedicated Servers

Managed Hosting

Colocation

Business Solutions

Why The Planet?

Contact Us