emailengine-app 2.62.2 → 2.63.0

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.63.0](https://github.com/postalsys/emailengine/compare/v2.62.2...v2.63.0) (2026-02-19)
4
+
5
+
6
+ ### Features
7
+
8
+ * flag nested message/rfc822 attachments with encodedInMessage property ([7e51024](https://github.com/postalsys/emailengine/commit/7e51024c690235e36cbbf8297939f0a41002b05e))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * prevent permanently lost accounts after worker crashes ([3deabb5](https://github.com/postalsys/emailengine/commit/3deabb55b195601bf0c14d248257cc8a4aac76d2))
14
+
3
15
  ## [2.62.2](https://github.com/postalsys/emailengine/compare/v2.62.1...v2.62.2) (2026-02-07)
4
16
 
5
17
 
@@ -1,5 +1,5 @@
1
1
  {
2
- "creationTime": "2026-02-06T15:46:55.000000",
2
+ "creationTime": "2026-02-18T15:45:53.000000",
3
3
  "prefixes": [
4
4
  {
5
5
  "ipv6Prefix": "2001:4860:4801:2008::/64"
@@ -2269,7 +2269,7 @@ class GmailClient extends BaseClient {
2269
2269
  * @param {Object} node - MIME part node
2270
2270
  * @param {boolean} isRelated - Whether part is inside multipart/related
2271
2271
  */
2272
- let walk = (node, isRelated) => {
2272
+ let walk = (node, isRelated, isEnclosed) => {
2273
2273
  if (node.mimeType === 'multipart/related') {
2274
2274
  isRelated = true;
2275
2275
  }
@@ -2309,7 +2309,8 @@ class GmailClient extends BaseClient {
2309
2309
  encodedSize: node.body.size,
2310
2310
 
2311
2311
  embedded: isRelated,
2312
- inline: disposition?.value === 'inline' || (!disposition && isRelated)
2312
+ inline: disposition?.value === 'inline' || (!disposition && isRelated),
2313
+ encodedInMessage: isEnclosed || false
2313
2314
  };
2314
2315
 
2315
2316
  if (node.filename) {
@@ -2360,11 +2361,12 @@ class GmailClient extends BaseClient {
2360
2361
 
2361
2362
  // Process child parts
2362
2363
  if (node.parts) {
2363
- node.parts.forEach(childNode => walk(childNode, isRelated));
2364
+ let enclosed = isEnclosed || node.mimeType === 'message/rfc822';
2365
+ node.parts.forEach(childNode => walk(childNode, isRelated, enclosed));
2364
2366
  }
2365
2367
  };
2366
2368
 
2367
- walk(messageData.payload, false);
2369
+ walk(messageData.payload, false, false);
2368
2370
 
2369
2371
  // Concatenate text parts
2370
2372
  for (let i = 0; i < textContents.length; i++) {
@@ -1794,7 +1794,7 @@ class Mailbox {
1794
1794
  let encodedTextSize = {};
1795
1795
 
1796
1796
  // Recursively walk body structure tree
1797
- let walk = (node, isRelated) => {
1797
+ let walk = (node, isRelated, isEnclosed) => {
1798
1798
  if (node.type === 'multipart/related') {
1799
1799
  isRelated = true;
1800
1800
  }
@@ -1810,7 +1810,8 @@ class Mailbox {
1810
1810
  encodedSize: node.size,
1811
1811
 
1812
1812
  embedded: isRelated,
1813
- inline: node.disposition === 'inline' || (!node.disposition && isRelated)
1813
+ inline: node.disposition === 'inline' || (!node.disposition && isRelated),
1814
+ encodedInMessage: isEnclosed || false
1814
1815
  };
1815
1816
 
1816
1817
  // Extract filename from disposition or content-type parameters
@@ -1854,11 +1855,12 @@ class Mailbox {
1854
1855
 
1855
1856
  // Recursively process multipart children
1856
1857
  if (node.childNodes) {
1857
- node.childNodes.forEach(childNode => walk(childNode, isRelated));
1858
+ let enclosed = isEnclosed || node.type === 'message/rfc822';
1859
+ node.childNodes.forEach(childNode => walk(childNode, isRelated, enclosed));
1858
1860
  }
1859
1861
  };
1860
1862
 
1861
- walk(bodyStructure, false);
1863
+ walk(bodyStructure, false, false);
1862
1864
 
1863
1865
  return {
1864
1866
  attachments,
package/lib/schemas.js CHANGED
@@ -900,6 +900,9 @@ const attachmentSchema = Joi.object({
900
900
  .label('AttachmentEncodedSize'),
901
901
  embedded: Joi.boolean().example(true).description('Whether the attachment is embedded in the HTML content'),
902
902
  inline: Joi.boolean().example(true).description('Whether the attachment should be displayed inline rather than as a download'),
903
+ encodedInMessage: Joi.boolean()
904
+ .example(false)
905
+ .description('Whether the attachment is part of an enclosed message/rfc822 attachment rather than the message itself'),
903
906
  contentId: Joi.string().example('<unique-image-id@localhost>').description('Content-ID header value used for embedding images in HTML'),
904
907
  filename: Joi.string().example('image.png').description('Original filename of the attachment'),
905
908
  method: Joi.string().example('REQUEST').description('Calendar method (REQUEST, REPLY, CANCEL, etc.) for iCalendar attachments')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "emailengine-app",
3
- "version": "2.62.2",
3
+ "version": "2.63.0",
4
4
  "private": false,
5
5
  "productTitle": "EmailEngine",
6
6
  "description": "Email Sync Engine",
@@ -44,15 +44,15 @@
44
44
  "homepage": "https://emailengine.app/",
45
45
  "dependencies": {
46
46
  "@bugsnag/js": "8.8.1",
47
- "@bull-board/api": "6.16.4",
48
- "@bull-board/hapi": "6.16.4",
47
+ "@bull-board/api": "6.19.0",
48
+ "@bull-board/hapi": "6.19.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.4",
55
+ "@hapi/hapi": "21.4.5",
56
56
  "@hapi/inert": "7.1.0",
57
57
  "@hapi/vision": "7.0.3",
58
58
  "@phc/pbkdf2": "1.1.14",
@@ -68,9 +68,9 @@
68
68
  "@zone-eu/wild-config": "1.7.3",
69
69
  "ace-builds": "1.43.6",
70
70
  "base32.js": "0.1.0",
71
- "bullmq": "5.67.3",
71
+ "bullmq": "5.69.3",
72
72
  "compare-versions": "6.1.1",
73
- "dotenv": "17.2.4",
73
+ "dotenv": "17.3.1",
74
74
  "encoding-japanese": "2.2.0",
75
75
  "exponential-backoff": "3.1.3",
76
76
  "gettext-parser": "7.0.1",
@@ -82,9 +82,9 @@
82
82
  "html-to-text": "9.0.5",
83
83
  "ical.js": "1.5.0",
84
84
  "iconv-lite": "0.7.2",
85
- "imapflow": "1.2.9",
85
+ "imapflow": "1.2.10",
86
86
  "ioredfour": "1.3.0-ioredis-07",
87
- "ioredis": "5.9.2",
87
+ "ioredis": "5.9.3",
88
88
  "ipaddr.js": "2.3.0",
89
89
  "joi": "17.13.3",
90
90
  "jquery": "4.0.0",
@@ -99,7 +99,7 @@
99
99
  "murmurhash": "2.0.1",
100
100
  "nanoid": "3.3.8",
101
101
  "nodemailer": "8.0.1",
102
- "pino": "10.3.0",
102
+ "pino": "10.3.1",
103
103
  "popper.js": "1.16.1",
104
104
  "prom-client": "15.1.3",
105
105
  "psl": "1.15.0",
@@ -111,7 +111,7 @@
111
111
  "speakeasy": "2.0.0",
112
112
  "startbootstrap-sb-admin-2": "3.3.7",
113
113
  "timezones-list": "3.1.0",
114
- "undici": "7.21.0",
114
+ "undici": "7.22.0",
115
115
  "xml2js": "0.6.2"
116
116
  },
117
117
  "devDependencies": {
@@ -126,7 +126,7 @@
126
126
  "jsxgettext": "0.11.0",
127
127
  "pino-pretty": "13.0.0",
128
128
  "prettier": "3.8.1",
129
- "resedit": "3.0.1",
129
+ "resedit": "3.0.2",
130
130
  "spdx-satisfies": "6.0.0",
131
131
  "supertest": "7.2.2",
132
132
  "xgettext-template": "5.0.0"