Solved

How to flush mqueue

Posted on 2010-08-16
9
954 Views
Last Modified: 2013-12-18
How can i flush the mqueue from /var/spool/mqueue
do i have to stop any service ....
0
Comment
Question by:apunkabollywood
9 Comments
 
LVL 3

Expert Comment

by:kiitii
ID: 33444246
Flush as in re-submit queue?
You can try to restart the sendmail service, it will re-submit the queue.

# service  sendmail  restart
0
 

Author Comment

by:apunkabollywood
ID: 33444259
I do not want to restart any service ... is there any alternative...
0
 
LVL 9

Accepted Solution

by:
Barry Gill earned 500 total points
ID: 33444392
sendmail -q

that will do it
0
 

Author Comment

by:apunkabollywood
ID: 33444845
is this harmful ...
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 9

Expert Comment

by:Barry Gill
ID: 33444853
no, this simply reloads the queue
0
 
LVL 7

Expert Comment

by:ajay_mhasal
ID: 33444876
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
 

Author Comment

by:apunkabollywood
ID: 33444909
It is showing the error....

Connecting to sap...
Operating system error
0
 
LVL 9

Expert Comment

by:Barry Gill
ID: 33444965
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
 
LVL 9

Expert Comment

by:Barry Gill
ID: 33444979
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

MS outlook is a premier email client that enable you to send and receive the e-mails with various file formats of attachments such as document files, media file, and many others formats. There is some scenario occurs when a receiver of an e-mail mes…
Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
To show how to create a transport rule in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Mail Flow >> Rules tab.:  To cr…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now