Solved

Delete specific emails from mailq in sendmail server

Posted on 2012-03-20
3
718 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
Comment Utility
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
Comment Utility
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
Comment Utility
Incomplete solution as i cudnt find the way to use qtool
0

Featured Post

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Workplace bullying has increased with the use of email and social media. Retain evidence of this with email archiving to protect your employees.
Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
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 >>…
In this video we show how to create a Resource Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: Navigate to the Recipients >> Resources tab.: "Recipients" is our default selection …

771 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

12 Experts available now in Live!

Get 1:1 Help Now