domma-cms 1.29.1 → 1.30.1

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.
Files changed (84) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/docs/DommaFeatures.md +1 -1
  3. package/package.json +1 -1
  4. package/plugins/_lib/admin/mail/body-menu.js +1 -1
  5. package/plugins/_lib/admin/mail/cms-host.js +1 -1
  6. package/plugins/_lib/admin/mail/compose-window.js +1 -1
  7. package/plugins/_lib/admin/mail/contacts.js +1 -1
  8. package/plugins/_lib/admin/mail/diagnostics-section.js +1 -1
  9. package/plugins/_lib/admin/mail/drag-drop.js +1 -1
  10. package/plugins/_lib/admin/mail/folder-tree.js +22 -1
  11. package/plugins/_lib/admin/mail/font-controls.js +1 -1
  12. package/plugins/_lib/admin/mail/fonts.js +1 -1
  13. package/plugins/_lib/admin/mail/host-context.js +1 -1
  14. package/plugins/_lib/admin/mail/identity.js +1 -1
  15. package/plugins/_lib/admin/mail/image-senders-section.js +68 -1
  16. package/plugins/_lib/admin/mail/keyboard.js +1 -1
  17. package/plugins/_lib/admin/mail/mail.css +1 -1
  18. package/plugins/_lib/admin/mail/mail.html +1 -1
  19. package/plugins/_lib/admin/mail/message-actions.js +1 -1
  20. package/plugins/_lib/admin/mail/oauth-panel.js +1 -1
  21. package/plugins/_lib/admin/mail/panes.js +1 -1
  22. package/plugins/_lib/admin/mail/reader-kit.js +1 -1
  23. package/plugins/_lib/admin/mail/reader-runtime.js +91 -5
  24. package/plugins/_lib/admin/mail/reader-view.js +1 -1
  25. package/plugins/_lib/admin/mail/resizable.js +1 -1
  26. package/plugins/_lib/admin/mail/restore-spam.js +1 -1
  27. package/plugins/_lib/admin/mail/rules.js +7 -3
  28. package/plugins/_lib/admin/mail/scheduling.js +1 -1
  29. package/plugins/_lib/admin/mail/section-kit.js +1 -1
  30. package/plugins/_lib/admin/mail/security-note.js +1 -1
  31. package/plugins/_lib/admin/mail/settings-section.js +1 -1
  32. package/plugins/_lib/admin/mail/templates.js +1 -1
  33. package/plugins/_lib/admin/mail/threads.js +1 -1
  34. package/plugins/_lib/admin/mail/vacation.js +1 -1
  35. package/plugins/_lib/admin/mail/when-closed.js +1 -1
  36. package/plugins/_lib/admin/ui/dates.js +1 -1
  37. package/plugins/_lib/admin/ui/resizable.js +1 -1
  38. package/plugins/_lib/domma-mail.lock.json +80 -79
  39. package/plugins/_lib/mail/accountFileStore.js +1 -1
  40. package/plugins/_lib/mail/accountRepository.js +36 -2
  41. package/plugins/_lib/mail/accountRoutes.js +1 -1
  42. package/plugins/_lib/mail/accounts.js +1 -1
  43. package/plugins/_lib/mail/bodyTokenProvider.js +1 -1
  44. package/plugins/_lib/mail/bodyTokens.js +1 -1
  45. package/plugins/_lib/mail/compose.js +1 -1
  46. package/plugins/_lib/mail/defaults.js +1 -1
  47. package/plugins/_lib/mail/envelope.js +1 -1
  48. package/plugins/_lib/mail/folderActions.js +1 -1
  49. package/plugins/_lib/mail/folderRuntime.js +1 -1
  50. package/plugins/_lib/mail/folders.js +1 -1
  51. package/plugins/_lib/mail/imapPoolRuntime.js +1 -1
  52. package/plugins/_lib/mail/mbox.js +1 -1
  53. package/plugins/_lib/mail/message-action.js +1 -1
  54. package/plugins/_lib/mail/messageSecurity.js +1 -1
  55. package/plugins/_lib/mail/messageSecurityProvider.js +1 -1
  56. package/plugins/_lib/mail/networkAddresses.js +1 -1
  57. package/plugins/_lib/mail/networkPolicy.js +1 -1
  58. package/plugins/_lib/mail/oauthAccounts.js +1 -1
  59. package/plugins/_lib/mail/oauthRouteRuntime.js +1 -1
  60. package/plugins/_lib/mail/oauthRuntime.js +1 -1
  61. package/plugins/_lib/mail/pollSchedule.js +1 -1
  62. package/plugins/_lib/mail/poller.js +1 -1
  63. package/plugins/_lib/mail/pollerRuntime.js +1 -1
  64. package/plugins/_lib/mail/priority.js +1 -1
  65. package/plugins/_lib/mail/publicMailbox.js +1 -1
  66. package/plugins/_lib/mail/readRuntime.js +57 -3
  67. package/plugins/_lib/mail/render.js +1 -1
  68. package/plugins/_lib/mail/ruleRunner.js +1 -1
  69. package/plugins/_lib/mail/schedulerRuntime.js +1 -1
  70. package/plugins/_lib/mail/secretProvider.js +1 -1
  71. package/plugins/_lib/mail/secretbox.js +1 -1
  72. package/plugins/_lib/mail/senderAuth.js +113 -0
  73. package/plugins/_lib/mail/sieve.js +7 -2
  74. package/plugins/_lib/mail/smtpService.js +1 -1
  75. package/plugins/_lib/mail/snoozeRuntime.js +1 -1
  76. package/plugins/_lib/mail/store.js +1 -1
  77. package/plugins/_lib/mail/subscriptions.js +1 -1
  78. package/plugins/_lib/mail/syncPlan.js +1 -1
  79. package/plugins/_lib/mail/syncRuntime.js +1 -1
  80. package/plugins/_lib/mail/syncSelection.js +1 -1
  81. package/plugins/_lib/mail/unreadBadge.js +1 -1
  82. package/plugins/_lib/mail/unsubscribe.js +1 -1
  83. package/plugins/_lib/mail/vacationRuntime.js +1 -1
  84. package/plugins/_lib/mail/write.js +4 -2
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/settings-section.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/settings-section.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Browser preferences for the shared mail reader. */
4
4
  export const READ_DELAY_KEY = 'domma-mail.mark-read-seconds';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/templates.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/templates.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  const MAIL_MODULE_VERSION = new URL(import.meta.url).searchParams.get('v') ?? '1';
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/threads.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/threads.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Grouping messages into conversations.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/vacation.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/vacation.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The automatic reply, and everything that must stop it.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/mail/when-closed.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/admin/mail/when-closed.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Run code when a Domma modal or slideover actually closes.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/ui/dates.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/admin/ui/dates.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Dates as a plugin shows them to a person: dd/mm/yyyy, and dd/mm/yyyy HH:mm
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/admin/ui/resizable.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/admin/ui/resizable.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Making a slideover resizable.
@@ -1,85 +1,86 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "package": "@domma-mail/core",
4
- "version": "0.18.0",
4
+ "version": "0.20.0",
5
5
  "files": {
6
- "plugins/_lib/mail/defaults.js": "105fd07e1e866b8ae44805906c431c3bff0148bcab62490239ea4a8a975f9dce",
7
- "plugins/_lib/mail/priority.js": "f3de03b7d43863fa7bd6b890d5877709489d4aacb870a1f9ebecc0f08a0245c7",
8
- "plugins/_lib/mail/envelope.js": "20c29d34e1df3909c96df3bab50e4de1752f659a08c847777396b1ed9c3a5970",
9
- "plugins/_lib/mail/pollSchedule.js": "03b5c2720b18a59a8bc491409865e2eb674bb573396755e52b9a7c7ea8b6fd25",
10
- "plugins/_lib/mail/syncPlan.js": "c136b5f310cfb1942b70a685e99a7c5c2b8d87f3f2c2985991a87ee4451ad5a3",
11
- "plugins/_lib/admin/mail/threads.js": "1947cf2629c7bbb64602af82d6d9b1312873ea6c9e866d8ed7d16f7d506349b7",
12
- "plugins/_lib/admin/mail/vacation.js": "3e719509c2d2f217e5caa4746c392c5ab351e838872e0dc2c441bcc1d9e403fd",
13
- "plugins/_lib/mail/secretProvider.js": "c1f673bff58955a618bf80c813dd63f7aeac96c2b472f93d7a518770f629fdf6",
14
- "plugins/_lib/mail/secretbox.js": "591cbdd56bad94e17857286790a121eb15e19e1a2530542e5abf181c4398fa9f",
15
- "plugins/_lib/mail/bodyTokenProvider.js": "a2318d6b74b8ce32095cd9369d644d565884b142975e334b0a29c3a4eea99409",
16
- "plugins/_lib/mail/bodyTokens.js": "e9cc8d1bb8bdc3c09575b787ae1ab7fa5b195dd22f68582c235a5086caa92601",
17
- "plugins/_lib/mail/accountFileStore.js": "54ca567c664e36b9d2a5fd2c7f0a84cbe9ace7ebce9ad9807d541dc4c1aa10a7",
18
- "plugins/_lib/mail/accountRepository.js": "c53f3679a2249e97427271b7ee06c0111a25a03f9289c803b2aba14f8aa9857e",
19
- "plugins/_lib/mail/accountRoutes.js": "3a7f5815057d6c91391f2cfbf3edbe558eb24a357d2577c0c019d38a5c188c2a",
20
- "plugins/_lib/mail/networkAddresses.js": "07029d6310e941c6f653044723d95a66f3f8b5b88f1e607d2ba2dd31b27eefcb",
21
- "plugins/_lib/mail/networkPolicy.js": "52a4c4afec1b34234028f6a8285ef82e257af9ccc0e9e40e1fcd8e6b6cbd292f",
22
- "plugins/_lib/mail/imapPoolRuntime.js": "74a8ce82b0e8a80e6144a534eb15dc10fd3a00d4e90ff2c8f8167cf6a985df6e",
23
- "plugins/_lib/mail/publicMailbox.js": "1c97852acc98a4b2e972fb5c0dffe734874bf0091c03adbc4be2c485cd56aebf",
24
- "plugins/_lib/mail/render.js": "cc2fce4e30a09a004e2718c186c575441328d31333df595686b954c118935df3",
25
- "plugins/_lib/mail/unsubscribe.js": "45cadfad1b7db29887236290c94c9245ccc9c8f6091f8d7ab4e30d734e44c794",
26
- "plugins/_lib/mail/unreadBadge.js": "383afecc5cfdeaa4eb9c3605b16ac36ea5c7da5990a8cc9e0fd69fb9a510e0fd",
27
- "plugins/_lib/mail/message-action.js": "1712772fe8ca0717d1bb8b278f82d18a6b2009a24dc6233e6df37e23c0167f29",
28
- "plugins/_lib/admin/mail/identity.js": "9cefae6a12c8f8bc200481f328008cf270373fcfaeed17c7b9a766520b23ae79",
29
- "plugins/_lib/mail/messageSecurityProvider.js": "7dec2b5bcf805995ac6d518e9824672a283a64affb6e9c94f93eb416d43a3b31",
30
- "plugins/_lib/mail/messageSecurity.js": "721806164c29de3df7290593757b6a0124954c3f6e509eb98313f25f4d926c56",
31
- "plugins/_lib/mail/smtpService.js": "63d110b9cd2fcad0063c5cec8681edfd5271d83595cb4f1028dac39e0eb3da9e",
32
- "plugins/_lib/mail/subscriptions.js": "b606b38a6e99a3d17246d34113292b3c44253fa73c838cb5a27aadf2927f29f8",
33
- "plugins/_lib/mail/readRuntime.js": "b1cb0785b9d66b2f812dfdc77caf394d7b2b4bf92f065270f23e3d41f554ea1e",
34
- "plugins/_lib/admin/mail/image-senders-section.js": "5a17271109847102262b79ce502e2c8eb6e29258b5dfe5c3d0d9ff7497bb5885",
35
- "plugins/_lib/admin/mail/mail.html": "6739574d4133dac848b3f206e490aad71e5b63371642362a492485ddfd0c1447",
36
- "plugins/_lib/admin/mail/section-kit.js": "a3c4c0428418263e865d1091af930ccac38de4420b2e6519dc8dee5572af90de",
37
- "plugins/_lib/admin/mail/when-closed.js": "011a536c7dae7266b8a2d62f8b9d9066be16279a8e1885e313a19228610d71aa",
38
- "plugins/_lib/admin/mail/oauth-panel.js": "85c2b7df45d13899f42d60eed96db8d6f72b7eea38c5e2f568561e3434d99e0e",
39
- "plugins/_lib/admin/mail/rules.js": "e4618e50b7d373818a447f62590b3b7380dc0868721fbf711df49eb0682cd7e1",
40
- "plugins/_lib/admin/mail/reader-kit.js": "9a812f0ba8ee2599ebc5f652e1a652cf271c181d91db387125a058f15931318e",
41
- "plugins/_lib/admin/mail/panes.js": "2f4e59b720c8f0a88e1b9abded6417a83c5042b5d65de2840ec94a9ff42129f9",
42
- "plugins/_lib/admin/mail/contacts.js": "102c877a73561af25db38a99cd6dc37346193a91571eb2684843ac61f217d65e",
43
- "plugins/_lib/admin/mail/message-actions.js": "deaf30df8115ab43cf3f14f72c4e0e7b1a15c13c4e7828c91d6f406595f6aca3",
44
- "plugins/_lib/admin/mail/resizable.js": "ff2a4b6c1ad56c85a9aa7471896aadba337f23c1aecb50927a10ecff847a0132",
45
- "plugins/_lib/admin/mail/settings-section.js": "1a5fd6e65305f8ad99c6cf6edb2c2d876a1a5847d2a0b758ec1aa82b34e2754e",
46
- "plugins/_lib/admin/mail/compose-window.js": "f3e3d8613bcbdf71ee0ffd42bcf4b845bcb69f0843d7b693e343382638802a08",
47
- "plugins/_lib/admin/mail/folder-tree.js": "0e371ec0b6e77ef763d9046c35bd9717ef39561f5ef09aa5a0bae0ac3f646586",
48
- "plugins/_lib/admin/mail/body-menu.js": "e4ccac5114d75411f6d37ab0603a3b574f345f74e3ca44061f9bb643c8370606",
49
- "plugins/_lib/admin/mail/diagnostics-section.js": "b123ca87e6c86bfde0c6890d30bbd9737061fd6b0db97d29b67176fc9dc16433",
50
- "plugins/_lib/admin/mail/drag-drop.js": "5f46c70eb101531ea30d8e7fb8fac7e2ccc59c1c9b6cffa6c42b2467b5a96b63",
51
- "plugins/_lib/admin/mail/scheduling.js": "3fdbecd3f891742194a86dc200f91669ddd347003d6a0f5615eb1089548ee332",
52
- "plugins/_lib/admin/mail/font-controls.js": "3492fc0665131bfe4665d5f1d9e06340529d8bde54cc9d77ce5f5555b168dae5",
53
- "plugins/_lib/admin/mail/fonts.js": "acb141253ef9beefa99257d586f42b8e013895bc2750cbb0d962acb9612ea68d",
54
- "plugins/_lib/admin/mail/keyboard.js": "6207e9a3766233196534cb58e1dbad350579cab815a17ac658f16d6c5e509fd1",
55
- "plugins/_lib/admin/mail/mail.css": "3fad932cb18c9e976e1d8cedd1ba57f8633356b156722c9ebf57bbb760deda67",
56
- "plugins/_lib/admin/mail/reader-view.js": "9f8eefc918ff55c11c56098c00b7f9a5f0d246cf7b53c6e213caa6cfd8150167",
57
- "plugins/_lib/admin/mail/templates.js": "974ca1d8321f8d201c40dfb3a231b3abba637b49610bf6730fb5b170cf4b7276",
58
- "plugins/_lib/admin/mail/security-note.js": "f9df6aff786a275ad710bac92c14e3b6685187d73a84d0eab9995c109ee53d9a",
59
- "plugins/_lib/admin/ui/dates.js": "663c943ca3a723697e7cf8200fa1e487bc5407f9dba8554993a57761651d9e65",
60
- "plugins/_lib/mail/compose.js": "999e9fb99105371a3d3de3b0526b085c10c8d752e80979f122b2a4ac6d95c714",
61
- "plugins/_lib/admin/mail/reader-runtime.js": "58058aec57d775d6523966d68085d8c7937ce3b42c639d41bdaf65cfed4007d7",
62
- "plugins/_lib/admin/mail/host-context.js": "69cd877d35c8d704d6506837f8c8730c22cf7f6d2b90e83dab64a04475fc8595",
63
- "plugins/_lib/admin/mail/cms-host.js": "9a63fbc2185548cfe29039d09a0c97317d7bbdd1eedda89c021607c1d9486191",
64
- "plugins/_lib/admin/ui/resizable.js": "637380d99a7b54380e3b2db629af6ef687ff43dd7fda4e89913f5d760a6c91e1",
65
- "plugins/_lib/mail/store.js": "7a47748aed84afe2adf78f185b6196f91178aafd907ad2caa32237f2987cfea0",
66
- "plugins/_lib/mail/syncSelection.js": "d13c541dab68b8bd16d152b15e92b87de2e753e69c9f22424fc65e15173a4bdb",
67
- "plugins/_lib/mail/pollerRuntime.js": "8a65f499c1495fd7b1a0269de50b5fe51618f91a37fc51c0a6b0728121e6d5f7",
68
- "plugins/_lib/mail/poller.js": "7f7ba828c647845c49570fe8757557236d90a8482181787ce5c24738f1d8a917",
69
- "plugins/_lib/mail/syncRuntime.js": "b30db73ce33fcd1f40820cb940c829cbb552819fa67502e593928d2249f32e39",
70
- "plugins/_lib/mail/write.js": "897d632bbf3861110146ee605749e1402b3ed1d6bc8c21fed74d80d89dac8542",
71
- "plugins/_lib/admin/mail/restore-spam.js": "15d8ad2ffe4c3e46a0b362d3e52e1c50c253d967bedc56fb3f9b8ff54d2d0f46",
72
- "plugins/_lib/mail/folders.js": "cd6336c44e851b0808f0a2b49707a1583bba5d364aee02f7cfa7bce999734b35",
73
- "plugins/_lib/mail/folderActions.js": "77145bb5e5a12654440d11d797dfdfea0ee6ec6ed5616cc7b2cc6ae5e1cc450f",
74
- "plugins/_lib/mail/folderRuntime.js": "b65e644705f88b468665bfc651f1a2b6ab8acacbf98b0c0661386feae88b2b0d",
75
- "plugins/_lib/mail/ruleRunner.js": "1a7c3fe8547940042f9961c76d3d4d0ea571fa08cfa3d48dd9cecc7ac1142958",
76
- "plugins/_lib/mail/schedulerRuntime.js": "1aca32097c14a0486fa439cf7f8c39592a39e42c8a139f2107828b1db4800b90",
77
- "plugins/_lib/mail/snoozeRuntime.js": "bf99e79c5129890b737b15557758122454cefc82c838f54f176920270fc632ab",
78
- "plugins/_lib/mail/vacationRuntime.js": "2c52e1fa0d4bf927638d599a23fbd589e3a945371bea5eeb06db9429808a5e56",
79
- "plugins/_lib/mail/mbox.js": "da707c182a54a1e6f4dece14091620c9047b6b1956c71e8d9f4fff033283ff6c",
80
- "plugins/_lib/mail/sieve.js": "65d691af9eb3d5bb372ba61b7709abc93fd5c2d31309ee085db60ea086257a4f",
81
- "plugins/_lib/mail/oauthRuntime.js": "c2d1b8c42c6fd0bcf243906e1b6ff51a29278849efd281bf07829e154ec8b1cd",
82
- "plugins/_lib/mail/oauthRouteRuntime.js": "211c22b91d8f56d7fc4b593177f9361fed28c8fe0cf5d7b5b4d386e8a42f1edf",
83
- "plugins/_lib/mail/oauthAccounts.js": "40aae0c68971e087afb1dd513026ccbe7505cc5ecfa067e1e0a1721ee590aa4b"
6
+ "plugins/_lib/mail/defaults.js": "1401f4511c6e1c2d60a2eec2bc2bc5d2d3f8485d4e700e1759a1ce613309af03",
7
+ "plugins/_lib/mail/priority.js": "7f55b1363954ada24e5b13b14a328f017b826d4c1433709d58650d6e6caf27d5",
8
+ "plugins/_lib/mail/envelope.js": "2abec599965eb1cf3e1fb624a1010ab277fd5db7fd90e865e96e545a2bf60a1e",
9
+ "plugins/_lib/mail/pollSchedule.js": "d0cfc98b4c7260db17bc86172131a2dea8b6a082bf49cd02772c4bdd9a08d3a3",
10
+ "plugins/_lib/mail/syncPlan.js": "a2208a3db9df536ad7f35e1d53b771c550e3b76c21937ec38ebc6bb83675bd0c",
11
+ "plugins/_lib/admin/mail/threads.js": "6239180f1094e613a194445d0b3ef35c84ee1d33518a739f918a2363fc1d2646",
12
+ "plugins/_lib/admin/mail/vacation.js": "c73b3f586bc11df4a74f6833aa773c8a6f87c9b3367951eef0cb40c50d28e03b",
13
+ "plugins/_lib/mail/secretProvider.js": "28a8cfd0206499f52f81a9106cd9df7be4ec859cc5f7c14f328ba7a47e75a2da",
14
+ "plugins/_lib/mail/secretbox.js": "c8d7cf45d716e030a1b41e53b339d55d9f17b4e76ae570f18aa5d9b26f62a96b",
15
+ "plugins/_lib/mail/bodyTokenProvider.js": "20fe75db9f7aee0df0c3208d3e7744997ee4d60073655d0ef738bd9ac06c70b6",
16
+ "plugins/_lib/mail/bodyTokens.js": "39008557223f6c1136612a94b8ef64534124c50386680a985b9283d085e56f02",
17
+ "plugins/_lib/mail/accountFileStore.js": "d025543548bdc278a6861b98a924bb4f793d69fafcbd32b857897d0a9e6a98a8",
18
+ "plugins/_lib/mail/accountRepository.js": "b502cb3c669cf43960fc47d2686bf09f2089a2c20bd25af8ba8195456f872965",
19
+ "plugins/_lib/mail/accountRoutes.js": "da105bf4f25f461edc9968eeee3109f2e36d73f3d46043752542eaf9b478ddbb",
20
+ "plugins/_lib/mail/networkAddresses.js": "dbfced8fb48e592a432677bb6fc26ca562f415314b8b3911bbf8403e03dee058",
21
+ "plugins/_lib/mail/networkPolicy.js": "0694a1ee174ea98410b76b99aa89e1a4bee9d3d1fffeaabb3262f232812f9e3a",
22
+ "plugins/_lib/mail/imapPoolRuntime.js": "4aa5f1ea901f0a461b6253ce3c63c56c06558d41dc75d6b511e17278d637b647",
23
+ "plugins/_lib/mail/publicMailbox.js": "02ce9383f6bc56d03a81b48261136f7ab1d379aa77d4527b1fb71b73bd7aa620",
24
+ "plugins/_lib/mail/render.js": "984a9ec71343d795c00186213d6a11c34908b66ea712eba6632fc0fab914905a",
25
+ "plugins/_lib/mail/unsubscribe.js": "c216be30ac3a70c9847b19a90eb7fd7f34daa3cf368f70e4b5dcc326609be915",
26
+ "plugins/_lib/mail/unreadBadge.js": "56d83f73d1cf127c971bf2c3b08806cc39ce20c55c2bde75f8820c7145161a97",
27
+ "plugins/_lib/mail/message-action.js": "bcc682e2b5d8b7943a16359ff938fa10109e11c2295ec3a54e93ec87b1b06f9a",
28
+ "plugins/_lib/admin/mail/identity.js": "1931f8ea34a2746d01d64094a0fdd5c2b026b95d2e9ea2e5c928ced9537a3b40",
29
+ "plugins/_lib/mail/messageSecurityProvider.js": "5358f9662e711a3b904460430937de022b6a5e8c5d61fa4d01aebf664a85367d",
30
+ "plugins/_lib/mail/messageSecurity.js": "81b3427af0fec5bd1cbe3056d357b397f4e68a92e58ef9ebc30f03682889e7d4",
31
+ "plugins/_lib/mail/smtpService.js": "ea2aa77aa2c28ab6abb243b56b264a00ac4cdcffe9022c33d22a769a1f38ad47",
32
+ "plugins/_lib/mail/subscriptions.js": "ca4b68195129a62ae4213a3b04ef911fdab98951575ae8ece3979135e16f73a9",
33
+ "plugins/_lib/mail/senderAuth.js": "953b7638dd0d90c480ce1294d67d11072bcbb6253fdcd7a3bd67f574958cf825",
34
+ "plugins/_lib/mail/readRuntime.js": "86f95ca07fa85217036020517a8b9158ed1dd64557f01a04a37897e08b285734",
35
+ "plugins/_lib/admin/mail/image-senders-section.js": "fb5c8ed3183854aff0ce68ffe0a7bc304997d114fda9a8310ced02ca8ad23ae0",
36
+ "plugins/_lib/admin/mail/mail.html": "76a926fa5effef258b67d33a48935791de06853b608a06594143fe7efa5e1415",
37
+ "plugins/_lib/admin/mail/section-kit.js": "c4bcd4cf0db2a2951c67da6ead01855bbde848cd6d7212bd1e250c212c4a19e3",
38
+ "plugins/_lib/admin/mail/when-closed.js": "dd1dbda9969b3c2377d67e492b1b9cb408e9eaa6a5722d6affd7557840733eb1",
39
+ "plugins/_lib/admin/mail/oauth-panel.js": "f5dafe658c53f1e75b7c95e77b1101e072dfe0bf6090cc8d66561ddda7aa419a",
40
+ "plugins/_lib/admin/mail/rules.js": "bf149ad81fc02fac0aaa469f57327bddb26189127cb47e3b5ed1c216f20b0b42",
41
+ "plugins/_lib/admin/mail/reader-kit.js": "8030a7a25f05f19926ff435187b35f1de4936eef9c69cded2cb067900a2d5bb8",
42
+ "plugins/_lib/admin/mail/panes.js": "9d8ec696421e9db0e2e51425d9baccc5d2ce239556855a153240476483233cf7",
43
+ "plugins/_lib/admin/mail/contacts.js": "a40cc9337ca2d6b8635b0ec8d0f0bc9921c50b0478dab92b69ffc03f22864dd0",
44
+ "plugins/_lib/admin/mail/message-actions.js": "20c5d76395e4ac97e9676066f096fb99a5c02c0daa88e9d3a682f24ed8bf010e",
45
+ "plugins/_lib/admin/mail/resizable.js": "ff54b2a738f87188b20eabf344aa7e493ab6d11e7553d90b367dace2d7a3efcf",
46
+ "plugins/_lib/admin/mail/settings-section.js": "6ad552eab8188f0e38533cc4b8403b31bac2eca01485ababdc532afe99937895",
47
+ "plugins/_lib/admin/mail/compose-window.js": "0ed5aea919182d0d857e4f398f321762c029b08f248f825dcf2f8d3eae0b8c6e",
48
+ "plugins/_lib/admin/mail/folder-tree.js": "32040a83e8ef265ae99bad062caf10d8572b9a580a9e9d74da96b8778fbdeb9f",
49
+ "plugins/_lib/admin/mail/body-menu.js": "080e7a008f24ad17edd8136385c52d45a6e3fde89444481010f9e8f720f68e22",
50
+ "plugins/_lib/admin/mail/diagnostics-section.js": "8e0ad9853b529b26c11477829ec7b6a4d5e3f056960340046ef101022dd57b03",
51
+ "plugins/_lib/admin/mail/drag-drop.js": "3e3dbae0aade8c8a17b0d9b16ca30ceb45ca37c9f904c5e8717d7977d5174909",
52
+ "plugins/_lib/admin/mail/scheduling.js": "9e1aceee740b1b668842df0e70b6424bdc8cbf5d4cb6143340804e7ca0831daa",
53
+ "plugins/_lib/admin/mail/font-controls.js": "2bf04cb9e8e179d7ad93e17692a421af560f4d96de9eb80086267612ec4b8782",
54
+ "plugins/_lib/admin/mail/fonts.js": "81f71d2ee012e1fdb69607d543586a5f097dc0da9b33ca251ded604bd9493726",
55
+ "plugins/_lib/admin/mail/keyboard.js": "a2e714cebc46ae32c6f9d1c5ec84a5526f4cffaa6b8343a0aae405365ab61d2e",
56
+ "plugins/_lib/admin/mail/mail.css": "adbfec0de00c839e7ae071489f96017386a67557557b46513b0191f1342af4c5",
57
+ "plugins/_lib/admin/mail/reader-view.js": "6ef72e7e0a2254c72eb6250f20ef1677817dfca0675dbfbc70d3ee65790c4819",
58
+ "plugins/_lib/admin/mail/templates.js": "e943fc703d46aabe539e461b04eac480419cc12fefa294ff7d0a73bf542c3bb8",
59
+ "plugins/_lib/admin/mail/security-note.js": "d493837372311bf5d1989406bb3e6792299638ed237d5d99226d53c316df4ff9",
60
+ "plugins/_lib/admin/ui/dates.js": "e57e70651df306110d0108c3859465496902a118c5bf2329b6fd360b01b413cc",
61
+ "plugins/_lib/mail/compose.js": "22c7a2869e64c6b06ef9fe00612e7c4e83331f75a6615c35e9154bf84d6427b4",
62
+ "plugins/_lib/admin/mail/reader-runtime.js": "d942e73ad872a9ba5c0961fe1df68eb2f6317f55e8f855e79479c57484289a87",
63
+ "plugins/_lib/admin/mail/host-context.js": "b2904b2ea7c4ee16ef1cbccc72b798ee22484c19a2dd0857b780424e7698234d",
64
+ "plugins/_lib/admin/mail/cms-host.js": "8d286ce33fbccb3e73f58e394692c39b406973db22dd833423fd10a235194c01",
65
+ "plugins/_lib/admin/ui/resizable.js": "aabc7eec6d41477fc5a78d0e0e180153ca5710bd65a549e744ed934b79fa31c6",
66
+ "plugins/_lib/mail/store.js": "9190df9ca575b3191726361abfd87398fc762d9bada05aa1749b9a2a3c33bffd",
67
+ "plugins/_lib/mail/syncSelection.js": "50f44b1f5db63ec024bdc12eaaf14974fb32b3409a6d3bb196937a604db4af10",
68
+ "plugins/_lib/mail/pollerRuntime.js": "ec2f0315c8d6399a4ee38c037cb2a6d68a62dd1f1c8a264d4dca627fb64ffcfa",
69
+ "plugins/_lib/mail/poller.js": "5e8dd4e8ea85ba7533c5662cba737efa580c51ab97245a807ffabc84379dac51",
70
+ "plugins/_lib/mail/syncRuntime.js": "2d1ea996248797de80f32969f32c6b56dcaa45913dfeb54d04bf2baa5cf7ddb5",
71
+ "plugins/_lib/mail/write.js": "296a7150af926ea64243e89cfa38ad81a3abfb46352572e4cfdad50ff7187ff4",
72
+ "plugins/_lib/admin/mail/restore-spam.js": "f969d0cab522af550e25bf1b6a8300f860157f2c0c0d3a935b81323560d349e0",
73
+ "plugins/_lib/mail/folders.js": "23bd427fa104026daedb2fd8c4254bd7d6c60080ee72fa615dee351c14020a35",
74
+ "plugins/_lib/mail/folderActions.js": "7cf46d74edb420cec0146f361706979382121762cf72d8cd0d607e5d07660357",
75
+ "plugins/_lib/mail/folderRuntime.js": "3dc54c9869bdaa5a519aa13852a641b09dbed6e0a7010f072b37a0bf544e85e5",
76
+ "plugins/_lib/mail/ruleRunner.js": "62272c316f5156b93af8c60b60b259a46c097f4bab2b346b51e2868e0ce5a651",
77
+ "plugins/_lib/mail/schedulerRuntime.js": "bc402c332836be84441526a8bde7a8e1ccd067297cd0e24f43bc0ae30de74bdb",
78
+ "plugins/_lib/mail/snoozeRuntime.js": "7bf658092fe7091e7b6dc44bf26d90256ce82884e7a686071d101cd24aeea96e",
79
+ "plugins/_lib/mail/vacationRuntime.js": "fca2a398620af7bee24cb9a407bd8972d2507acafb97ac4890c4a8fce3a4343e",
80
+ "plugins/_lib/mail/mbox.js": "e236a6fa65b329a2a561f4612b67048798dcab31aaccdf5a67fb01c1c965e144",
81
+ "plugins/_lib/mail/sieve.js": "9ede75a3d88f8e1b30bd3ff7211057d73414f8e68ecc0892a53e39f227aa905c",
82
+ "plugins/_lib/mail/oauthRuntime.js": "c59992decdfdd54e36cfee3f17bb2394d20d001ba78a600906702a03197ba9e1",
83
+ "plugins/_lib/mail/oauthRouteRuntime.js": "4fbc046dff78a013684b0ae55cb1f15b21f89e4fdb7969244e34b1d31c15b79b",
84
+ "plugins/_lib/mail/oauthAccounts.js": "29950f251b1ce4337a1945c24156d3844da0196415b579bf48a9337b6a9e087c"
84
85
  }
