Closed pemocarlo closed 1 year ago
Firt of all, thank you for this rewrite of the Rainloop app, it is really needed.
Thanks for the heads up
Is your feature request related to a problem? Please describe. I have been using Rainloop with Nextcloud. In my opinion, it is the best email option available. Nevertheless, the integration between the two is currently less than perfect.
Describe the solution you'd like Have a better integration with Nextcloud
Well, that's the problem. I have no time to make a better integration (maybe someone else does). So why have a half-baked integration? It's easier to have a standalone webmail and a link in Nextcloud to it. Because when it's integrated, people will request features and someone has to create them, like:
We're about to switch 600 users from Exchange/Outlook to Nextcloud/rainloop, but a snappymail Nextcloud app should be greater. Is it complicated to reproduce the rainloop-nextcloud app with SnappyMail ?
@the-djmaze Thank you for your reply!
I completely agree with you that having a half-baked integration is not ideal. I guess that a Nextcloud integration fits better in a plugin. I might give it a try, but I am kind of a beginner. Do you have some basic instructions on how to create a development environment for snappy mail?
I might give it a try, but I am kind of a beginner.
For that i've started a branch named OwnCloud https://github.com/the-djmaze/snappymail/tree/OwnCloud In there i made some changes to the source and a plugin. https://github.com/the-djmaze/snappymail/commit/6e26c767c31b6edb51a6393155db13a3f20c66f9
Do you have some basic instructions on how to create a development environment for snappy mail?
Read https://github.com/the-djmaze/snappymail/blob/master/CONTRIBUTING.md
Then git checkout OwnCloud
And get https://apps.nextcloud.com/apps/rainloop as example
P.S. i've downloaded it and see that owncloud is different from nextcloud these days.
I will wrap up some basic code so you have a better start.
Thanks for this!
P.S. i've downloaded it and see that owncloud is different from nextcloud these days.
Yes, indeed, Nextcloud is a fork of Owncloud, which started back in 2016. I guess they still share most of the code base, but they will definitely continue diverging
Rainloop mail has some default options to add attachments to owncloud, dropbox, etc. I haven't tried snappy mail yet, but from what I've read, you removed all the related code.
In that case, do you think about adding something similar, in this case to Nextcloud, but better as a plugin?
but better as a plugin?
@carlosperezm i've modified and put the NextCloud code of pierre alain in the branch. You can start with that to make the plugin and integration better. The plugin is in /plugins/nextcloud
If I can make 3 wishes to developers of Snappymail/Nextcloud app(s) :
That would be awesome !
I've forgotten a 4th wish : be able to insert .ics attachments in the Nextcloud calendar !
@the-djmaze
nextcloud integration plans is great news! thank you for your fantastic work!
The code is merged into master https://github.com/the-djmaze/snappymail/tree/master/integrations/nextcloud/snappymail
You can use that to further develop the integration. I can't because i don't have NextCloud nor OwnCloud
I've installed NextCloud 22.1 locally to see if i can do something. First i need to report something to them thru HacherOne
Any news on nextcloud rainloop integration with add attachments feature? Thanks.
Work in progress here : we were able to add a button into the compose window and, using the Nextcloud Filepicker project, it opens a dialog box where we can select one or more files in Nextcloud and generate and copy the link(s) in the message body. TO DO : authenticate the nextcloud user with oauth2 (auth is hardcoded for now)
Stay tuned !
@Mer0me
TO DO : authenticate the nextcloud user with oauth2 (auth is hardcoded for now)
I've modified the way how Login() on SMTP, IMAP & Sieve are processed. And added SASL support for OAUTHBEARER (RFC 7628) and the old XOAUTH2.
Example plugin code mockup for v2.8+:
<?php
class LoginOAuth2Plugin extends \RainLoop\Plugins\AbstractPlugin
{
const
NAME = 'OAuth2',
VERSION = '1.0',
RELEASE = '2021-10-22',
REQUIRED = '2.8.0',
CATEGORY = 'Login',
DESCRIPTION = 'IMAP, Sieve & SMTP login using OAuth2';
public function Init() : void
{
$this->UseLangs(true);
$this->addJs('LoginOAuth2.js');
$this->addHook('imap.before-login', 'ImapLogin');
// $this->addHook('smtp.before-login', array($this, $oSmtpClient, &$aCredentials));
// $this->addHook('sieve.before-login', array($this, $oSieveClient, &$aCredentials));
}
public function ImapLogin(\RainLoop\Model\Account $oAccount, \MailSo\Imap\ImapClient $oImapClient, array &$aCredentials) : void
{
$sPassword = $aCredentials['Password'];
$aTokens = \json_decode($sPassword);
$sAccessToken = !empty($aTokens[0]) ? $aTokens[0] : '';
$sRefreshToken = !empty($aTokens[1]) ? $aTokens[1] : '';
if ($sAccessToken && $sRefreshToken) {
$aCredentials['Password'] = $this->refreshTokenCallback($sAccessToken, $sRefreshToken);
$aCredentials['UseAuthOAuth2IfSupported'] = true;
}
}
}
P.S. And LoginOAuth2.js mockup code
(rl => {
if (rl) {
addEventListener('rl-view-model', e => {
if (e.detail && 'Login' === e.detail.viewModelTemplateID) {
const LoginUserView = e.detail,
submitCommand = LoginUserView.submitCommand;
LoginUserView.submitCommand = (self, event) => {
if (LoginUserView.email().includes('@gmail.com')) {
// TODO: redirect to OAuth URI
} else {
submitCommand.call(LoginUserView, self, event);
}
};
}
});
}
})(window.rl);
Hi,
I'm sorry but am I right that at the moment the Nextcloud integration isn't officially available?
yip, that is correct. consider it work in progress... the community is doing excellent work, so you'll have to be patient if you can't contribute.
And someone else also seems to be working on the file picker #307
@the-djmaze I am very excited about a Snappymail integration with Nextcloud. I'd be happy to help with testing. Is this thread the best place to discuss the project?
I would be very happy too to test it :) Rainloop is very good and "well integrated" with Nextcloud, but Snappy seems far better and modern !
Hello, I'm sorry but I don't see the snappymail package in the nextcloud (24.0.3) apps library I copied snappymal's git to nextcloud's app directory (old fashioned way) and the app appears (icon and config) but if I click on the administration link I just have a 'null' message that is displayed
What can a non-code do to help ? :)
What can a non-code do to help ? :)
Hello, I'm sorry but I don't see the snappymail package in the nextcloud (24.0.3) apps library I copied snappymal's git to nextcloud's app directory (old fashioned way) and the app appears (icon and config) but if I click on the administration link I just have a 'null' message that is displayed
Iยดve got the same problem. Snappymail is not in the app library (NC 24.0.2) and after copying snappymail manually in the app directory and activating, only gives a "null" response on the app site and the admin site.
I've added a plugin named nextcloud
.
It should give people a start for integration plugins.
You can find it at https://github.com/the-djmaze/snappymail/tree/master/plugins/nextcloud
I've changed the Nextcloud example code to be v18+ compatible and use better security. Now the stored passwords use the SnappyMail Crypt class to properly encrypt the login password.
I could not test the code yet, as i have just setup a Nextcloud with error This version of Nextcloud is not compatible with PHP>=8.2.
I could not test the code yet, as i have just setup a Nextcloud with error
This version of Nextcloud is not compatible with PHP>=8.2.
You could try https://github.com/nextcloud/all-in-one#nextcloud-all-in-one which shouldn't have this issue.
For a local only version see this: https://github.com/nextcloud/all-in-one/discussions/588#discussioncomment-3450343
--
For a more complete dev instance see this: https://help.nextcloud.com/t/tutorial-how-to-set-up-a-nextcloud-development-environment-on-mac-or-ubuntu/145462
The base code is working now.
It uses secure encrypted SSO to login instead of the old RainLoop insecure code. I urge anyone who is working on an integration to carefully look at my new code!
Feel free to try/test:
https://github.com/the-djmaze/snappymail/releases/tag/v2.18.6
Excellent, I will test soon!
The embedded mode (without iframe) should work, but the CSS is a bit weird:
vs original
Most things are fixed now for embed
mode.
Currently i found 1 annoying bug with it: ServiceWorker Notifications not supported
@Mer0me see the bottom message menu option for next plugin release ;)
That's unfair :p Just when we decide to use Nextcloud Mail ! I will keep an eye on snappy evolution... The killing feature of Nextcloud Mail is unified search. Not sure snappy will be able to achieve this... But for now Nextcloud Mail cannot save entire .eml into the cloud :( Only attachments...
That's unfair :p Just when we decide to use Nextcloud Mail ! I will keep an eye on snappy evolution... The killing feature of Nextcloud Mail is unified search. Not sure snappy will be able to achieve this... But for now Nextcloud Mail cannot save entire .eml into the cloud :( Only attachments...
Be aware that at the moment Nextcloud Mail is not able to search full text etc.: https://github.com/nextcloud/mail/issues/5611
Maybe there is some progress in the future on IMAP search but at the moment it seems that "only" (that is already some giant leap) a search on the DB is possible with https://github.com/nextcloud/mail/pull/6546
@Mer0me
The killing feature of Nextcloud Mail is unified search
Ha! I've added mockup code for it in last commit. Maybe someone will write it ๐
@cm-schl
Be aware that at the moment Nextcloud Mail is not able to search full text
When someone integrates my mockup, a lot should be possible with IMAP.
But the advanced search of SnappyMail that also allows searching based on keywords/tags and other details, i wonder if the unified search of Nextcloud is capable for that. In the past, when i developed DragonflyCMS, we figured that "unified search" was almost impossible. So we wrote an "advanced search" where you could set options for each "app", say:
Wonderful to see so much progress here, thanks all!
Presumably this will eventually be published to the Nextcloud app store?
Excellent indeed! Happy to redirect the rainloop nextcloud plugin to a snappymail one. Let me know if I can be of any help. I can eventually help set the plugin in the nextcloud app store but there is nothing complicated there so you certainly can do it as well.
Would be happy to help testing the Nextcloud integration ๐ - could you maybe give some info how to manually install snappymail and the Nextcloud plugin in a existing Nextcloud test environment?
I can eventually help set the plugin in the nextcloud app store but there is nothing complicated there
Well... i can't login https://github.com/nextcloud/appstore/issues/929 So feel free to put it in the store.
could you maybe give some info how to manually install
snappymail
folder into you Nextcloud /apps/
folderI can eventually help set the plugin in the nextcloud app store but there is nothing complicated there
Well... i can't login nextcloud/appstore#929 So feel free to put it in the store.
it works here with FF 104... have you tried requesting a new password? I believe there was an update in the platform with a change of password needed.
@Mer0me unified search almost working :smile_cat: ...
@cm-schl i've just tested my unified search integration and it can search the same as the advanced search of SnappyMail.
For example search keyword=$label3
or keyword:$label3
and it only shows messages with that tag/keyword/label.
So basically all works the same.
The only problem is that i can't create direct links to messages yet.
This requires further test and merging of my message-routing
branch, as discussed in #100
I've updated the release with the new options and some redesign.
Please use this version and the new plugin for further testing. It now has:
Plugin: https://snappymail.eu/repository/v2/plugins/nextcloud-2.2.tgz
This last commit has a working WebDAV to PROPFIND the files/directories. It should allow things like:
Emails
)Attachments
)Now i need some time off of this and wait on you all if it works AND if someone is able to help with the integration.
There should be enough base code now to extend it all with your own wishes.
So, if everything works as expected without bugs, then this ticket should be closed and everything else should be separate feature requests.
chiming in, haven't tested it yet. Currently I am using Rainloop but consider moving to SnappyMail. Thanks for the effort so far :) ๐ Can you check if the link to SnappyMail is visible in the mobile app? Because Rainloop does not show up, only external Links. But maybe this is the wrong place to ask and I should rather move the question to Nextcloud issues.
@relikd
Thanks for the effort so far :) +1
Thank you!
Can you check if the link to SnappyMail is visible in the mobile app?
No idea, but wouldn't it be better to use something like FairEmail
I do use SnappyMail and FairEmail on mobile for their own purposes.
I dont want to hijack this thread, so I keep it short. My use-case is a nextcould instance for a non-profit to allow collaboration. The email accounts are pre-configured and assigned to specific users. Each user can have 0-n email accounts. Giving away login/passwords would require to change the pw each time a user quits and the remaining users would need to update their stored pw. But again, I dont want to hijack the thread. Just a feature wish: as an admin I would like to pre-configure accounts for others. Currently I do that with the Impersonate app.
I am very happy to see that the nextcloud integration is happening. Thank you so much for your effort and time spent on this, the-djmaze!! ๐ Just wanted to let you know, that I will be able to help test as soon it hits the nextcloud AppStore, as I am not tech savvy enough to run my own nextcloud instance and test at the current stage of development.
Firt of all, thank you for this rewrite of the Rainloop app, it is really needed.
After reading the documentation, I saw that you removed support for all 3rd party apps, to ensure GDPR compliance. But I wanted to know if you would be open to support Nextcloud - as an open source project where you are guaranteed to have control of your data, this should make sense.
Thanks a lot for your consideration
Is your feature request related to a problem? Please describe. I have been using Rainloop with Nextcloud. In my opinion, it is the best email option available. Nevertheless, the integration between the two is currently less than perfect.
Describe the solution you'd like Have a better integration with Nextcloud
Describe alternatives you've considered Modify the Rainloop app to improve this, but the code is a bit outdated. I would prefer to work with this fork :)
Additional context There is currently a Rainloop app for Nextcloud: https://github.com/pierre-alain-b/rainloop-nextcloud Adding attachments from Nextcloud: https://github.com/RainLoop/rainloop-webmail/issues/2023
UPDATE 2022 It's alive at https://apps.nextcloud.com/apps/snappymail