hello, this is probably an odd question but I am done testing and will be migrating my existing mail-server from Merak (terrible support, terribly expensive) to NS with SoGo, using imapsync. it works great.
NS is joined to my UCS (univention corporate) domain, not local.
Is there a way to delete all mail from all mailboxes but leave accounts intact??
The not-smart way could be access via IMAP with an email client, and delete all messages. Compact folders and move to the next step.
Maybe there’s a smarter way deleting some sort of data on nethserver filesystem…
I think you can delete emails stored into /var/lib/nethserver/vmail with rm -rf command.
In this directory you can find all accounts folder and for each folder all subfolder of these accounts.
An helpful command could be rm -rf /var/lib/nethserver/vmail/*/.INBOX/* and delete inbox emails for all accounts. Check path and test it, but it should works.
Maybe you can check if it works with mv or cp command by moving or copying to another directory messages.