dsh-email 0.17.1 → 0.17.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.
package/CHANGELOG.md CHANGED
@@ -4,6 +4,10 @@
4
4
 
5
5
  [历史英文记录](docs/CHANGELOG.en.md)
6
6
 
7
+ ## 0.17.2(2026-10-20)
8
+
9
+ - 移动邮件前核对 IMAP 的 MOVE / UIDPLUS 能力;两者均不支持时明确拒绝,不再触发可能清除其他已标记删除邮件的全局 EXPUNGE(#23)。
10
+
7
11
  ## 0.17.1(2026-10-18)
8
12
 
9
13
  - 完成 [#19](https://github.com/STARDUSTLC666/dsh-email/issues/19) 的发信策略说明:全局确认开关关闭时,账号页显示中英文影响范围,明确所有账号的模型发信、回复和转发都不再逐次确认;只读设置不能编辑该开关。
package/docs/USAGE.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  ## 本次改进
6
6
 
7
+ `email_mark(action:"move")` 要求服务器支持 MOVE 或 UIDPLUS;两者均无时会拒绝移动,保持源邮件不变,避免全局 EXPUNGE 误删其他已标记删除的邮件。请改用邮箱原生客户端或升级服务器。
8
+
7
9
  `email_send` 和 `email_draft` 的相对附件路径以当前会话工作区为基准,避免切换工作区后误读 DSH 启动目录的同名文件;绝对路径保持原样,没有会话上下文时仍使用启动目录。
8
10
 
9
11
  在「收件人规则」页按账号设置禁止地址与域名;配置文本的字段为 `denyAddresses` / `denyDomains`。禁止规则覆盖 To、Cc,即使关闭发信确认也生效。域名按完整域名匹配,不自动包含子域名。移除被禁止的收件人并重新预览后才能确认发送;只有全部 To/Cc 匹配且主动开启的可信规则才会跳过 `email_send` 插件确认,宿主权限仍生效。
@@ -1033,6 +1033,12 @@ export class EmailPool {
1033
1033
  throw new MailError('move 操作需要 toFolder 参数(用 email_folders 查看可用文件夹)');
1034
1034
  if (target === folderName)
1035
1035
  throw new MailError('邮件已在文件夹 "' + folderName + '" 中,无需移动');
1036
+ // ImapFlow falls back to COPY + STORE + EXPUNGE without MOVE. Only
1037
+ // UIDPLUS can scope that expunge to this UID; plain EXPUNGE also deletes
1038
+ // unrelated mail that another client marked \\Deleted.
1039
+ if (!client.capabilities?.has('MOVE') && !client.capabilities?.has('UIDPLUS')) {
1040
+ throw new MailError('服务器同时缺少 MOVE 和 UIDPLUS,无法安全移动邮件;操作已取消,源邮件未改动。请用邮箱原生客户端处理或升级服务器。');
1041
+ }
1036
1042
  const folders = await client.list();
1037
1043
  signal?.throwIfAborted();
1038
1044
  if (!folders.some(row => row.path === target)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-email",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "description": "在 DSH 中收发、搜索和整理邮件,支持多个邮箱账号。",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",