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

x
?
Solved

Delete specific emails from mailq in sendmail server

Posted on 2012-03-20
3
Medium Priority
?
789 Views
Last Modified: 2012-05-03
Hi All,

We use sendmail server on Red Hat Linux Enterprise,
Just found that there were 200 thousand emails in the queue after recovering from a server crash. There are loads of alerts that can be removed and some imp emails which cannot be removed.

is there any way to remove emails by subject or by recipient??

Thanks
0
Comment
Question by:Clement P
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
torakeshb earned 1500 total points
ID: 37741840
I recommend you to flush the mails instead of removing using the command /usr/sbin/sendmail -q -v

To remove specifically.

you can use qtool.pl script located in sendmail source code contrib directory as follows:

Provide the command mailq to get the details of

Then provide the command

./qtool.pl -C /etc/mail/sendmail.cf -d /var/spool/mqueue/h22J321532131231

/var/spool/mqueue/h22J321532131231  is the Q-ID. qtool.pl delete the messages specified by Q-ID
0
 
LVL 2

Author Comment

by:Clement P
ID: 37770104
thanks for the message, i  cudnt find qtool.pl on my server, can i install it or download and use this tool?

many thanks
0
 
LVL 2

Author Closing Comment

by:Clement P
ID: 37923224
Incomplete solution as i cudnt find the way to use qtool
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The new Gmail Phishing Scam going around is surprising even the savviest of users with its sophisticated techniques.
I have written articles previously comparing SARDU and YUMI.  I also included a couple of lines about Easy2boot (easy2boot.com).  I have now been using, and enjoying easy2boot as my sole multiboot utility for some years and realize that it deserves …
To show how to generate a certificate request 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 Servers >> Certificates…
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…
Suggested Courses

916 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