standardnotes / self-hosted

[Legacy] Self-host your own Standard Notes server for end-to-end encrypted notes and files
https://github.com/standardnotes/server
GNU Affero General Public License v3.0
343 stars 39 forks source link

Configure SMTP Server #86

Open strandundmeer opened 1 year ago

strandundmeer commented 1 year ago

Service Versions (please complete the following information): Paste the output of ./server.sh version.

Container                             Repository                        Tag                 Image Id            Size
api-gateway-standalone                standardnotes/api-gateway         latest              86d1f0c6b72c        161MB
auth-standalone                       standardnotes/auth                latest              714b5b740b60        174MB
auth-worker-standalone                standardnotes/auth                latest              714b5b740b60        174MB
cache-standalone                      redis                             6.0-alpine          83c577984741        24.7MB
db-standalone                         mysql                             5.6                 dd3b2a5dcb48        303MB
files-standalone                      standardnotes/files               latest              e7479749dda8        166MB
syncing-server-js-standalone          standardnotes/syncing-server-js   latest              0ff9ec9004c8        172MB
syncing-server-js-worker-standalone   standardnotes/syncing-server-js   latest              0ff9ec9004c8        172MB
workspace-standalone                  standardnotes/workspace           latest              292dbb6cb203        169MB
workspace-worker-standalone           standardnotes/workspace           latest              292dbb6cb203        169MB

Describe the issue I would like to configure the SMTP Server to get alerts when a new devices logs in or to get the backups via email. It seems that there is no option to configure the email server in the .env file, so I thought that perhaps the native smtp server on the docker host is used. Looking at the traffic there is no traffic to port 25 visible. How could I get mail working?

Thanks for your help

jackyzy823 commented 1 year ago

I think it is far more complex than you think.

The process i guess is like that: for notification:

auth -(send email req)> SNS msg queue -(take email req) > some worker -(send email via aws sns) -> aws -> user

for backup:

auth -> backup req -> SNS/REDIS -> syncing worker -> dump db -> S3 Storage/ Local File System -> send email req ---> some worker -> take file from S3/Local FS as attachment -(send email via aws sns) -> aws -> user

Since the middle part is not open sourced. you need to implementment some thing to get data from msg queue and then format the email template and then send email your self (via aws or smtp server or etc).

dislazy commented 1 year ago

So can we provide an api for downloading zip, and we can realize the simple version of email sending by ourselves. Without this, it is really unsafe to use, because data backup is not only the original database data backup, but more directly included in the email data content of