Avatar of Chris Kenward
Chris Kenward
Flag for United Kingdom of Great Britain and Northern Ireland asked on

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

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.

Thanks
Chris
Linux DistributionsEmail ServersLinux Security

Avatar of undefined
Last Comment
Chris Kenward

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
legolasthehansy

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
SOLUTION
rabbid_dog

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Chris Kenward

ASKER
Hey there, rabbid_dog

Would this actually delete all messages from that address which were in the queue? Would sendmail have to be running to achieve this or could we stop the sendmail service and then issue the command on its own?

Also, if it was all messages addressed TO: a specific address what would the command be then?

Cheers
Chris
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck