Core: Email invitation for events should come from the user's email address, not server's [$20]

Created on 13 Jul 2016  路  24Comments  路  Source: owncloud/core

Steps to reproduce

Using OC 9.0.3 + Calendar 1.2.2, invite someone to calendar event.
The outbound email "From" address shows as the server from, configured in
Admin-->Email Server-->From Address.

The email should come from the user's configured email address, not the server. This is especially confusing when the OC instance is host for a number of unrelated domains.

Expected behaviour

Tell us what should happen

Actual behaviour

Tell us what happens instead

Server configuration

Operating system:
Ubuntu 14.04
Web server:
Apache 2.4.7
Database:
MariaDB 10.0.26
PHP version:
php 5.5.9
ownCloud version: (see ownCloud admin page)
9.0.3
Contacts version: (see ownCloud apps page)
1.3.1.0 (calendar = 1.2.2)
Updated from an older ownCloud or fresh install:
Updated from 8.2.2
Signing status (ownCloud 9.0 and above):

No errors have been found.

List of activated apps:
Enabled:

activity: 2.2.1
calendar: 1.2.2
comments: 0.2
contacts: 1.3.1.0
dav: 0.1.6
federatedfilesharing: 0.1.0
federation: 0.0.4
files: 1.4.4
files_pdfviewer: 0.8.1
files_sharing: 0.9.1
files_texteditor: 2.1
files_trashbin: 0.8.0
files_versions: 1.2.0
files_videoplayer: 0.9.8
gallery: 14.5.0
notifications: 0.2.3
provisioning_api: 0.4.1
systemtags: 0.2
tasks: 0.8.1
updatenotification: 0.1.0 Disabled:
bookmarks
encryption
external
files_antivirus
files_external
firstrunwizard
news
notes
templateeditor
user_external
user_ldap

The content of config/config.php:

Are you using external storage, if yes which one: local/smb/sftp/...
No
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser:
Chrome / Safari
Operating system:
OS X El Cap
CalDAV-clients:

Logs

Web server error log

N/A

ownCloud log (data/owncloud.log)

N/A

Browser log

N/A

bounty enhancement

Most helpful comment

Hi, editing the file https://github.com/owncloud/core/blob/master/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php and adding the instruction ->setFrom([$sender => $senderName]) between lines 123 and 124 solved the problem

All 24 comments

@georgehrke interested in having a look? THX

I think you have this covered but just in case you weren't aware this issue impacts Thunderbird users when Thunderbird/Lightning calendars sync with ownCloud:

The email address that Thunderbird (TB) is using for calendar invitations is the server level email address for ownCloud, not the email address of the calendar owner on ownCloud, and not the email address set in the calendar settings in Thunderbird. Indeed in my case the email address that is being used is not even set up in TB. This makes no sense and recipients of calendar invitations get emails from a completely unknown address. Surely this is not what TB or ownCloud intends?

Hate bumping this @georgehrke but this makes invites unusable, and I really don't want to switch to nextcloud...

Some email providers won't like this and will ban the server which sends the notification. A better solution would be to show in the From header : From %user% via %servername%.

Are you assuming that the user account specifies an email from a different domain (one for which the server is not authorized to send mail), or from an email that doesn't exist? Both of those are abuse scenarios, no?. It's the OC administrator's job to make sure that the server is authenticated to send emails from whatever domain(s) users use.

Your suggestion does not work in the case of multi-domain OC installations. Why would you not just send the email from the user account's email?

Why would you not just send the email from the user account's email?

well - the owncloud server cannot access the users mail account (smtp server to be precise).
Owncloud can only send a email via the configured smtp account and this might hold rules which denies sending emails for somebody else.

Correct, yes, by that I meant via the e.g. postfix server configured on the box. I'm not sure why you're concerned with whether or not a functional message will bounce, when we know that what we're sending right now is not functional (there's no point in sending out calendar invites from [email protected])? If it's rejected by the outbound mail server, then the admin needs to change their mail config or mail server.

552/5000
For me the biggest problem is that in the invitation emails only the e-mail address and not the user name in the From header field is used for the sender.
For example:
The Admin account is maintained with _[email protected]_ and _"Bill Admin"_ as user name.
The Owncloud user who sends the invitation is maintained with the user name "Max Meyer".
Currently only _"<[email protected]"_ is sent with From header field. Different mail clients (f.e. Google Mail) display "admin" as sender, what is confusing.
Why is not the invitation mail sent with the From header field: _"Max Meyer admin@host.com"_.

Moving to backlog since no one seems to be working on this right now. Let me know otherwise.

Fully quoting the the above suggestion https://github.com/owncloud/core/issues/29093#issuecomment-331838654 in here:

At the very least, it could be an option in the settings. Most OC admins will know to configure properly their MTA to correctly send mail on behalf of registered users of the OC instance.
If they can't, they would uncheck the "send event invites from owner's email" checkbox that we could put in the settings.

Another possibility: For me owncloud does not need to send event invites. My users have Thunderbird and send their invites and mails direct from Thunderbird. So they see outgoing and sent mails - owncloud is just used as a service to synchronize between users, groups and their devices.
So I would like to see a checkbox - dont send any invites.

@amnesiemaniac This is certainly a valid use case -- but in our layout, we use web-based ownCloud, and smartphone clients. It would be helpful maybe if Calendar proposed a user-level setting (SMTP details) for example, to be used by Send Invite feature. I'm currently learning the project's code-base, to check if this is any feasible.

There are many use cases for owncloud in different flavors.
Maybe a config-option for mailhandling in config.php would be enough.

@DeepDiver1975 please change label from enhancement to bug. This bug is already existing and nobody is looking at it

Hey, this issue has been closed because the label status/STALE is set and there were no updates for 7 days. Feel free to reopen this issue if you deem it appropriate.

(This is an automated comment from GitMate.io.

Hi, what is the current state?

@git-darius Didn't have any time to investigate, unfortunately. I hope someone will come up with a patch :)

Still no solution for this?

Hi, editing the file https://github.com/owncloud/core/blob/master/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php and adding the instruction ->setFrom([$sender => $senderName]) between lines 123 and 124 solved the problem

Hi, editing the file https://github.com/owncloud/core/blob/master/apps/dav/lib/CalDAV/Schedule/IMipPlugin.php and adding the instruction ->setFrom([$sender => $senderName]) between lines 123 and 124 solved the problem

Would you please create a pull request?

@drohhyn I added a pull request.

will be released in 10.2

Hello

This change causes my mail server to refuse sending mail.
In fact, I use an authenticated SMTP server which does not allow using "envelope mail from" address different from account one. This prevent SMTP spoofing.
Is it possible to reopen the case and apply one of the following:

  • add the possibility to avoid this change on SMTP server settings ?
  • use from headers instead of mail from envelope ?
  • permit each users ton configure their smtp settings to override default server one ?

Regards.

Was this page helpful?
0 / 5 - 0 ratings