[GH-ISSUE #163] [Bug] 邮件接收异常: TypeError: Cannot read properties of null (reading 'lastIndexOf') #114

Closed
opened 2026-02-27 09:13:20 +03:00 by kerem · 1 comment
Owner

Originally created by @meethuhu on GitHub (Oct 19, 2025).
Original GitHub issue: https://github.com/maillab/cloud-mail/issues/163

Vaultwarden 发出的邮件进不了邮箱。

cloud-mail 日志:

{
  "source": {
    "level": "error",
    "message": "邮件接收异常:  TypeError: Cannot read properties of null (reading 'lastIndexOf')"
  },
  "dataset": "cloudflare-workers",
  "timestamp": "2025-10-19T14:37:16.327Z",
  "$workers": {
    "truncated": false,
    "event": {
      "rcptTo": "test@example.com",
      "mailFrom": "bounces-431417734-4095276066@gw.d.sender-sib.com",
      "rawSize": 24645
    },
    "scriptName": "cloud-mail",
    "outcome": "ok",
    "eventType": "email",
    "scriptVersion": {
      "id": "2eae4c30-d409-40c5-81bc-b7785292c0bf"
    },
    "executionModel": "stateless",
    "requestId": "SEJYP4ROLCFBMSKC"
  },
  "$metadata": {
    "id": "01K7YEEEN70DEA9299T7JMM80M",
    "requestId": "SEJYP4ROLCFBMSKC",
    "trigger": "bounces-431417734-4095276066@gw.d.sender-sib.com",
    "service": "cloud-mail",
    "level": "error",
    "error": "邮件接收异常:  TypeError: Cannot read properties of null (reading 'lastIndexOf')",
    "message": "邮件接收异常:  TypeError: Cannot read properties of null (reading 'lastIndexOf')",
    "account": "d3fd5a182f77d3aa428181606dda7be0",
    "type": "cf-worker",
    "fingerprint": "74f06a96ae808c822c8dd24d42459a5f",
    "origin": "email",
    "messageTemplate": "邮件接收异常:  TypeError: Cannot read properties of null (reading 'lastIndexOf')"
  },
  "links": []
}

Vaultwarden 发出的邮件原文(已脱敏)

Delivered-To: [REDACTED_EMAIL]
Received: by [REDACTED_IPV6] with SMTP id [REDACTED_ID];
        Sun, 19 Oct 2025 03:35:19 -0700 (PDT)
X-Google-Smtp-Source: [REDACTED_TOKEN]
X-Received: by [REDACTED_IPV6] with SMTP id [REDACTED_ID];
        Sun, 19 Oct 2025 03:35:18 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1760870118; cv=none; d=google.com; s=arc-20240605; b=[REDACTED]
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605;
        h=list-unsubscribe:from:feedback-id:list-unsubscribe-post:to
         :origin-messageid:message-id:mime-version:subject:date
         :dkim-signature;
        bh=[REDACTED]; fh=[REDACTED]; b=[REDACTED]; dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@[REDACTED_DOMAIN] header.s=[REDACTED_SELECTOR];
       spf=pass (google.com: domain of [REDACTED_BOUNCE_ADDR] designates [REDACTED_IP] as permitted sender) smtp.mailfrom=[REDACTED_BOUNCE_ADDR];
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=[REDACTED_DOMAIN]
Return-Path: <[REDACTED_BOUNCE_ADDR]>
Received: from [REDACTED_SENDING_HOST] ([REDACTED_IP])
        by mx.google.com with ESMTPS id [REDACTED_ID]
        for <[REDACTED_EMAIL]>
        (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
        Sun, 19 Oct 2025 03:35:18 -0700 (PDT)
Received-SPF: pass (google.com: domain of [REDACTED_BOUNCE_ADDR] designates [REDACTED_IP] as permitted sender)
Authentication-Results: mx.google.com;
       dkim=pass header.i=@[REDACTED_DOMAIN] header.s=[REDACTED_SELECTOR];
       spf=pass smtp.mailfrom=[REDACTED_BOUNCE_ADDR];
       dmarc=pass header.from=[REDACTED_DOMAIN]
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=[REDACTED_DOMAIN]; s=[REDACTED_SELECTOR]; bh=[REDACTED]; h=from:subject:date:to:mime-version:content-type:
 list-unsubscribe:x-csa-complaints:list-unsubscribe-post:message-id:x-sib-id:feedback-id; b=[REDACTED]
Date: Sun, 19 Oct 2025 10:35:16 +0000
Subject: Vaultwarden SMTP 测试
Mime-Version: 1.0
Content-Type: multipart/alternative; boundary="[REDACTED_BOUNDARY]"
Message-Id: [REDACTED]
Origin-messageId: [REDACTED]
To: <[REDACTED_EMAIL]>
X-sib-id: [REDACTED]
X-CSA-Complaints: csa-complaints@eco.de
List-Unsubscribe-Post: List-Unsubscribe=One-Click
Feedback-ID: [REDACTED]
From: Vaultwarden <[REDACTED_EMAIL]>
List-Unsubscribe: <[REDACTED_URL]>

--[REDACTED_BOUNDARY]
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: base64

[REDACTED_BASE64_BODY_WITH_LINKS_REMOVED_OR_REPLACED_WITH https://vault.example.com]

--[REDACTED_BOUNDARY]
Content-Type: multipart/related; boundary="[REDACTED_BOUNDARY_2]"

--[REDACTED_BOUNDARY_2]
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<!-- Removed tracking pixel and click-tracking parameters. Replaced links with neutral domain -->
<html>… 这是用于验证 https://vault.example.com 的 SMTP 配置的测试邮件 …</html>

--[REDACTED_BOUNDARY_2]--
--[REDACTED_BOUNDARY]--
Originally created by @meethuhu on GitHub (Oct 19, 2025). Original GitHub issue: https://github.com/maillab/cloud-mail/issues/163 [Vaultwarden](https://github.com/dani-garcia/vaultwarden) 发出的邮件进不了邮箱。 cloud-mail 日志: ``` { "source": { "level": "error", "message": "邮件接收异常: TypeError: Cannot read properties of null (reading 'lastIndexOf')" }, "dataset": "cloudflare-workers", "timestamp": "2025-10-19T14:37:16.327Z", "$workers": { "truncated": false, "event": { "rcptTo": "test@example.com", "mailFrom": "bounces-431417734-4095276066@gw.d.sender-sib.com", "rawSize": 24645 }, "scriptName": "cloud-mail", "outcome": "ok", "eventType": "email", "scriptVersion": { "id": "2eae4c30-d409-40c5-81bc-b7785292c0bf" }, "executionModel": "stateless", "requestId": "SEJYP4ROLCFBMSKC" }, "$metadata": { "id": "01K7YEEEN70DEA9299T7JMM80M", "requestId": "SEJYP4ROLCFBMSKC", "trigger": "bounces-431417734-4095276066@gw.d.sender-sib.com", "service": "cloud-mail", "level": "error", "error": "邮件接收异常: TypeError: Cannot read properties of null (reading 'lastIndexOf')", "message": "邮件接收异常: TypeError: Cannot read properties of null (reading 'lastIndexOf')", "account": "d3fd5a182f77d3aa428181606dda7be0", "type": "cf-worker", "fingerprint": "74f06a96ae808c822c8dd24d42459a5f", "origin": "email", "messageTemplate": "邮件接收异常: TypeError: Cannot read properties of null (reading 'lastIndexOf')" }, "links": [] } ``` Vaultwarden 发出的邮件原文(已脱敏) ``` Delivered-To: [REDACTED_EMAIL] Received: by [REDACTED_IPV6] with SMTP id [REDACTED_ID]; Sun, 19 Oct 2025 03:35:19 -0700 (PDT) X-Google-Smtp-Source: [REDACTED_TOKEN] X-Received: by [REDACTED_IPV6] with SMTP id [REDACTED_ID]; Sun, 19 Oct 2025 03:35:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1760870118; cv=none; d=google.com; s=arc-20240605; b=[REDACTED] ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:from:feedback-id:list-unsubscribe-post:to :origin-messageid:message-id:mime-version:subject:date :dkim-signature; bh=[REDACTED]; fh=[REDACTED]; b=[REDACTED]; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@[REDACTED_DOMAIN] header.s=[REDACTED_SELECTOR]; spf=pass (google.com: domain of [REDACTED_BOUNCE_ADDR] designates [REDACTED_IP] as permitted sender) smtp.mailfrom=[REDACTED_BOUNCE_ADDR]; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=[REDACTED_DOMAIN] Return-Path: <[REDACTED_BOUNCE_ADDR]> Received: from [REDACTED_SENDING_HOST] ([REDACTED_IP]) by mx.google.com with ESMTPS id [REDACTED_ID] for <[REDACTED_EMAIL]> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 19 Oct 2025 03:35:18 -0700 (PDT) Received-SPF: pass (google.com: domain of [REDACTED_BOUNCE_ADDR] designates [REDACTED_IP] as permitted sender) Authentication-Results: mx.google.com; dkim=pass header.i=@[REDACTED_DOMAIN] header.s=[REDACTED_SELECTOR]; spf=pass smtp.mailfrom=[REDACTED_BOUNCE_ADDR]; dmarc=pass header.from=[REDACTED_DOMAIN] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=[REDACTED_DOMAIN]; s=[REDACTED_SELECTOR]; bh=[REDACTED]; h=from:subject:date:to:mime-version:content-type: list-unsubscribe:x-csa-complaints:list-unsubscribe-post:message-id:x-sib-id:feedback-id; b=[REDACTED] Date: Sun, 19 Oct 2025 10:35:16 +0000 Subject: Vaultwarden SMTP 测试 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="[REDACTED_BOUNDARY]" Message-Id: [REDACTED] Origin-messageId: [REDACTED] To: <[REDACTED_EMAIL]> X-sib-id: [REDACTED] X-CSA-Complaints: csa-complaints@eco.de List-Unsubscribe-Post: List-Unsubscribe=One-Click Feedback-ID: [REDACTED] From: Vaultwarden <[REDACTED_EMAIL]> List-Unsubscribe: <[REDACTED_URL]> --[REDACTED_BOUNDARY] Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 [REDACTED_BASE64_BODY_WITH_LINKS_REMOVED_OR_REPLACED_WITH https://vault.example.com] --[REDACTED_BOUNDARY] Content-Type: multipart/related; boundary="[REDACTED_BOUNDARY_2]" --[REDACTED_BOUNDARY_2] Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: quoted-printable <!-- Removed tracking pixel and click-tracking parameters. Replaced links with neutral domain --> <html>… 这是用于验证 https://vault.example.com 的 SMTP 配置的测试邮件 …</html> --[REDACTED_BOUNDARY_2]-- --[REDACTED_BOUNDARY]-- ```
kerem 2026-02-27 09:13:20 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@eoao commented on GitHub (Oct 25, 2025):

复现不了,无法修复

<!-- gh-comment-id:3445694370 --> @eoao commented on GitHub (Oct 25, 2025): 复现不了,无法修复
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cloud-mail-maillab#114
No description provided.