Subscribe to RSS Subscribe to Comments

Programming stuff: Bash, Linux, SQL and Java

how to remove all your messages from mailq with postsuper

say you got 3000 messages in the queue.
you do "# mailq" and see them all.
if you do postsuper -d 232323P443 for each of them you get old before you know it.
here is what I did:

#!/bin/sh
for i in $(mailq | awk ‘/userWithVirus/ {print $1}’); do
#echo $i
postsuper -d $i
done

In my case a user with Outlook just got infected and the piece of junk in his mail client just started to spamm the world
For your case , replace userWithVirus with whatever the users you have on your system.

No comments yet. Be the first.

Leave a reply

*
To prove you're a person (not a spam script), type the security word shown in the picture.
Anti-Spam Image

Based on FluidityTheme Redesigned by Kaushal Sheth Sponsored by Send Flowers