Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Calendar invites: Administrator shall choose if server's or user's email address is used #5080

Closed
6 tasks done
tuergeist opened this issue May 23, 2017 · 50 comments · Fixed by #45383
Closed
6 tasks done
Assignees
Labels
2. developing Work in progress enhancement feature: caldav Related to CalDAV internals feature: dav

Comments

@tuergeist
Copy link

tuergeist commented May 23, 2017

Feature Request

I refer to #2345 and #2778.

If a Nextcloud instance serves for users from different domains (which is the case at least for me), it's annoying that calendar invites are sent with the server's email address instead of the user's once. For me it would be fine if the server's address is taken if there is no user email configured.

To avoid problems with mailservers that might not accept sending emails for more than one domain, this behavior this could be made optional.
(In my case all domains are hosted and handled by one email server and one nextcloud server - I would not like to set up a nextcloud instance per domain).

(If someone is so nice and point me to the place where I can change it in the code myself, would be fine too)

Implementation

Delegate sending emails to apps. The main target is the Mail app but others may offer this integration too.

Work packages

  • Add a mail sending provider mechanism
  • Implement the mail sending provider for Mail
  • Add an admin setting to choose which email system should be used (system or mail providers)
  • Adjust CalDAV backend to use the providers and system email as fallback
  • Developer documentation for the new API
  • Admin documentation for the setup and any configuration options
@georgehrke
Copy link
Member

@tuergeist This is the place to go:
https://github.com/nextcloud/server/blob/master/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php#L109

Feel free to send a PR that implements this optionally. :)

@georgehrke
Copy link
Member

(Message provides a setFrom method, see https://github.com/nextcloud/server/blob/master/lib/private/Mail/Message.php#L81)

@tuergeist
Copy link
Author

Hi @georgehrke, IMHO the problem is the sender's address which I cannot change easily in neither code locations you pointed to. [Or I'm just too stupid]

@tuergeist
Copy link
Author

Aaahh. Got it.

@robertoschwald
Copy link

Any news on this?

@ntnsndr
Copy link

ntnsndr commented Jun 26, 2018

I'd add that this is an important issue for us at MayFirst.org, who use the same NextCloud across a great many domains and organizational identities. We really need these invitation emails to be coming from the users who send them. Thanks to all who have the capacity and willingness to work on this.

@nextcloud-bot nextcloud-bot added the stale Ticket or PR with no recent activity label Jul 27, 2018
@skjnldsv
Copy link
Member

@georgehrke 🎺 could you update this? :)

@skjnldsv skjnldsv added 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info and removed stale Ticket or PR with no recent activity labels Jun 12, 2019
@georgehrke georgehrke added 1. to develop Accepted and waiting to be taken care of and removed 0. Needs triage Pending check for reproducibility or if it fits our roadmap needs info labels Jun 12, 2019
@georgehrke
Copy link
Member

cc @jancborchardt This is what we talked about on Talk.

@georgehrke
Copy link
Member

to summarise the problem:

  • depending on the environment, users will have email-addresses managed by a different organisation than the Nextcloud-instance. If your Nextcloud is configured with the email address [email protected], but your users use different providers like gmail, outlook, whatever, your email server (abc.tld) can't just start sending out emails for gmail, outlook, etc. Most of the times, these emails will be marked as spam and your server runs the risk of being put onto blacklists for spamming.

... and our options:

  • add an option for admins that allows them to send all emails (or at least emails from the same domain) via the abc.tld email server but with the real user email address. ([email protected]). This should come with a big fat warning that if you enable it despite your users having email addresses from plenty different providers, you might run at the risk of being put onto spam blacklists
  • integrate even better with the mail app. Allow the mail app to hook into the IMipPlugin and send out emails if the currently logged in user has an account registered for the email of the Organizer given in the calendar data. If there is no email registered, fallback to the current behaviour. cc @ChristophWurst

@ChristophWurst
Copy link
Member

* integrate even better with the mail app. Allow the mail app to hook into the IMipPlugin and send out emails if the currently logged in user has an account registered for the email of the Organizer given in the calendar data. If there is no email registered, fallback to the current behaviour. cc @ChristophWurst

Sounds like a good idea in general.

@jancborchardt
Copy link
Member

Sounds good and seems we should do both options?

Everyone who commented in the thread: Would this solve your issue?

@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Jul 23, 2024
@ChristophWurst
Copy link
Member

See open work packages.

@github-project-automation github-project-automation bot moved this from ☑️ Done to 📄 To do in 💌 📅 👥 Groupware team Jul 25, 2024
@ChristophWurst ChristophWurst moved this from 📄 To do to 🏗️ In progress in 💌 📅 👥 Groupware team Jul 25, 2024
@susnux
Copy link
Contributor

susnux commented Aug 23, 2024

Question:
Is it planned to deprecate the old symphony mailer abstraction by adding a system provider?
Or should this just be an addition? Because now we have two ways to send emails.

