emailengine-app 2.67.0 → 2.67.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -19,7 +19,7 @@ jobs:
19
19
  uses: actions/checkout@v6
20
20
 
21
21
  - name: Use Node.js 24
22
- uses: actions/setup-node@v4
22
+ uses: actions/setup-node@v6
23
23
  with:
24
24
  node-version: 24
25
25
 
@@ -32,7 +32,7 @@ jobs:
32
32
  # a new release is created:
33
33
  if: ${{ steps.release.outputs.release_created }}
34
34
 
35
- - uses: actions/setup-node@v4
35
+ - uses: actions/setup-node@v6
36
36
  with:
37
37
  node-version: 24
38
38
  registry-url: "https://registry.npmjs.org"
@@ -51,7 +51,7 @@ jobs:
51
51
  id-token: write
52
52
  steps:
53
53
  - uses: actions/checkout@v6
54
- - uses: actions/setup-node@v4
54
+ - uses: actions/setup-node@v6
55
55
  with:
56
56
  node-version: 24
57
57
  registry-url: "https://registry.npmjs.org"
@@ -17,7 +17,7 @@ jobs:
17
17
  - uses: actions/checkout@v6
18
18
 
19
19
  - name: Use Node.js 24
20
- uses: actions/setup-node@v4
20
+ uses: actions/setup-node@v6
21
21
  with:
22
22
  node-version: 24
23
23
  - run: npm install
@@ -51,7 +51,7 @@ jobs:
51
51
  steps:
52
52
  - uses: actions/checkout@v6
53
53
  - name: Use Node.js ${{ matrix.node }}
54
- uses: actions/setup-node@v4
54
+ uses: actions/setup-node@v6
55
55
  with:
56
56
  node-version: ${{ matrix.node }}
57
57
  - name: Setup Redis CLI
@@ -84,3 +84,7 @@ jobs:
84
84
  OUTLOOK_SERVICE_TENANT_ID: ${{ secrets.OUTLOOK_SERVICE_TENANT_ID }}
85
85
  OUTLOOK_SERVICE_CLIENT_SECRET: ${{ secrets.OUTLOOK_SERVICE_CLIENT_SECRET }}
86
86
  OUTLOOK_SERVICE_ACCOUNT_EMAIL: ${{ secrets.OUTLOOK_SERVICE_ACCOUNT_EMAIL }}
87
+ GMAIL_SERVICE_POSTALSYS_CLIENT: ${{ secrets.GMAIL_SERVICE_POSTALSYS_CLIENT }}
88
+ GMAIL_SERVICE_POSTALSYS_SERVICE_EMAIL: ${{ secrets.GMAIL_SERVICE_POSTALSYS_SERVICE_EMAIL }}
89
+ GMAIL_SERVICE_POSTALSYS_KEY: ${{ secrets.GMAIL_SERVICE_POSTALSYS_KEY }}
90
+ GMAIL_SERVICE_POSTALSYS_ACCOUNT_EMAIL: ${{ secrets.GMAIL_SERVICE_POSTALSYS_ACCOUNT_EMAIL }}
package/.ncurc.js CHANGED
@@ -22,6 +22,9 @@ module.exports = {
22
22
  'joi',
23
23
 
24
24
  // @asamuzakjp/css-color >=4.1.2 pulls in @csstools/* v4 which are pure ESM and break pkg bundling
25
- '@asamuzakjp/css-color'
25
+ '@asamuzakjp/css-color',
26
+
27
+ // undici >=8.0.0 requires Node >=22.19.0; pin to last Node 20-compatible release
28
+ 'undici'
26
29
  ]
