Koozali.org: home of the SME Server

Delete specific email across all inboxes

Offline Osqa

  • 2
  • +0/-0
Delete specific email across all inboxes
« 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

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Delete specific email across all inboxes
« Reply #1 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
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!

Offline Osqa

  • 2
  • +0/-0
Re: Delete specific email across all inboxes
« Reply #2 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.

Offline stephdl

  • *
  • 1,523
  • +0/-0
    • Linux et Geekeries
Re: Delete specific email across all inboxes
« Reply #3 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
See http://wiki.contribs.org/Koozali_Foundation
irc : Freenode #sme_server #sme-fr

!!! Please write your knowledge to the Wiki !!!