Solved

Delete specific emails from mailq in sendmail server

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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Linux Scripting 3 103
Fixing Non-Standard characters in text 8 93
Best way to virtualise a remote Linux server 2 52
Video Streaming 6 57
Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Fine Tune your automatic Updates for Ubuntu / Debian
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
The basic steps you have just learned will be implemented in this video. The basic steps are shown to configure an Exchange DAG in a live working Exchange Server Environment and manage the same (Exchange Server 2010 Software is used in a Windows Ser…

863 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

20 Experts available now in Live!

Get 1:1 Help Now