Author Topic: [Solved] Move emails  (Read 3815 times)

Offline budiantoip

  • Newbie
  • *
  • Posts: 2
[Solved] Move emails
« on: December 19, 2022, 05:57:43 PM »
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?
« Last Edit: December 19, 2022, 06:47:06 PM by budiantoip »

Offline budiantoip

  • Newbie
  • *
  • Posts: 2
Re: Move emails
« Reply #1 on: December 19, 2022, 06:45:30 PM »
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.