troubleshooting Question

How to delete specific messages from sendmail queue FROM a certain email address?

Avatar of Chris Kenward
Chris KenwardFlag for United Kingdom of Great Britain and Northern Ireland asked on
Linux SecurityEmail ServersLinux Distributions
3 Comments2 Solutions617 ViewsLast Modified:
I have suddenly had one of my customer Email servers go balistic (possibly compromised) and they use our sendmail server as a relay. We have over 100,000 rubbish messages from them (all from the SAME Email address) in our mail queue. We have been relaying this nonsense for long enough to have been blacklisted on some of the biggies. I urgently need to run something to delete these messages from the queue.

I have always used Webmin for this task but it seems this time there are too many messages in the queue and Webmin simply gasps and dies, not completing the search.

I hope someone can help - we know the FROM address we want to delete. Is there some script I can run on this queue which will delete specific messages with a specific FROM address in the queue? We currently have our server down and are receiving loads of support calls but I cannot put it back up again until we have deleted the messages currently in the queue.

I have disabled reaying from the customer and blocked their IP in the firewall. Now all I need do is get rid of the pesky messages.


Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros