pierre-alain-b / rainloop-nextcloud

Rainloop plugin for Nextcloud
110 stars 37 forks source link

Inform Rainloop-nc users of Snappymail variant better maintained #288

Open pierre-alain-b opened 2 years ago

pierre-alain-b commented 2 years ago

The work here is progressing very nicely: https://github.com/the-djmaze/snappymail/issues/96

@the-djmaze when you think there is a viable and stable snappymail plugin for NC, I propose to release a final rainloop-nextcloud version where the name of the plugin is changed to "Rainloop (deprecated), consider migrating to Snappymail" with a link to the new NC plugin.

What do you think?

scubamuc commented 1 year ago

@pierre-alain-b this is great news. looking very forward to snappymail. please allow simple automated migration, especially for Nextcloud-snap users where direct access to "data" is complicated.

pierre-alain-b commented 1 year ago

That's a very good comment!

@the-djmaze, I've tried to just move the rainloop_storage folder as an appdata_snappymail with no success... Do you have a clue on what was changed between the local storage of Rainloop and snappymail? Is there a way we could make the migration easy in your mind?

the-djmaze commented 1 year ago

You or SnappyMail might could do this:

$dir = \rtrim(\trim(\OC::$server->getSystemConfig()->getValue('datadirectory', '')), '\\/').'/appdata_snappymail/';
if (!\is_dir($dir)) {
    \mkdir($dir);
    $rainloop = \dirname($this->appManager->getAppPath('snappymail')) . '/rainloop/app/data';
    $rainloop = $this->appManager->getAppPath('rainloop')) . '/app/data';
    if (\is_dir($rainloop)) {
        $iterator = new \RecursiveIteratorIterator(
            new \RecursiveDirectoryIterator($rainloop, \RecursiveDirectoryIterator::SKIP_DOTS),
            \RecursiveIteratorIterator::SELF_FIRST
        );
        foreach ($iterator as $item) {
            if ($item->isDir()) {
                \mkdir($dir . DIRECTORY_SEPARATOR . $iterator->getSubPathname());
            } else {
                \copy($item, $dir . DIRECTORY_SEPARATOR . $iterator->getSubPathname());
            }
        }
    }
}
pierre-alain-b commented 1 year ago

Basically the idea is "just" to copy the file tree of rainloop into snappymail or is there anything to tweak?

the-djmaze commented 1 year ago

just copy does not work.

  1. plugins are incompatible (needs extra coding)
  2. cache should not be copied
scubamuc commented 1 year ago

copy file tree of rainloop into snappymail

grafik

the-djmaze commented 1 year ago

@scubamuc you're almost right. I've added concept of the code in above commit. This doesn't copy directories named plugins nor cache and makes a list of the plugins to install later on.

pierre-alain-b commented 1 year ago

This looks great! Do you want to call it when doing the initial deployment of snappymail in nextcloud or to have a button in the admin part to trigger it?

scubamuc commented 1 year ago

@pierre-alain-b would you make the button disappear once it has been triggered, since it is a "one-time" action?

the-djmaze commented 1 year ago

Try: https://github.com/the-djmaze/snappymail/releases/tag/v2.19.2

scubamuc commented 1 year ago

@the-djmaze i'm afraid the last build (2.19.2) has an issue with account credentials.... authentication fails and there is no way to retrieve the password for admin. Any ideas?

the-djmaze commented 1 year ago

Did you try uninstall and install again?

scubamuc commented 1 year ago

yip, tried several times on different instances... fails on -snap and hosted, using different browsers and private mode, same authentication error.

scubamuc commented 1 year ago

uninstlled rainloop on hosted NC instance with the goal of fresh install and configuration of snappymail. it seems a "fresh" installation is not possible if rainloop app data is left on the instance. still no admin password visible on various browsers and clean cache. will try removing app data directory completely so that a clean-fresh installation can be tested. possibly an issue in migration on v2.19.2? installation and manual migration in v2.191 was possible. admin passwd was displayed correctly.

relikd commented 1 year ago

I know, the API is deprecated, but could you please re-enable the user settings page? I still need to manage the accounts for my users and the last version made that impossible. I am already transfering the accounts to SnappyMail, however in some regards SnappyMail is stil not stable and leaks user data to other accounts (log out and impersonate does not logout snappymail). In the current state I cannot move to snappy, sadly...