Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 976
  • Last Modified:

How to flush mqueue

How can i flush the mqueue from /var/spool/mqueue
do i have to stop any service ....
0
apunkabollywood
Asked:
apunkabollywood
1 Solution
 
kiitiiCommented:
Flush as in re-submit queue?
You can try to restart the sendmail service, it will re-submit the queue.

# service  sendmail  restart
0
 
apunkabollywoodAuthor Commented:
I do not want to restart any service ... is there any alternative...
0
 
Barry GillChief of StaffCommented:
sendmail -q

that will do it
0
Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

 
apunkabollywoodAuthor Commented:
is this harmful ...
0
 
Barry GillChief of StaffCommented:
no, this simply reloads the queue
0
 
ajay_mhasalCommented:
Hi,

Easiest method to remove the mails from mqueue is

# rm -f /var/spool/mqueue/*

and then restart sendmail service.


other methods are
http://www.brandonhutchinson.com/deleting_mail_queue.html
http://forums11.itrc.hp.com/service/forums/questionanswer.do?admit=109447626+1281959982570+28353475&threadId=1231286
0
 
apunkabollywoodAuthor Commented:
It is showing the error....

Connecting to sap...
Operating system error
0
 
Barry GillChief of StaffCommented:
the command "sendmail -q" fails?
why is it connecting to SAP?

ok, lets step back a bit, why are you trying to flush the queue, what has happened?
OS error tells me you have run out of disk space or else there is something seriously wrong with your configuration.

if "sendmail" is not on your path, then add the path in front of it so you have /usr/sbin/sendmail -q (or something liek that)
what did your logs say when you tried that?
0
 
Barry GillChief of StaffCommented:
also makes me ask: why not do as kiitii says and restart sendmail? it should have no true impact to you at all unless you have larger problems.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now