Improve company productivity with a Business Account.Sign Up

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 988
  • Last Modified:

How to flush mqueue

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

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

that will do it
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

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

Easiest method to remove the mails from mqueue is

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

and then restart sendmail service.

other methods are
apunkabollywoodAuthor Commented:
It is showing the error....

Connecting to sap...
Operating system error
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?
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.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

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