Johannes Zellner
918c2f8587
Move to @cloudron/safetydance
2026-04-01 09:49:34 +02:00
Girish Ramakrishnan
f12b4faf34
lint
2026-03-12 23:23:23 +05:30
Girish Ramakrishnan
01d0c738bc
replace debug() with our custom logger
...
mostly we want trace() and log(). trace() can be enabled whenever
we want by flipping a flag and restarting box
2026-03-12 23:08:35 +05:30
Johannes Zellner
135c9fb64d
Support mailclient oidc claim
...
Only apps with addon email have access to the claims' scopes
2026-02-18 10:12:34 +01:00
Girish Ramakrishnan
4ed6fbbd74
eslint: add no-shadow
2026-02-18 08:18:37 +01:00
Girish Ramakrishnan
e9f96593c3
reorder functions for no-use-before-define
2026-02-14 16:34:34 +01:00
Girish Ramakrishnan
36aa641cb9
migrate to "export default"
...
also, set no-use-before-define in linter
2026-02-14 15:43:24 +01:00
Girish Ramakrishnan
96dc79cfe6
Migrate codebase from CommonJS to ES Modules
...
- Convert all require()/module.exports to import/export across 260+ files
- Add "type": "module" to package.json to enable ESM by default
- Add migrations/package.json with "type": "commonjs" to keep db-migrate compatible
- Convert eslint.config.js to ESM with sourceType: "module"
- Replace __dirname/__filename with import.meta.dirname/import.meta.filename
- Replace require.main === module with process.argv[1] === import.meta.filename
- Remove 'use strict' directives (implicit in ESM)
- Convert dynamic require() in switch statements to static import lookup maps
(dns.js, domains.js, backupformats.js, backupsites.js, network.js)
- Extract self-referencing exports.CONSTANT patterns into standalone const
declarations (apps.js, services.js, locks.js, users.js, mail.js, etc.)
- Lazify SERVICES object in services.js to avoid circular dependency TDZ issues
- Add clearMailQueue() to mailer.js for ESM-safe queue clearing in tests
- Add _setMockApp() to ldapserver.js for ESM-safe test mocking
- Add _setMockResolve() wrapper to dig.js for ESM-safe DNS mocking in tests
- Convert backupupload.js to use dynamic imports so --check exits before
loading the module graph (which requires BOX_ENV)
- Update check-install to use ESM import for infra_version.js
- Convert scripts/ (hotfix, release, remote_hotfix.js, find-unused-translations)
- All 1315 tests passing
Migration stats (AI-assisted using Cursor with Claude):
- Wall clock time: ~3-4 hours
- Assistant completions: ~80-100
- Estimated token usage: ~1-2M tokens
Co-authored-by: Cursor <cursoragent@cursor.com >
2026-02-14 15:11:45 +01:00
Girish Ramakrishnan
fa5cbfc304
mail: allow comma in email display name
2026-02-09 11:01:47 +01:00
Elias Hackradt
743e4fce0b
Fixed wrong URL for PTR doc issue url
2026-01-10 19:59:27 +01:00
Girish Ramakrishnan
f714cd66f7
rework mail domain stats
...
We can now show list count, alias count as well in the mail domains UI
2025-12-05 13:32:07 +01:00
Girish Ramakrishnan
2c10ceba5b
mail status: fix rbl display
2025-11-28 12:01:50 +01:00
Girish Ramakrishnan
00ae320b51
remove spurious comma
2025-11-22 08:18:18 +01:00
Girish Ramakrishnan
7f9f3f683b
Fix outbound port 25 relay warning (prefer ipv4)
2025-11-20 16:08:54 +01:00
Girish Ramakrishnan
141bdb1307
mail: check for outbound ipv6 connectivity
2025-11-19 16:31:31 +01:00
Girish Ramakrishnan
43e426ab9f
Revert "Add no-use-before-define linter rule"
...
This reverts commit fdcc5d68a2 .
Unfortunately, this requires us to move exports to the bottom.
This in turn causes circular dep issues and also access of
exports.GLOBAL_VAR in the global context
2025-10-08 21:17:52 +02:00
Girish Ramakrishnan
2ad8ed5550
relay: remove usage of secret placeholder
2025-10-08 20:01:18 +02:00
Johannes Zellner
38267a26c1
Send some metrics
2025-09-29 16:16:22 +02:00
Girish Ramakrishnan
5dd5a20fc1
code -> sqlCode
2025-09-29 12:18:26 +02:00
Girish Ramakrishnan
19df2e0baa
ER_DUP_ENTRY is passed as code and not in message
2025-09-24 10:50:25 +02:00
Girish Ramakrishnan
12e073e8cf
use node: prefix for requires
...
mostly because code is being autogenerated by all the AI stuff using
this prefix. it's also used in the stack trace.
2025-08-14 12:55:35 +05:30
Girish Ramakrishnan
989d843fcb
shell: make shell.sudo promise based and waitable
2025-07-16 22:04:24 +02:00
Girish Ramakrishnan
56e4af58d3
fix comment
2025-07-15 11:20:05 +02:00
Girish Ramakrishnan
6ac0cd421a
use the @cloudron/superagent module
2025-07-10 10:56:05 +02:00
Girish Ramakrishnan
0427d08ede
mail: dnsbl can give empty records
2025-06-28 16:52:37 +02:00
Girish Ramakrishnan
a7aec70bc1
mail: add rbl6
...
abuse.ch is using spamhaus
sorbs is dead
2025-06-28 14:17:51 +02:00
Girish Ramakrishnan
c7d36ac06e
mail: fix status variable checks
2025-06-28 12:57:05 +02:00
Girish Ramakrishnan
9428cf0d06
mail: make status a tristate
...
status can be 'passed', 'failed' or 'skipped'. The motivation for this
change is that when using a relay, we can provide a message indicating
why the check was skipped.
2025-06-28 12:20:25 +02:00
Girish Ramakrishnan
4e54e4c22a
Fix relay UI password display
2025-06-27 13:06:55 +02:00
Girish Ramakrishnan
565859b2aa
relay: force STARTTLS when testing outbound relay
...
haraka only supports STARTTLS
2025-06-27 10:23:05 +02:00
Girish Ramakrishnan
1672217dd9
replace mysql module with mysql2
...
mysql is deprecated since years now
2025-06-19 12:41:49 +02:00
Johannes Zellner
e6d8115e52
Allow to set enablePop3 when adding a mailbox
2025-06-13 17:38:55 +02:00
Girish Ramakrishnan
ee0ac7cbed
mail: remove duration in message
2025-05-15 13:25:47 +02:00
Girish Ramakrishnan
785db03650
unbound: increase tries, since it fails often
2025-03-26 14:47:46 +01:00
Girish Ramakrishnan
ba1636033e
typo
2025-03-10 21:23:55 +01:00
Girish Ramakrishnan
8a51582d8a
mail: restart apps using email addon
...
move this logic from frontend to backend
2025-03-10 21:15:06 +01:00
Girish Ramakrishnan
f0848e23c7
replace validator module
2025-03-07 12:32:50 +01:00
Girish Ramakrishnan
8e58349bfa
replace with custom superagent based on fetch API
2025-02-15 15:14:09 +01:00
Girish Ramakrishnan
dd5e4adc73
replace underscore with our own
...
we only need like 5 simple functions
2025-02-13 14:14:34 +01:00
Girish Ramakrishnan
979e91a2eb
skip check when no ipv4/ipv6
...
(cherry picked from commit c478ace8bd )
2025-02-02 08:41:43 +01:00
Girish Ramakrishnan
6fcfa6cac0
mail: add ipv6 rdns check
2025-01-08 17:28:28 +01:00
Girish Ramakrishnan
d3b82d68e7
add todo for ipv6 ptr
2024-12-22 12:39:33 +01:00
Girish Ramakrishnan
1d0f3a08f4
porkbun: it is really slow
2024-12-16 09:46:38 +01:00
Girish Ramakrishnan
746e694d7e
notifications: rename alert to pin and unpin
2024-12-11 17:31:32 +01:00
Girish Ramakrishnan
ead419003b
notifications: rename ALERT_ to TYPE_
2024-12-11 15:29:20 +01:00
Girish Ramakrishnan
a9e1d7641d
shell: make require take a tag
2024-10-14 21:08:32 +02:00
Girish Ramakrishnan
6d4cc4a6b8
const fixes
2024-05-23 10:58:59 +02:00
Girish Ramakrishnan
4229e9921c
blacklisted -> blocked
2024-05-23 09:53:47 +02:00
Girish Ramakrishnan
44c61f7bd7
mail: do port 25 connectivity check with ipv4
2024-02-28 20:47:46 +01:00
Girish Ramakrishnan
ceb908bee7
Use constants.TEST
2023-10-01 13:52:19 +05:30