Another option is https://github.com/imapsync/imapsync On 2020-10-16 15:44, Ian Batten via Info wrote:
Create a new mailbox. Copy the files into it. Reconstruct it. If you want to put it into existing mailboxes, write a script to rename them starting at n+100 where n is the largest filename in the mailbox and +100 is to deal with deliveries while your script is running. Then reconstruct the mailbox to pick up the messages inserted. In general, a directory containing messages will, if reconstructed, turn into a mailbox. ian On 16/10/2020, 09:26, "David Moyes" <info-cyrus@xxxxxxxxxxx> wrote: I have an old server that was started by accident and it has received a number of messages instead of the new server. I want to move those messages to the new server. I can tar up the messages with something like: $ cd /path/to/cyrus/mail/j/user/joe $ find . -type f -newermt "2020-09-01" \! -name '*.index' \! -name '*.cache' -exec tar -rvf /somewhere/messages.tar {} \; So I end up with an archive of cyrus messages with file names like ".12345". I thought I might be able to pump them in using "deliver" but that goes through the lmtp server, so requires an envelope which I don't have. It would also be a faff to connect to it because it's nailed down to allow connections from the Postfix server only and requires auth (LMTPSA). I can use Postfix "sendmail" to drop them into Postfix "maildrop" and it works great, except that duplicates aren't detected. The "Message-ID" is the same but there is an inserted "Resent-Message-Id" header at the bottom of the headers (immediately before the blank line separating the body). It is clear this relates to my use of sendmail (the id contains today's date and time and my domain). $ sendmail -t joe < .12345 I'll probably just do this (and accept potential duplicates) if I can't find a better method. Is there a way I can pump these message files directly into my Cyrus imap server ? Thanks, David
------------------------------------------ Cyrus: Info Permalink: https://cyrus.topicbox.com/groups/info/Tf73c97bc3b966c1d-Mec30fb066f08bd5f7bd5bc49 Delivery options: https://cyrus.topicbox.com/groups/info/subscription