@bobfrankston/rmfmail 1.1.146 → 1.1.148

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.
@@ -4379,7 +4379,19 @@ export class ImapManager extends EventEmitter {
4379
4379
  if (rows.length === 0) return;
4380
4380
  let reconciled = 0;
4381
4381
  let appended = 0;
4382
- await this.withConnection(accountId, async (client: any) => {
4382
+ // Use a DEDICATED IMAP client for sent-sweep — do NOT share the
4383
+ // slow-lane ops client. The priority-INBOX sync grabs the slow-lane
4384
+ // client via getOpsClient() (no lane queueing) and runs SEARCH→FETCH
4385
+ // as a logical transaction; if sent-sweep's searchByHeader (SELECT
4386
+ // Sent → SEARCH → CLOSE) interleaves on the same wire between the
4387
+ // sync's SEARCH and FETCH, the FETCH lands with no mailbox selected
4388
+ // and Dovecot returns "BAD No mailbox selected" — new mail never
4389
+ // lands locally (Bob 2026-05-25: "not seeing recent mail").
4390
+ // iflow-direct serializes per-command, not per-task, so reusing the
4391
+ // shared client is unsafe across logical transactions. A dedicated
4392
+ // client is the smallest surgical fix.
4393
+ const client = await this.createClientWithLimit(accountId);
4394
+ try {
4383
4395
  for (const row of rows) {
4384
4396
  const msgId = row.message_id;
4385
4397
  if (!msgId) continue;
@@ -4416,7 +4428,10 @@ export class ImapManager extends EventEmitter {
4416
4428
  }
4417
4429
  }
4418
4430
  }
4419
- }, { slow: true, timeoutMs: 120_000 });
4431
+ } finally {
4432
+ try { await (client._realLogout || client.logout)(); } catch { /* */ }
4433
+ try { client.destroy?.(); } catch { /* */ }
4434
+ }
4420
4435
  if (reconciled + appended > 0) {
4421
4436
  this.emit("folderCountsChanged", accountId, {});
4422
4437
  console.log(` [sent-sweep] ${accountId}: ${reconciled} rebound, ${appended} re-appended`);
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.60",
3
+ "version": "0.1.61",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "@bobfrankston/mailx-imap",
9
- "version": "0.1.60",
9
+ "version": "0.1.61",
10
10
  "license": "ISC",
11
11
  "dependencies": {
12
12
  "@bobfrankston/iflow-direct": "^0.1.27",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/mailx-imap",
3
- "version": "0.1.60",
3
+ "version": "0.1.61",
4
4
  "type": "module",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",