how to mass delete after a hacked mail?

Sean Greenslade sean at seangreenslade.com
Fri Sep 16 23:30:53 UTC 2016


On Sat, Sep 17, 2016 at 09:03:48AM +1000, voytek at sbt.net.au wrote:
> I had a hacked user account resulting in several thousand bounces back to
> that email inbox, account now corrected, but, how can I mass delete
> bounces with say subject like:
> 
> "Undelivered Mail Returned to Sender"
> (by from ? ""Mail Delivery System" <MAILER-DAEMON at emu.sbt.net.au>")
> 
> or what other ways to clean the mess ?
> 
> thanks,
> 
> V

Easiest way for a one-time thing is to use an IMAP client. I like mutt,
so in mutt, I would connect to the account, then run a limit command (l)
like so:

~s "Undelivered Mail Returned to Sender"

(or perhaps limit by From, or both)

Then manually check over the results to make sure it hasn't trapped
anything important, then tag and delete the whole set.

--Sean



More information about the dovecot mailing list