Start a conversation

Mass deleting messages for Multiple accounts

Overview

When there is a need to delete the wrong message for multiple mailboxes, Kerio Connect requires removing the emails from the server-side. The message was mistakenly sent to the wrong local recipients, company employees and it needs to be removed from all mailboxes.

Preconditions

Administrator access to Kerio Connect server and Webadmin

Solution

  1. In order to review the Mail logs more efficiently, highlight the necessary emails and affected user mailboxes:
    1. In Kerio Connect Administration navigate to Logs -> Mail -> right-click on the logs -> Highlighting
      logs1.png
    2. Create a new condition for the search pattern, i.e. Announcement
      logs2.png
    3. Change color and click OK
    4. The condition can be an email address or subject.
  2. Navigate to the Kerio Connect domain store folder. The defaults are:
    1. Windows: C:\Program Files\Kerio\MailServer\store\mail\[domain]
    2. Linux: /opt/kerio/mailserver/store/mail/[domain]
    3. macOS: /usr/local/kerio/mailserver/store/mail/[domain]
  3. Stop Kerio Connect.
  4. Execute the search by email subject or content of the email.
    1. Linux/macOS:
      grep -rin 'search_pattern' *
      eml_files.png
    2. Windows:
      find "search_pattern" "C:\Program Files\Kerio\MailServer\store\mail\[domain]\*.*"
  5. Remove the necessary .eml files (returned after search query) using rm and del commands for Linux/macOS and Windows respectively. Consider backing it up before deletion.

    Note: the necessary file can be identified using Message-ID header from .eml file and Msg-ID from the Mail logs highlighted in step 1.
    msg_ids.png

    msg_ids2.png

  6. Start Kerio Connect.
  7. Re-index the user mailboxes from which .eml files were deleted. For more information, please refer to Fixing Data consistency issues.
    reindex.png
  8. Disable or delete the configured highlighting.
    highlighting.png

Confirmation

The necessary messages were deleted from the user mailboxes. The unwanted emails are no longer visible in users' Webmail and other email clients.

Choose files or drag and drop files
Was this article helpful?
Yes
No
  1. Priyanka Bhotika

  2. Posted
  3. Updated

Comments