Solved

Delete specific emails from mailq in sendmail server

Posted on 2012-03-20
3
748 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 7

Accepted Solution

by:
torakeshb earned 500 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

Linux Academy Android App Now Supports Chromecast

We have some fantastic news for our Android fans. We’re so excited to announce that the Linux Academy Android app is now available with Chromecast support. That’s right – simply download the latest update of the Linux Academy App and start casting your favorite course videos!

Question has a verified solution.

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

Resolve DNS query failed errors for Exchange
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
The video tutorial explains the basics of the Exchange server Database Availability groups. The components of this video include: 1. Automatic Failover 2. Failover Clustering 3. Active Manager
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

623 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