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

feature request: smtp settings for self hosted installation #146

Open
helmut72 opened this issue Feb 21, 2022 · 15 comments
Open

feature request: smtp settings for self hosted installation #146

helmut72 opened this issue Feb 21, 2022 · 15 comments

Comments

@helmut72
Copy link

There is an option to invite people by typing a mail address: we'll email an invite to ...
But there is no option to configure a smtp server.

I don't have tried it, because I don't want to share my mail address and the senders mail address to unknown, also I want to avoid that my public ip address comes to a spamlist because Gist includes an own mail relay engine with unknown/bad settings.

Thank you.

@paulfitz
Copy link
Member

Hi @helmut72, I understand your concern. There won't be any emails sent. When you invite users to a document, they will have access to that document if they log in, but won't receive an email. A event will be generated within Grist (here

return () => this.emit('addUser', userId, resource, userIdDelta, membersBefore);
) but no action will be taken on it. In our hosted service, we have that event hooked up to sendgrid, a service we use for sending templated emails. Something more general purpose and easier to set up for self-hosting is still a TODO.

@helmut72
Copy link
Author

Thank you for clarify! Now I was so brave to try it and great, this user can now collaborate. No mail sent :) Should we close this issue?

@paulfitz
Copy link
Member

:) Glad it works for you. Sure, closing.

@dumblob
Copy link

dumblob commented Feb 22, 2022

I've heard some good references on the docker image https://github.com/docker-mailserver/docker-mailserver which might be one of the possible go-to solutions for self-hosted deployments of grist (might be of interest for you @paulfitz).

@helmut72
Copy link
Author

@dumblob Grist just need an option to configure any mailserver and don't need it's own mailserver.

@dumblob
Copy link

dumblob commented Feb 22, 2022

Sure, but in addition to that I understood there is no go-to solution for self-hosted deployments. Therefore I mentioned it 😉.

@helmut72
Copy link
Author

A mailserver doesn't help. Grist need the code to send mails to a mailserver and not to be a full blown mailserver. Grist only need the mail client code, like Outlook or Thunderbird and not the code of a mail server, like Postfix or Exchange.

@dumblob
Copy link

dumblob commented Feb 22, 2022

Of course - that's what I meant with "in addition to that".

@almereyda
Copy link

To cite the comment #146 (comment) above, without repeating it, I would like to ask:

Is it possible to hook this event into a Webhook, and have mail sending taken care of by another party, say n8n?

This would allow for Grist to be able to send mail messages via a transactional API that is self-hosted, without having to imlement an SMTP MDA.

@paulfitz
Copy link
Member

@almereyda that's a good idea. So for example Grist would hit some endpoint specified in an env variable, like GRIST_NOTIFICATION_WEBHOOK say, and pass along a json with all the event info? Then someone could hook that up to e.g. n8n to mail out whatever notifications they actually need.

@almereyda
Copy link

As n8n already has an official Grist node for interacting with the API

it could be interesting to explore how to add a Grist trigger node.

This could then in return also be used to receive events from Grist in n8n. I don't know about the internals of n8n Trigger Nodes, so I wouldn't know how to implement that myself.

Webhooks on the other end are already a first-class citizen over there, and could be used right away.

@ben-pr-p
Copy link

ben-pr-p commented Jun 6, 2024

Is there a recommended way at the moment for having sharing notifications on self-managed Grist?

I don't need complex email notifications, just a simple invite notification when you are added to a team site or workspace.

I have a sendgrid account, but looks like adding the environment variable only does something when using the entreprise image.

@almereyda
Copy link

almereyda commented Sep 27, 2024

@paulfitz Would you like to reopen here?

https://support.getgrist.com/self-managed/#how-do-i-set-up-email-notifications suggests, that you are open ("yet") for SMTP notification transport. Here, we are also interested in the use case, esp. for an option for rich text diffs later down the road.

SMTP transport is also a dependency for #1086 to work for self-hosted installs.

To also continue the side-conversation around workarounds to sending email notifications, Webhooks support has landed last year (#76) and can be used to exfiltrate event data. It would be left to a curious person to show a first example for email notifications.

@paulfitz
Copy link
Member

Happy to reopen @almereyda. I don't know of anyone currently working on this though.

@paulfitz paulfitz reopened this Sep 27, 2024
@almereyda
Copy link

almereyda commented Sep 27, 2024

It seems it will be worth the effort for a community contribution, when #1086 will have been resolved.

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

No branches or pull requests

5 participants