85
86
  }
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/accountFileStore.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/accountFileStore.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {randomUUID} from 'node:crypto';
4
4
  import fs from 'node:fs/promises';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/accountRepository.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/accountRepository.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  export const POLL_INTERVALS = Object.freeze([3, 5, 10, 15]);
4
4
  import {randomUUID} from 'node:crypto';
@@ -454,6 +454,40 @@ export function createAccountRepository({store, secrets, isOAuth = account => ac
454
454
  return (from ?? []).some(entry => trusted.includes(String(entry?.address ?? '').trim().toLowerCase()));
455
455
  }
456
456
 
457
+ /**
458
+ * Images from people in the user's contacts: the switch (on unless set
459
+ * off) and the senders excepted from it ("Block for this sender").
460
+ *
461
+ * @param {string} userId
462
+ * @param {string} accountId
463
+ * @param {{enabled?: boolean, block?: string, unblock?: string}} change
464
+ * @returns {Promise<object|null>}
465
+ */
466
+ async function setContactImages(userId, accountId, {enabled, block, unblock} = {}) {
467
+ return withStoreLock(async () => {
468
+ const all = await readAll();
469
+ const index = all.findIndex(a => a.id === accountId && a.userId === userId);
470
+ if (index === -1) return null;
471
+ const next = {...all[index]};
472
+ if (typeof enabled === 'boolean') next.contactImages = enabled;
473
+ let blocked = Array.isArray(next.contactImageBlocks) ? next.contactImageBlocks : [];
474
+ const clean = value => String(value ?? '').trim().toLowerCase();
475
+ if (clean(block) && !blocked.includes(clean(block))) blocked = [...blocked, clean(block)].slice(-500);
476
+ if (clean(unblock)) blocked = blocked.filter(a => a !== clean(unblock));
477
+ next.contactImageBlocks = blocked;
478
+ all[index] = {...next, updatedAt: new Date().toISOString()};
479
+ await writeAll(all);
480
+ return all[index];
481
+ });
482
+ }
483
+
484
+ /** May a contact's images load for this sender at all (switch on, not excepted)? */
485
+ function contactImagesAllowed(account, address) {
486
+ if (account?.contactImages === false) return false;
487
+ const blocked = Array.isArray(account?.contactImageBlocks) ? account.contactImageBlocks : [];
488
+ return !blocked.includes(String(address ?? '').trim().toLowerCase());
489
+ }
490
+
457
491
  async function setPollInterval(userId, accountId, minutes) {
458
492
  return withStoreLock(async () => {
459
493
  if (minutes !== null && !POLL_INTERVALS.includes(minutes)) {
@@ -613,5 +647,5 @@ export function createAccountRepository({store, secrets, isOAuth = account => ac
613
647
  return all[index];
614
648
  });
615
649
  }
616
- return {sieveToPublic, setSieve, vacationToPublic, sendingAddresses, setVacation, snoozeFolder, undoSendSeconds, setSendingOptions, rulesToPublic, ruleGroupsToPublic, rulesToRun, ruleFolders, setRules, rewriteFolderPaths, setIdentities, setTemplates, listAllAccounts, setPollInterval, setSyncFolders, isOAuth, validate, listAccounts, setDefaultAccount, getAccount, saveAccount, deleteAccount, deleteAccountsForUser, pruneOrphans, toConnection, setSmtp, toSmtpConnection, smtpToPublic, trustImageSender, untrustImageSender, setRememberImageSenders, sendersImagesTrusted};
650
+ return {sieveToPublic, setSieve, vacationToPublic, sendingAddresses, setVacation, snoozeFolder, undoSendSeconds, setSendingOptions, rulesToPublic, ruleGroupsToPublic, rulesToRun, ruleFolders, setRules, rewriteFolderPaths, setIdentities, setTemplates, listAllAccounts, setPollInterval, setSyncFolders, isOAuth, validate, listAccounts, setDefaultAccount, getAccount, saveAccount, deleteAccount, deleteAccountsForUser, pruneOrphans, toConnection, setSmtp, toSmtpConnection, smtpToPublic, trustImageSender, untrustImageSender, setRememberImageSenders, sendersImagesTrusted, setContactImages, contactImagesAllowed};
617
651
  }
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/accountRoutes.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/accountRoutes.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {MailKeyError} from './secretProvider.js';
4
4
 
@@ -474,5 +474,5 @@ export async function setComposeOptions(userId, accountId, options) {
474
474
  export const {
475
475
  sieveToPublic, setSieve, vacationToPublic, sendingAddresses, setVacation, snoozeFolder, undoSendSeconds, setSendingOptions, rulesToPublic, ruleGroupsToPublic, rulesToRun, ruleFolders, setRules, rewriteFolderPaths, setIdentities, setTemplates, listAllAccounts, setPollInterval, setSyncFolders, validate, listAccounts, setDefaultAccount, getAccount, saveAccount,
476
476
  deleteAccount, deleteAccountsForUser, pruneOrphans, toConnection,
477
- setSmtp, toSmtpConnection, smtpToPublic, trustImageSender, untrustImageSender, setRememberImageSenders, sendersImagesTrusted
477
+ setSmtp, toSmtpConnection, smtpToPublic, trustImageSender, untrustImageSender, setRememberImageSenders, sendersImagesTrusted, setContactImages, contactImagesAllowed
478
478
  } = baseAccounts;
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/bodyTokenProvider.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/bodyTokenProvider.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {createHmac, timingSafeEqual} from 'node:crypto';
4
4
 
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/bodyTokens.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/bodyTokens.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** CMS compatibility entry point for the existing iframe grant API. */
4
4
  import {resolveKeySource} from './secretbox.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/compose.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/compose.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Turning a message into a reply, and a reply into something sendable.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/defaults.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/defaults.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Reading defaults, shared by every edition.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/envelope.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/envelope.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The shape the mirror holds one message in.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/folderActions.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/folderActions.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Whole-folder operations use a snapshot of UIDs, never the visible page or a moving '*'. */
4
4
  import {moveBulk, setFlagsBulk} from './write.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/folderRuntime.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/folderRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Portable folder operations. Hosts supply ownership, serialization and metadata updates. */
4
4
  import {validateFolderName, buildFolderPath, renameTarget, canModifyFolder, descendantsOf, moveTarget, resolveSubscriptions} from './folders.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/folders.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/folders.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {resolveSubscriptions} from './subscriptions.js';
4
4
  /**
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/imapPoolRuntime.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/imapPoolRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * IMAP connection pool for the Mail Reader plugin.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/mbox.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/mbox.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Exporting a folder as mbox.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/message-action.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/message-action.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Remember replies and forwards on the original message after delivery. */
4
4
  export const SOURCE_HEADER = 'X-Domma-Message-Source';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/messageSecurity.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/messageSecurity.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {createMessageSecurity} from './messageSecurityProvider.js';
4
4
  export const {setMessageSecurity, canProtect, protectRaw, protectDraftRaw, unwrapRaw, parseReadable} = createMessageSecurity();
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/messageSecurityProvider.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/messageSecurityProvider.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Where signing and encryption plug into the mail core.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/networkAddresses.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/networkAddresses.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Address classification from the CMS outbound policy, MIT licensed. */
4
4
  import net from 'node:net';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/networkPolicy.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/networkPolicy.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import dns from 'node:dns/promises';
4
4
  import net from 'node:net';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/oauthAccounts.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/oauthAccounts.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {randomUUID} from 'node:crypto';
4
4
  import {MailKeyError} from './secretProvider.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/oauthRouteRuntime.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/oauthRouteRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The OAuth2 sign-in routes for mailboxes: Connect, the provider's callback,
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/oauthRuntime.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/oauthRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * OAuth2 sign-in for mailboxes (XOAUTH2) - Microsoft 365 / Outlook.com and Gmail.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/pollSchedule.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/pollSchedule.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Deciding which mailboxes are due a poll.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/poller.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/poller.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Compatibility entry point for the shared mail poller. */
4
4
  export {createPoller} from './pollerRuntime.js';
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/pollerRuntime.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/pollerRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * The background poller.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/priority.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/priority.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * How urgent a sender said a message was.
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/publicMailbox.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/publicMailbox.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /** Standalone mailbox summary. Explicit fields keep credentials out of responses. */
4
4
  export function publicMailbox(account) {
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/readRuntime.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/readRuntime.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  import {registerAccountRoutes} from './accountRoutes.js';
4
4
  import {ENVELOPE_QUERY, hasAttachment, parseHeaderBlock} from './envelope.js';
@@ -7,6 +7,7 @@ import {readPriority} from './priority.js';
7
7
  import {readUnsubscribe} from './unsubscribe.js';
8
8
  import {MailKeyError} from './secretProvider.js';
9
9
  import {unreadBadge} from './unreadBadge.js';
10
+ import {senderAuthenticated} from './senderAuth.js';
10
11
 
11
12
  /**
12
13
  * The security facts the reader shows - nothing else of the provider's
@@ -51,6 +52,9 @@ function addresses(list) {
51
52
  export function registerReadRuntime(fastify, {auth, hooks, config, pool, pluginName, cachedList = null, diagnostics = null, unreadBadge: withUnreadBadge = false,
52
53
  accounts, bodyTokens, guardHost, resolveSubscriptions, renderer, parseReadable,
53
54
  listUserIds = null, buildDiagnostics = async () => ({available: false}), onDelete,
55
+ // (userId, address) => Promise<boolean>: is this address in the user's
56
+ // contacts? Absent = the host has no contacts, and the setting is not offered.
57
+ knownSender = null,
54
58
  apiBase = `/api/plugins/${pluginName}`
55
59
  }) {
56
60
  if (!accounts || !bodyTokens || typeof auth?.authenticate !== 'function' || typeof guardHost !== 'function'
@@ -441,7 +445,19 @@ export function registerReadRuntime(fastify, {auth, hooks, config, pool, pluginN
441
445
  const {parsed, security} = await parseReadable(fetched.source, {account: ctx.account, userId: ctx.uid});
442
446
  const from = addresses(parsed.from?.value);
443
447
  const senderTrusted = accounts.sendersImagesTrusted(ctx.account, from);
444
- const allowRemoteImages = requestedNow || config.allowRemoteImages || senderTrusted;
448
+ // A contact's images: only for a single sender who is in the
449
+ // user's contacts AND whom the receiving server verified (see
450
+ // senderAuth.js) - anyone can type a contact's address into From.
451
+ let contact = null;
452
+ const sole = from.length === 1 ? from[0].address : '';
453
+ if (!requestedNow && !config.allowRemoteImages && !senderTrusted && sole && typeof knownSender === 'function'
454
+ && (accounts.contactImagesAllowed?.(ctx.account, sole) ?? ctx.account.contactImages !== false)
455
+ && await Promise.resolve(knownSender(ctx.uid, sole)).catch(() => false)) {
456
+ const check = senderAuthenticated(parsed.headerLines, sole);
457
+ contact = {address: sole, verified: check.ok, reason: check.ok ? null : check.reason};
458
+ }
459
+ const contactTrusted = contact?.verified === true;
460
+ const allowRemoteImages = requestedNow || config.allowRemoteImages || senderTrusted || contactTrusted;
445
461
 
446
462
  const rendered = renderBody(parsed, {
447
463
  allowRemoteImages,
@@ -453,6 +469,10 @@ export function registerReadRuntime(fastify, {auth, hooks, config, pool, pluginN
453
469
  folder,
454
470
  accountId: ctx.account.id,
455
471
  senderTrusted,
472
+ // In the user's contacts: {address, verified, reason}. Verified
473
+ // = its images loaded for that reason; unverified = they did
474
+ // not, and the reader says why.
475
+ contact,
456
476
  // Offered only when remembering is switched on for this mailbox.
457
477
  canTrustSender: ctx.account.rememberImageSenders !== false
458
478
  && !senderTrusted
@@ -599,10 +619,44 @@ export function registerReadRuntime(fastify, {auth, hooks, config, pool, pluginN
599
619
  return {
600
620
  accountId: ctx.account.id,
601
621
  remember: ctx.account.rememberImageSenders !== false,
602
- senders: Array.isArray(ctx.account.imageSenders) ? ctx.account.imageSenders : []
622
+ senders: Array.isArray(ctx.account.imageSenders) ? ctx.account.imageSenders : [],
623
+ ...contactImagesPublic(ctx.account)
603
624
  };
604
625
  });
605
626
 
627
+ /** The contacts setting as the settings screen sees it; absent where the host has no contacts. */
628
+ function contactImagesPublic(account) {
629
+ if (typeof knownSender !== 'function' || typeof accounts.setContactImages !== 'function') return {};
630
+ return {
631
+ contactImages: account?.contactImages !== false,
632
+ contactImageBlocks: Array.isArray(account?.contactImageBlocks) ? account.contactImageBlocks : []
633
+ };
634
+ }
635
+
636
+ /**
637
+ * PUT /image-senders/contacts - images from people in my contacts:
638
+ * {enabled} switches it, {block} / {unblock} an exception for one sender.
639
+ */
640
+ fastify.put('/image-senders/contacts', {preHandler: [authenticate]}, async (request, reply) => {
641
+ const ctx = await context(request, reply);
642
+ if (!ctx) return;
643
+ if (typeof knownSender !== 'function' || typeof accounts.setContactImages !== 'function') {
644
+ return reply.code(404).send({error: 'Contacts are not available here.'});
645
+ }
646
+ const body = request.body ?? {};
647
+ const change = {};
648
+ if (typeof body.enabled === 'boolean') change.enabled = body.enabled;
649
+ for (const key of ['block', 'unblock']) {
650
+ if (body[key] === undefined) continue;
651
+ const address = String(body[key] ?? '').trim();
652
+ if (!address || address.length > 320 || /[\s\x00-\x1f]/.test(address)) return reply.code(400).send({error: 'A sender address is required.'});
653
+ change[key] = address;
654
+ }
655
+ const saved = await accounts.setContactImages(ctx.uid, ctx.account.id, change);
656
+ if (!saved) return reply.code(404).send({error: 'That mailbox does not exist.'});
657
+ return contactImagesPublic(saved);
658
+ });
659
+
606
660
  /**
607
661
  * POST /image-senders - trust a sender's images from now on.
608
662
  */
@@ -1,4 +1,4 @@
1
- // Source: @domma-mail/core 0.18.0, packages/core/src/mail/render.js.
1
+ // Source: @domma-mail/core 0.20.0, packages/core/src/mail/render.js.
2
2
  // Update with domma-mail/scripts/sync-cms.mjs; edit the shared source.
3
3
  /**
4
4
  * Message rendering for the Mail Reader plugin.