Solved

Delete specific emails from mailq in sendmail server

Posted on 2012-03-20
3
723 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 6

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

Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

Question has a verified solution.

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

Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Fine Tune your automatic Updates for Ubuntu / Debian
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
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

776 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