A small problem with mail

NethServer Version: 8
Module: mail

Hello

I made a typo and imported mails from the wrong mail account into NS8 (So far without any productive mail). The import was done via imapsync.

Now, I need to empty this mail account - or provide the user with an empty mbox file or whatever is used in the background.

The GUI doesn’t offer any such options, only a restore from backup.
As mail is not productive, there are no usable backups for this.

I assume this would be a simple issue, probably starting with runagent -m mail1, but I’m not sure where to find the mailboxes…

Any ideas / tips / hints?

My 2 cents
Andy

The mailboxes are in /var/lib/vmail in the dovecot container or as root accessible in /home/mail1/.local/share/containers/storage/volumes/dovecot-data/_data/

3 Likes

Thanks, that worked!

My 2 cents
Andy

1 Like

I’m happy you found a solution.

For similar cases, it could be possible to open the mailbox with IMAP master user credentials and expunge all messages. This approach shouldn’t require the command line and fiddling with absolute paths in the filesystem. See Mail — NS8 documentation.

This “solution” shouldn’t require CLI, agreed. But it does need a working Mail Server, including retrieval method like IMAP, which isn’t yet the case here.

An additional issue is the fact that this server runs as “international”, using a .com official domain.
Mail, on the other hand, will use a national domain. I do not yet have the DNS entries needed to make this working (yet).

Otherwise I could also have used Roundcube to erase all mails and the trashcan of that user…

My 2 cents
Andy

1 Like