[fix] white list

This commit is contained in:
zhhe committed 2026-11-17 07:33:51 +08:00
1 parent e9cce46046
commit 1fcf56e3dd
8 files changed
+60 -57

No files matched your search

+6 -1
View File
@@ -103,6 +103,9 @@ export class ImapReceiver {
lastError: undefined,
since: new Date().toISOString(),
});
// 先补收一次:IDLE 只对“之后到达”的邮件有响应,重启/重连期间到达的
// 邮件(游标之后)必须主动拉取,否则会一直等到下一封新信才被处理。
await this.collect(client);
while (this.running && this.client === client) {
if (supportsIdle) {
const found = await client.idle();
@@ -176,8 +179,10 @@ export class ImapReceiver {
try {
const parsed = await simpleParser(message.source);
const job = toJob(this.policy(), parsed);
if (job)
if (job) {
this.hooks.onLog?.(`[mail] 收到 ${job.from} 的邮件,投递到 ${job.sessionId}`);
this.hooks.onJob(job);
}
}
catch (error) {
this.hooks.onLog?.(`[mail] 解析 UID ${uid} 失败: ${errorMessage(error)}`);