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
- In order to review the Mail logs more efficiently, highlight the necessary emails and affected user mailboxes:
- In Kerio Connect Administration navigate to Logs -> Mail -> right-click on the logs -> Highlighting
- Create a new condition for the search pattern, i.e. Announcement
- Change color and click OK
- The condition can be an email address or subject.
- In Kerio Connect Administration navigate to Logs -> Mail -> right-click on the logs -> Highlighting
- Navigate to the Kerio Connect domain store folder. The defaults are:
- Windows:
C:\Program Files\Kerio\MailServer\store\mail\[domain]
- Linux:
/opt/kerio/mailserver/store/mail/[domain]
- macOS:
/usr/local/kerio/mailserver/store/mail/[domain]
- Windows:
- Stop Kerio Connect.
- Execute the search by email subject or content of the email.
- Linux/macOS:
grep -rin 'search_pattern' *
- Windows:
find "search_pattern" "C:\Program Files\Kerio\MailServer\store\mail\[domain]\*.*"
- Linux/macOS:
- 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.
- Start Kerio Connect.
- Re-index the user mailboxes from which .eml files were deleted. For more information, please refer to Fixing Data consistency issues.
- Disable or delete the configured highlighting.
Confirmation
The necessary messages were deleted from the user mailboxes. The unwanted emails are no longer visible in users' Webmail and other email clients.