27
30
  };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.67.2](https://github.com/postalsys/emailengine/compare/v2.67.1...v2.67.2) (2026-04-21)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * restore IMAP XOAUTH2 path for gmailService accounts ([d2ebe9b](https://github.com/postalsys/emailengine/commit/d2ebe9b3c19cd0bcaaf0fa17d40148f79dd7cd2b))
9
+
10
+ ## [2.67.1](https://github.com/postalsys/emailengine/compare/v2.67.0...v2.67.1) (2026-04-17)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * detect IMAP drift that landed during an in-progress sync ([8fece8a](https://github.com/postalsys/emailengine/commit/8fece8ad6f3acb5e7391da7a9740279099f62177))
16
+ * improve translation quality across 6 languages ([d7d338e](https://github.com/postalsys/emailengine/commit/d7d338e761152909d4c2ca4732fafb60529413ab))
17
+ * pin undici to 7.25.0 for Node 20 compatibility ([3fa80db](https://github.com/postalsys/emailengine/commit/3fa80db4d64d6fe089fa3a1a0e700a188aeb74f7))
18
+
3
19
  ## [2.67.0](https://github.com/postalsys/emailengine/compare/v2.66.0...v2.67.0) (2026-03-31)
4
20
 
5
21
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "creationTime": "2026-03-30T14:45:52.000000",
2
+ "creationTime": "2026-04-16T14:45:56.000000",
3
3
  "prefixes": [
4
4
  {
5
5
  "ipv6Prefix": "2001:4860:4801:2008::/64"
@@ -706,12 +706,20 @@ class Mailbox {
706
706
 
707
707
  /**
708
708
  * Checks if partial sync should run after EXISTS event
709
- * @returns {Boolean} True if message count differs from stored count
709
+ * @returns {Boolean} True if any of messages, uidNext or highestModseq drift from stored state
710
710
  */
711
711
  async shouldRunPartialSyncAfterExists() {
712
712
  let storedStatus = await this.getStoredStatus();
713
713
  let mailboxStatus = this.getMailboxStatus();
714
- return mailboxStatus.messages !== storedStatus.messages;
714
+ // Count-only comparison misses balanced churn (an arrival paired with an
715
+ // expunge in the same window) and does not work at all in 'fast' indexer
716
+ // mode where onExpunge never updates the stored count. uidNext and
717
+ // highestModseq catch those cases.
718
+ return (
719
+ mailboxStatus.messages !== storedStatus.messages ||
720
+ mailboxStatus.uidNext !== storedStatus.uidNext ||
721
+ mailboxStatus.highestModseq !== storedStatus.highestModseq
722
+ );
715
723
  }
716
724
 
717
725
  /**
@@ -346,7 +346,9 @@ class SyncOperations {
346
346
  }
347
347
  }
348
348
 
349
- await this.mailbox.updateStoredStatus(this.mailbox.getMailboxStatus());
349
+ // Persist the pre-sync snapshot so any arrivals that landed
350
+ // during this FETCH are still detected as drift on the next trigger.
351
+ await this.mailbox.updateStoredStatus(mailboxStatus);
350
352
 
351
353
  await this.mailbox.publishSyncedEvents(storedStatus);
352
354
  } finally {
@@ -502,7 +504,9 @@ class SyncOperations {
502
504
  }
503
505
  }
504
506
 
505
- await this.mailbox.updateStoredStatus(this.mailbox.getMailboxStatus());
507
+ // Persist the pre-sync snapshot so any arrivals that landed
508
+ // during this FETCH are still detected as drift on the next trigger.
509
+ await this.mailbox.updateStoredStatus(mailboxStatus);
506
510
 
507
511
  await this.mailbox.publishSyncedEvents(storedStatus);
508
512
  } finally {
@@ -826,9 +830,10 @@ class SyncOperations {
826
830
  }
827
831
  }
828
832
 
829
- // Update status with full sync timestamp
830
- let status = this.mailbox.getMailboxStatus();
831
- status.lastFullSync = new Date();
833
+ // Persist the pre-sync snapshot (plus the full-sync timestamp) so
834
+ // any arrivals that landed during this FETCH are still detected as
835
+ // drift on the next trigger.
836
+ let status = Object.assign({}, mailboxStatus, { lastFullSync: new Date() });
832
837
 
833
838
  await this.mailbox.updateStoredStatus(status);
834
839
  let storedStatus = await this.mailbox.getStoredStatus();
@@ -1671,12 +1671,9 @@ class OAuth2AppsHandler {
1671
1671
  }
1672
1672
  }
1673
1673
 
1674
- /**
1675
- * Returns true if the given OAuth2 app uses API-based access (Graph API, Gmail API)
1676
- * rather than IMAP/SMTP. Service account providers always use API access.
1677
- */
1674
+ // gmailService uses JWT -> IMAP XOAUTH2, so it is NOT API-based even though it is a service-account provider.
1678
1675
  function isApiBasedApp(app) {
1679
- return app && (app.baseScopes === 'api' || SERVICE_ACCOUNT_PROVIDERS.has(app.provider));
1676
+ return app && (app.baseScopes === 'api' || app.provider === 'outlookService');
1680
1677
  }
1681
1678
 
1682
1679
  module.exports = {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emailengine-app",
3
- "version": "2.67.0",
3
+ "version": "2.67.2",
4
4
  "private": false,
5
5
  "productTitle": "EmailEngine",
6
6
  "description": "Email Sync Engine",
@@ -43,36 +43,36 @@
43
43
  },
44
44
  "homepage": "https://emailengine.app/",
45
45
  "dependencies": {
46
- "@bugsnag/js": "8.8.1",
47
- "@bull-board/api": "6.20.6",
48
- "@bull-board/hapi": "6.20.6",
46
+ "@bugsnag/js": "8.9.0",
47
+ "@bull-board/api": "7.0.0",
48
+ "@bull-board/hapi": "7.0.0",
49
49
  "@elastic/elasticsearch": "8.15.3",
50
50
  "@hapi/accept": "6.0.3",
51
51
  "@hapi/bell": "13.1.0",
52
52
  "@hapi/boom": "10.0.1",
53
53
  "@hapi/cookie": "12.0.1",
54
54
  "@hapi/crumb": "9.0.1",
55
- "@hapi/hapi": "21.4.7",
55
+ "@hapi/hapi": "21.4.8",
56
56
  "@hapi/inert": "7.1.0",
57
57
  "@hapi/vision": "7.0.3",
58
58
  "@phc/pbkdf2": "1.1.14",
59
59
  "@postalsys/bounce-classifier": "^2.4.0",
60
60
  "@postalsys/certs": "1.0.14",
61
61
  "@postalsys/ee-client": "1.3.0",
62
- "@postalsys/email-ai-tools": "1.13.0",
63
- "@postalsys/email-text-tools": "2.4.3",
62
+ "@postalsys/email-ai-tools": "1.13.4",
63
+ "@postalsys/email-text-tools": "2.4.5",
64
64
  "@postalsys/gettext": "4.1.1",
65
65
  "@postalsys/joi-messages": "1.0.5",
66
66
  "@postalsys/templates": "2.0.1",
67
67
  "@simplewebauthn/browser": "^13.3.0",
68
68
  "@simplewebauthn/server": "^13.3.0",
69
- "@zone-eu/mailsplit": "5.4.8",
69
+ "@zone-eu/mailsplit": "5.4.9",
70
70
  "@zone-eu/wild-config": "1.7.3",
71
71
  "ace-builds": "1.43.6",
72
72
  "base32.js": "0.1.0",
73
- "bullmq": "5.71.1",
73
+ "bullmq": "5.74.1",
74
74
  "compare-versions": "6.1.1",
75
- "dotenv": "17.3.1",
75
+ "dotenv": "17.4.2",
76
76
  "encoding-japanese": "2.2.0",
77
77
  "exponential-backoff": "3.1.3",
78
78
  "gettext-parser": "7.0.1",
@@ -84,50 +84,50 @@
84
84
  "html-to-text": "9.0.5",
85
85
  "ical.js": "1.5.0",
86
86
  "iconv-lite": "0.7.2",
87
- "imapflow": "1.2.18",
87
+ "imapflow": "1.3.2",
88
88
  "ioredfour": "1.4.1",
89
89
  "ioredis": "5.10.1",
90
90
  "ipaddr.js": "2.3.0",
91
91
  "joi": "17.13.3",
92
92
  "jquery": "4.0.0",
93
93
  "libbase64": "1.3.0",
94
- "libmime": "5.3.7",
94
+ "libmime": "5.3.8",
95
95
  "libqp": "2.1.1",
96
96
  "license-checker": "25.0.1",
97
- "mailparser": "3.9.6",
97
+ "mailparser": "3.9.8",
98
98
  "marked": "9.1.6",
99
99
  "minimist": "1.2.8",
100
100
  "msgpack5": "6.0.2",
101
101
  "murmurhash": "2.0.1",
102
102
  "nanoid": "3.3.8",
103
- "nodemailer": "8.0.4",
103
+ "nodemailer": "8.0.5",
104
104
  "pino": "10.3.1",
105
105
  "popper.js": "1.16.1",
106
106
  "prom-client": "15.1.3",
107
107
  "psl": "1.15.0",
108
- "pubface": "1.1.0",
108
+ "pubface": "1.1.1",
109
109
  "punycode.js": "2.3.1",
110
110
  "qrcode": "1.5.4",
111
- "smtp-server": "3.18.3",
111
+ "smtp-server": "3.18.4",
112
112
  "socks": "2.8.7",
113
113
  "speakeasy": "2.0.0",
114
114
  "startbootstrap-sb-admin-2": "3.3.7",
115
115
  "timezones-list": "3.1.0",
116
- "undici": "7.24.6",
116
+ "undici": "7.25.0",
117
117
  "xml2js": "0.6.2"
118
118
  },
119
119
  "devDependencies": {
120
120
  "@eslint/js": "10.0.1",
121
121
  "chai": "4.3.10",
122
- "eerawlog": "1.5.1",
123
- "eslint": "10.1.0",
124
- "grunt": "1.6.1",
122
+ "eerawlog": "1.5.3",
123
+ "eslint": "10.2.0",
124
+ "grunt": "1.6.2",
125
125
  "grunt-cli": "1.5.0",
126
126
  "grunt-shell-spawn": "0.5.0",
127
127
  "grunt-wait": "0.3.0",
128
128
  "jsxgettext": "0.11.0",
129
129
  "pino-pretty": "13.0.0",
130
- "prettier": "3.8.1",
130
+ "prettier": "3.8.3",
131
131
  "resedit": "3.0.2",
132
132
  "spdx-satisfies": "6.0.0",
133
133
  "supertest": "7.2.2",