0

I have a mail relay server. Customers are using our server to send emails.

The server stores all outgoing and incoming emails in a mailbox folder "/usr/local/atmail/users", the folder structure will be like this:

  • a
    • l
      • alice@email.com
        • cur
        • maildirsize
        • new
        • tmp
  • b
    • o
      • bob@email.com
        • cur
        • maildirsize
        • new
        • tmp

One day, bob configured an incorrect filter in which the emails were sent to the wrong folder, so now the folder structure for bob@email.com becomes like this:

  • b
    • o
      • bob@email.com
        • cur
        • INBOX.invoices
          • cur
          • maildirsize
          • new
          • tmp
        • maildirsize
        • new
        • tmp

All the new emails are now stored in INBOX.invoices/new.

My question is, is it safe to move all of the emails stored in that folder to bob@email.com/new?

Budianto IP
  • 141
  • 6

1 Answers1

0

I've solved this and I'd like to share what I did here, just in case it can be helpful to anyone.

I decided to zip the bob@email.com folder and then started moving 1 email, it was a success. Then I continued moving all the emails.

I think each of the emails is unique, so it’s safe to move emails between folders in the same customer mailbox folder.

Budianto IP
  • 141
  • 6
  • 1
    Almost: depending on the mail server, simply moving files around might lose or confuse additional metadata, such as the custom IMAP flags attached while in the other folder. Always stick to the utilities recommended in the documentation of the IMAP server maintaining that maildir. In the case of Dovecot that usually means `doveadm move` – anx Dec 20 '22 at 01:23