Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: Osqa on June 12, 2015, 12:50:36 PM

Title: Delete specific email across all inboxes
Post by: Osqa on June 12, 2015, 12:50:36 PM
We've recently had a malicious mail sent out to all our inboxes on SME Server. Is it possible to have that specific email deleted across all user inboxes? If so how can it be done?

Thanks
Title: Re: Delete specific email across all inboxes
Post by: stephdl on June 12, 2015, 12:55:35 PM
Emails are in the user's folders in /home/e-smith/files/users maybe you can use a find/grep command and remove them automatically
Title: Re: Delete specific email across all inboxes
Post by: Osqa on June 12, 2015, 03:57:00 PM
Thanks stephdl,

Code: [Select]
grep -r -l 'Text_String_To_Search' /home/e-smith/files/users/user_name/Maildir/cur | xargs rm -f
Has worked.
Title: Re: Delete specific email across all inboxes
Post by: stephdl on June 12, 2015, 07:01:12 PM
does someone has another version of this command line, that should be good to write it in the 'useful command', thanks for your return Osqa