Re: copy shared folder to user inbox

Michael Menge <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <20250203162235.Horde.J0TNLEGp8RatnsiVmUK2TYE@webmail.uni-tuebingen.de>
Quoting Adam Weremczuk <[email protected]>:

> Hi all,
>
> I'm running an old postifx/cyrus stack (versions 2.9.6 / 2.4.16  
> respectively) on equally ancient Debian 7.
>
> I want to migrate accounts and folders away from that.
>
> Part of the task would be copying existing shared email folders to a  
> regular user's account.
>
> When I later sync that user's emails away via IMAPS import tool, the  
> folders with their content are ported as well.
>
> Copying seems safer and would be preferred vs moving / converting.
>
> Normally I use cyradm -> cm, lam, sam, dam etc. but can't see a  
> suitable command or an example for what I'm trying to achieve.
>
There is no cyradm command to copy a folder. There is only "renm" to  
rename/move a mailbox.
This command is safe as cyrus will use hardlinks if the source an  
destination are on the
same partition/filesystem, and will ensure that the transfer has been  
successful before
the source is removed

To what Server are you migration to? And which "IMAPS import tools" do  
you mean.

If the Desination is an IMAP Server, there are different Tools to  
migrate mails form
one server to another.  E.g.

- IMAPSync https://github.com/imapsync/imapsync
- IMAPCopy https://github.com/layfellow/imapcopy

AFAIK these tools should be able to handle Shared folders, so there  
might not be a
need to copy the shared folder beforehand. If you still need a copy of  
the mails you
could also use these tools to copy the shared folder to a user account.

If the user has read access to the share folder you also could also  
use a Mail Client ore "IMAP commands" (e.g. with cyrus imtest), to  
copy the Mais

====
   c1 CREATE "Copy of Shared Folders/ExampleA"
   c2 SELECT "Shared Folders/ExampleA"
   c3 UID COPY 0:* "Copy of Shared Folders/ExampleA"
====
Commands may require tweaking depending on the "altnamespace",  
"unixhierarchysep" and "sharedprefix"
options in your imapd.conf



Kind regards

    Michael Menge


--
--------------------------------------------------------------------------------
Michael Menge                          Tel.: (49) 7071 / 29-70316
Universität Tübingen                   Fax.: (49) 7071 / 29-5912
Zentrum für Datenverarbeitung          mail:  
[email protected]
Wächterstraße 76
72074 Tübingen


------------------------------------------
Cyrus: Info
Permalink: https://cyrus.topicbox.com/groups/info/T1ce521460365c17a-Mcafd97dfdc49483119b1f1f7
Delivery options: https://cyrus.topicbox.com/groups/info/subscription
smime.p7s (application/pkcs7-signature, 6.5 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.