@SebastianKrupinski
Copy link
Contributor

Question: Is it planned to deprecate the old symphony mailer abstraction by adding a system provider? Or should this just be an addition? Because now we have two ways to send emails.

At the moment both code paths will exist. The mail provider at the moment will be used to solve the problem that because all messages up to this point have been sent from the system account, calendar invitation invite replies are never received by the user, and the system account can not be used to send messages on behalf of someone else especially if that user uses a different server.

But I have thought that we could use the mail provider to send most if not all user generated notification, lets say when a user shares a file with someone. And we could also implement the same mail provider for the system account that way when apps send a message both the user mail account and system account is available through the same interface/logic.

Hope that answers your question.

@susnux
Copy link
Contributor

susnux commented Aug 24, 2024

And we could also implement the same mail provider for the system account that way when apps send a message both the user mail account and system account is available through the same interface/logic.

Yes that is what I meant, if it is indendet to provide a system provider with e.g. "id = system" or capability "systemMail" or what ever.

Basically if this is a second way to sent mail, or the old way should be deprecated in favor of one consistent way handling mail :)

@kesselb
Copy link
Contributor

kesselb commented Aug 27, 2024

I second the idea to make the default mailer an "mail provider".

We started with imip, but the same would be nice for sharebyemail, inviting guests users, other apps, etc.

@ChristophWurst
Copy link
Member

Add an admin setting to choose which email system should be used (system or mail providers)

We do this so admins have the choice to "go back" to system emails for invites, either because they prefer that system or there is an issue with the mail providers.

@leknoppix
Copy link

@SebastianKrupinski Thank you very much for the feature you're proposing.
Could you explain how it will work in practice? Will the user have the option to send invitations either from the default email address or from their own email address?

@ChristophWurst
Copy link
Member

@leknoppix see #5080 (comment). It will be an admin setting.

@leknoppix
Copy link

@leknoppix see #5080 (comment). It will be an admin setting.

Thanks you!

@ChristophWurst
Copy link
Member

dear @SebastianKrupinski! could you please have a look at the open todos? let's get this task done 😎

@SebastianKrupinski
Copy link
Contributor

@ChristophWurst the last part of this is stuck in PR review no mans land. Hasn't been approved. We can discuss in the morning.

@joshtrichards joshtrichards changed the title Calendar invites: Administrator shall choose if server's or user's email adress is used Calendar invites: Administrator shall choose if server's or user's email address is used Oct 17, 2024
@ChristophWurst
Copy link
Member

@SebastianKrupinski what's the current status here?

@SebastianKrupinski
Copy link
Contributor

@ChristophWurst Morning, last PR, finally got approved yesterday and merged. Back porting to 30.

@ChristophWurst
Copy link
Member

could you update the list of work packages above? are admin docs done?

@SebastianKrupinski
Copy link
Contributor

could you update the list of work packages above? are admin docs done?

Done... and Admin docs will be done today, now that the wording is finalized.

@SebastianKrupinski
Copy link
Contributor

Documentation nextcloud/documentation#12372

@SebastianKrupinski
Copy link
Contributor

All task completed

@github-project-automation github-project-automation bot moved this from 🏗️ In progress to ☑️ Done in 💌 📅 👥 Groupware team Nov 29, 2024
@TheDom42
Copy link

TheDom42 commented Dec 4, 2024

Thank you very much for implementing this great and helpful feature! I wanted to try it out on my server today but I couldn't manage to set it up (maybe because I was looking at the wrong setting or because the current stable Mail App is <4.1 as required by the docs):

Current config: NC server 30.0.2, Calendar 5.0.6, Mail 4.0.7.

My NC is in German, so I don't know if the "Kontenbereitstellung" in /settings/admin/groupware is the area where this should be configured. I find the documentation at https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/email_configuration.html#mail-providers a bit unclear at this point (I was first looking for a new app in the NC Store and then I was looking for an easy toggle somewhere in the admin or personal settings - like discussed in #5080 (comment)).

If this "Kontenbereitstellung" is actually the right setting, I don't know how to set it up: All our users already have a working personal email account set up in the Mail App, so I currently would not have the need to configure an "overall" server for the whole instance. Also, I don't know how to work with the placeholders for my current configuration - our NC accounts have the format of initialfirstname.lastname while the emails have the format of [email protected]. So the %USERID% cannot be used as a placeholder for matching. We don't use LDAP.

Maybe, I am just looking for that easy toggle in the settings: "Use personal email if available". Would it be possible to get a "how-to setup the mail provider for dummies"?

@kesselb
Copy link
Contributor

kesselb commented Dec 4, 2024

The toggle you are looking for will be part of Nextcloud 30.0.3.

Basic Settings (/settings/admin)

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2. developing Work in progress enhancement feature: caldav Related to CalDAV internals feature: dav
Projects
Development

Successfully merging a pull request may close this issue.