Commit Graph

209 Commits

Author SHA1 Message Date
Girish Ramakrishnan 9cef08aa6a mail relay: do not accept TLS servers
haraka can only relay via STARTTLS
2022-09-14 17:42:21 +02:00
Girish Ramakrishnan 7f45e1db06 send new login location to user email 2021-11-17 11:53:03 -08:00
Johannes Zellner 4356d673bc Fix wrong assert and minor typos 2021-10-27 22:31:54 +02:00
Johannes Zellner 475795a107 Invite is now also separate 2021-10-27 19:58:06 +02:00
Johannes Zellner 9a80049d36 Add two distinct password reset routes 2021-10-27 19:12:18 +02:00
Girish Ramakrishnan 971b73f853 move the bind inside 2021-10-26 11:03:54 -07:00
Johannes Zellner 074ce574dd Return password reset link on reset request route 2021-09-16 14:34:56 +02:00
Girish Ramakrishnan 95af5ef138 mailer: fix crash 2021-08-22 09:52:01 -07:00
Girish Ramakrishnan 4cd5137292 mailer: fix error handling
previous mailer code has no callback and thus no way to pass back errors.
now with asyncification it passes back the error
2021-08-19 12:40:53 -07:00
Girish Ramakrishnan ada7166bf8 translation: asyncify 2021-08-19 11:54:28 -07:00
Girish Ramakrishnan 03e22170da appstore and support: async'ify 2021-08-18 23:38:18 -07:00
Johannes Zellner eda3cd83ae Make new login email translatable
Fixes #798
2021-07-29 10:54:38 +02:00
Girish Ramakrishnan a1c61facdc merge userdb.js into users.js 2021-07-16 22:33:22 -07:00
Girish Ramakrishnan 9c0f983ce1 backups: fix failure notitification 2021-06-24 01:44:46 -07:00
Girish Ramakrishnan b24cf78bc0 certs: fix renewal notification 2021-06-24 01:12:33 -07:00
Girish Ramakrishnan 73917e95c9 rework notifications
notifications are now system level instead of user level.

To clarify the use events/notifications/email:
* eventlog - everything that is happenning on server
* notifications - specific important events (alerts)
* email - these are really urgent things that require immediate attention. this is for
  the case where an admin does not visit the dashboard often. can also be alerts like
  bad backup config or reboot required which are not events per-se.

Notes on notifications
* oom - notification only
* appUpdated - notification only
* cert renewal failure - only raise when < 10 days to go. also send email thereafter (todo).
* Backup failure - only if last 5 backups failed (todo).
* Box update - notification only. we anyway send newsletter.
* box update available - we raise a notification. no email.
* app update available - we already have update indicator on dashboard. so, no notification or email.

Alerts:
* backup config
* disk space
* mail status
* reboot
* box updated
* ubuntu update required
2021-05-28 15:29:53 -07:00
Girish Ramakrishnan 44ac406e57 admin -> dashboard 2021-05-05 12:29:04 -07:00
Johannes Zellner fed8ba95f0 Fallback to unkown useragent and don't stash such login attempts 2021-05-04 20:07:28 +02:00
Girish Ramakrishnan 64414eb932 new login mail: minor adjustments to text 2021-04-30 12:01:57 -07:00
Johannes Zellner 549b2f2a6b Improve new login location email 2021-04-30 16:20:50 +02:00
Johannes Zellner fb5c2a5e52 Properly detect new user agents and location 2021-04-30 15:22:10 +02:00
Johannes Zellner 61e51c7875 Send new login location notification mail 2021-04-21 16:14:49 +02:00
Girish Ramakrishnan 355de5b0a4 notifications: fix update notification
the notification wasn't working because this was in apptask and the apptask died
before it could send out the email. we now move the notification to box process
and also remove the email notification.
2021-04-19 15:14:04 -07:00
Girish Ramakrishnan ef476f74bf notifications: no email for app up/down/oom events
emails will not be used for self monitoring events. these are best done
from the outside. we just log everything in eventlog and raise notifications
as well.
2021-04-15 15:29:25 -07:00
Girish Ramakrishnan 66ff2a9eb7 Revert "make box code send emails with STARTTLS"
This reverts commit ca496df535.

2525 has no TLS anymore
2021-03-22 14:34:07 -07:00
Girish Ramakrishnan ca496df535 make box code send emails with STARTTLS 2021-03-14 12:19:37 -07:00
Girish Ramakrishnan 353369c1e9 mailer: make oom mail contain link to dashboard instead of docs 2021-01-02 12:26:34 -08:00
Girish Ramakrishnan d1f9ae3df8 fix subject of the emails 2020-12-29 17:51:41 -08:00
Girish Ramakrishnan 28dee54a39 updates: only send email notifications when not auto-updating
fixes #749
2020-12-29 17:47:51 -08:00
Girish Ramakrishnan ac6c9e9b15 hasSubscription is always true
dashboard has logic for showing popup
2020-12-21 15:25:24 -08:00
Girish Ramakrishnan 9683bb6408 remove email notification for user add/remove
it's just very noisy. we anyway raise notifications
2020-12-21 08:45:18 -08:00
Johannes Zellner 64af278f39 add missing curly brackets 2020-11-21 00:13:07 +01:00
Johannes Zellner 57dabbfc69 Translate welcome and password reset email subjects 2020-11-20 22:38:52 +01:00
Johannes Zellner 84c1703c1a Translate password reset email 2020-11-20 16:18:24 +01:00
Johannes Zellner f324d50cef Translate welcome mail 2020-11-20 16:10:13 +01:00
Johannes Zellner fb4ba5855b Make emails translatable 2020-11-20 00:43:12 +01:00
Johannes Zellner fbe5f42536 Split welcome email between html and text version 2020-11-19 22:29:29 +01:00
Girish Ramakrishnan b32128bebf Fix quoting in emails 2020-03-07 19:12:39 -08:00
Girish Ramakrishnan 0e156b9376 migrate permissions and admin flag to user.role 2020-02-21 16:49:20 -08:00
Girish Ramakrishnan 5145ea3530 Add supportConfig in database 2020-02-05 14:46:05 -08:00
Johannes Zellner 1fbbaa82ab Generate the user invite link only in one location 2020-02-05 15:53:05 +01:00
Johannes Zellner 68b1d1dde1 Fixup account setup link 2020-02-05 15:21:55 +01:00
Girish Ramakrishnan c9e96cd97a custom: remove support section 2020-02-04 13:07:36 -08:00
Johannes Zellner 13d0491759 Send out new password reset link 2020-02-04 17:11:31 +01:00
Girish Ramakrishnan b4874ec1f4 refactor getting mail auth 2019-11-05 19:54:53 -08:00
Girish Ramakrishnan 1a8496d61e Move MailError to BoxError 2019-10-24 14:10:23 -07:00
Girish Ramakrishnan a19662bdfa Add a timeout for update as well
this will send a notification if an update gets stuck
2019-10-14 13:05:12 -07:00
Girish Ramakrishnan 9b74bb73aa config.js is dead, long live config.js
we use settings now
2019-07-26 14:51:51 -07:00
Girish Ramakrishnan a6ea12fedc Make internal smtp port a constant 2019-07-25 16:08:54 -07:00
Johannes Zellner 1eedd4b185 Send changelog for updated app notifications 2019-06-12 17:15:02 +02:00