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

[NEW] Reply notification email to sender's email when the Direct Reply feature is disabled #15767

Merged
merged 5 commits into from
Jun 19, 2020

Conversation

localguru
Copy link
Contributor

Closes #12176

If direct e-mail feature isn't enabled, all e-mail replies to notification e-mails are sent to the global set e-mail From_Email address.

Many users reply to those e-mails and assume the reply is sent to the original sender. As a result, this is confusing and, in my opinion, also a privacy issue, because private e-mails could be sent to the global From_Email e-mail address. This is usually an unwanted recipient of the contents of the e-mail.

There are several solutions to this problem:

a) The sender e-mail address for notifications can be configured separately, e.g. [email protected] and the real name of the user is not placed in front of the e-mail address, but e.g. No-Reply. As a result: No-Reply <[email protected]>. For most users it would be clear that the answer will not be sent to the sender. Should a user reply to noreply@ nevertheless, an autoresponder could send an answer with a corresponding hint or the e-mail is just dropped.

b) A Reply-To header is set, which contains the e-mail address of the user.

c) The sender's real name and the e-mail address corresponds to the e-mail address of the user.

I think option c) would be the best solution to the problem. This is a quick pull for option c).

The patch could also be included as an option so that the configuration can be set to enable this feature.

@sampaiodiego
Copy link
Member

thanks again @localguru

I've changed your code a little bit, let me know what you think, because we cannot use the sender's email address as the "From" address because most email providers validate that address against the SMTP server and they might flag the email as spam if it is not valid. That's why we have the from setting, to allow a proper SMTP configuration.

so what I did was always add a Reply-To with sender's email address.. If the server uses the Direct Reply feature, we'll still replace that with one email address we can track.

basically I changed to follow your b) option..

@CLAassistant
Copy link

CLA assistant check
All committers have signed the CLA.

@rodrigok rodrigok changed the title [NEW] set email full From: header for msg sender and full To: header of rcpt [NEW] Reply notification email to sender's email when the Direct Reply feature is disabled May 30, 2020
@rodrigok
Copy link
Member

@sampaiodiego the code looks good for me, what do you think?

@rodrigok rodrigok added this to the 3.4.0 milestone May 30, 2020
@sampaiodiego
Copy link
Member

I think it is good to go

@sampaiodiego sampaiodiego self-assigned this Jun 1, 2020
@sampaiodiego sampaiodiego merged commit 4af853a into RocketChat:develop Jun 19, 2020
@sampaiodiego sampaiodiego mentioned this pull request Jun 30, 2020
@nmagedman
Copy link
Contributor

nmagedman commented Aug 19, 2020

AFAICT, a user's email address is not displayed to any other (non-admin) users anywhere within the RC UI, so we've always considered this a private field. However, with this change, the email address is now exposed via these emails.

  1. Is my premise correct? Are users’ email address considered public or private data?
  2. If public, where are the email addresses displayed?

@andreybrasil
Copy link

Hi,
I think there should be an option to disable sending the user's full name in the FROM: field for notifications of messages sent when offline.

Some email clients and collaboration services automatically add contacts from answered messages and sometimes even from received messages to the address book.

Once this happens all subsequent email messages sent by rocketchat begin to be identified with the name of an individual who was saved in the address book initially linked to the email address of the rocketchat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature: reply to notification emails can result in privacy leak
6 participants