Score:0

How to import mbox file to Maildir

st flag

I have the following mbox file: /home/incoming/test_data/example_data/.transaction_emails_mbox. I want to move the emails in the mbox file to Maildir at the following directory, where all the user's other emails are: /home/incoming/Maildir/cur/. Here's what I've tried so far:

  1. Using mb2md. After running these commands, IMAP isn't identifying the 12 emails contained in the mbox file. I assume each of the 12 emails should be broken out into a separate file in Maildir/cur/, like the retrieved emails are (files 1665330972.V100009I72061dM278387.c376368dc6f0:2,S and 1665331905.V100008I72061eM806057.c376368dc6f0:2,S) .
root@c376368dc6f0:/# su - incoming 
incoming@c376368dc6f0:~$ mb2md  -s test_data/example_data/ -d Maildir/cur/
. is a directory, but '-R' was not used... skipping
.. is a directory, but '-R' was not used... skipping
convertit(): Converting transaction_emails.mbox in /home/incoming/test_data/example_data/ to /home/incoming/Maildir/cur/.transaction_emails_mbox
destination = .transaction_emails_mbox
Source Mbox is /home/incoming/test_data/example_data//transaction_emails.mbox
Target Maildir is /home/incoming/Maildir/cur/.transaction_emails_mbox 
12 messages.

1 files processed.
incoming@c376368dc6f0:~$ ls -a Maildir/cur/
.  ..  .transaction_emails_mbox  1665330972.V100009I72061dM278387.c376368dc6f0:2,S  1665331905.V100008I72061eM806057.c376368dc6f0:2,S  cur  new  tmp`

  1. Using the commands described in the dovecot wiki. I don't know how to approach that error.
root@c376368dc6f0:/# mail_location=maildir:~/Maildir
root@c376368dc6f0:/# dsync -u incoming mirror mbox:~/mail:INBOX=~/test_data/example_data/
dsync(incoming): Error: Mail locations must use the same virtual mailbox hierarchy separator (specify separator for the default namespace)

Am I totally off track? Any advice is appreciate!

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.