Re: copy shared folder to user inbox

Michael Menge <[email protected]>
Newsgroups gmane.mail.imap.cyrus
Message-ID <20250205085429.Horde.dRXEXkRgyefDELuFK3E8iyw@webmail.uni-tuebingen.de>
Hi,

Quoting Adam Weremczuk <[email protected]>:

> Hi Michael,
>
> Thank you for the hints.
>
> I'll be migrating mailboxes to Fastmail Business through their web  
> GUI import tool.
>
> It works like a charm when I specify IMAP URL, port (993), username  
> and password.
>
> I've managed to move a shared folder (luckily a tiny test one) by:
>
> cyradm
> sam testfolder testuser lrswipkxte
>

you don't need all rights to "copy" the folder, only "lrs".
See https://datatracker.ietf.org/doc/html/rfc4314#section-2.1

> Then I logged in as testuser to Thunderbird, subscribed to that  
> folder and copied it to inbox.
>
> Despite selecting "copy" (not "move"), the folder was moved on our  
> Cyrus IMAP and now only exists in one user's inbox!
>
> Any idea how to copy rather than move?
>

If you remove "xte" from the acls thunderird will not be able to  
delete the shared folder
or the mails in that folder. So it only can copy the folder


> Is it even possible for Cyrus to make or hold identical copies?

yes cyrus can keep multiple copies of a mail, but (newer versions) will use a
hardlink on the filesystem if possible


>
> Regards,
> Adam
>
>
> On 03/02/2025 15:22, Michael Menge wrote:
>>
>> 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-M19bdc2b0fdc555e939219b4c
> Delivery options: https://cyrus.topicbox.com/groups/info/subscription



--
--------------------------------------------------------------------------------
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-Mdabaa9b59aa6077ac0c164df
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.