|
547 | 547 |
|
548 | 548 | expect($message->size())->toBe(strlen($contents)); |
549 | 549 | }); |
| 550 | + |
| 551 | +test('it decodes base64 encoded from name', function () { |
| 552 | + $contents = <<<'EOT' |
| 553 | + |
| 554 | + |
| 555 | +Received: from mail.example.com |
| 556 | + by mail.example.com with LMTP id kB9HBDDVNWiAaAAABEj0/g |
| 557 | + for <[email protected]>; Tue, 27 May 2025 17:07:28 +0200 |
| 558 | +Received: from exmaple.com (exmaple.com [1.1.1.1]) |
| 559 | + by mail.example.com (Postfix) with ESMTPS id E15722D749 |
| 560 | + for <[email protected]>; Tue, 27 May 2025 17:07:27 +0200 (CEST) |
| 561 | +DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=example.com; |
| 562 | + s=default; h=Content-Transfer-Encoding:Content-Type:Subject:MIME-Version: |
| 563 | + Message-Id:To:From:Date:Sender:Reply-To:Cc:Content-ID:Content-Description: |
| 564 | + Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: |
| 565 | + In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: |
| 566 | + List-Post:List-Owner:List-Archive; |
| 567 | + bh=v6FVS3RZyBFj+9PZnaE1NGLHzvCYTYn6axfEJnK9FUQ=; b=ab91Cc8m1EOAClyNW066JVKy7p |
| 568 | + Kq6C6Kg84UvJ2CqW6He0BJY1SuK7s9HfzzQA+32N9YVn8HS9tNyynJ3MP0tUa/zf2YR4H7FRO/afz |
| 569 | + hpxcpJYVJGaH2rCgWzubZsKPJQN5wzd5g5pRiT4LbNchTr1XfwlVX3ycRxun+hGXNSNVJC8cSQuul |
| 570 | + tdZnKp69+ngVh0fFzzuywpj29Lmeh3hplsF3KlP23UMZq+5ZSp9WNEBPyB/dXG3XNuqqNQGqlHGoy |
| 571 | + xVOEHWA6r11YJxw+6W2vU3qVg6iW/Uy8g+bdp/AkULoqlsiBGR9of+/zozaobt7EkR0A7JTMKRUKw |
| 572 | + Xw5WUunA==; |
| 573 | +Received: from 1.1.1.1.example.com ([1.1.1.1]:65442 helo=SERVER1) |
| 574 | + by exmaple.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 |
| 575 | + (Exim 4.98.1) |
| 576 | + (envelope-from <[email protected]>) |
| 577 | + id 1uJvto-000000000fL-1qpV; |
| 578 | + Tue, 27 May 2025 17:07:27 +0200 |
| 579 | +Date: Tue, 27 May 2025 17:07:27 +0200 |
| 580 | +From: "=?UTF-8?B?REFQIHwgU0VSVkVSMQ==?=" <[email protected]> |
| 581 | + |
| 582 | + |
| 583 | +MIME-Version: 1.0 |
| 584 | +Subject: =?UTF-8?B?W0RBUCB8IFNFUlZFUjFdICBDb250YWluZXIgdmF1bHR3YXJkZW4gaW4gQ29udGFpbmVyIE1hbmFnZXIgc3RvcHBlZCB1bmV4cGVjdGVkbHk=?= |
| 585 | +Content-Type: text/html; charset=utf-8 |
| 586 | +Content-Transfer-Encoding: 8bit |
| 587 | +X-AntiAbuse: This header was added to track abuse, please include it with any abuse report |
| 588 | +X-AntiAbuse: Primary Hostname - exmaple.com |
| 589 | +X-AntiAbuse: Original Domain - example.com |
| 590 | +X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] |
| 591 | +X-AntiAbuse: Sender Address Domain - example.com |
| 592 | +X-Get-Message-Sender-Via: exmaple.com: authenticated_id: [email protected] |
| 593 | +X-Authenticated-Sender: exmaple.com: [email protected] |
| 594 | +X-Rspamd-Server: mail.example.com |
| 595 | +X-Spamd-Result: default: False [-0.91 / 6.00]; |
| 596 | + SUBJ_EXCESS_BASE64(1.50)[]; |
| 597 | + FROM_EXCESS_BASE64(1.50)[]; |
| 598 | + IP_REPUTATION_HAM(-1.32)[asn: 20857(-0.38), country: NL(-0.01), ip: 1.1.1.1(-0.93)]; |
| 599 | + GENERIC_REPUTATION(-0.95)[-0.94652652518558]; |
| 600 | + DKIM_REPUTATION(-0.92)[-0.91631218832379]; |
| 601 | + SPF_REPUTATION_HAM(-0.89)[-0.88873676028191]; |
| 602 | + R_DKIM_ALLOW(0.29)[example.com:s=default]; |
| 603 | + R_SPF_ALLOW(-0.20)[+mx]; |
| 604 | + MIME_HTML_ONLY(0.20)[]; |
| 605 | + BAYES_HAM(-0.12)[66.55%]; |
| 606 | + MX_GOOD(-0.01)[]; |
| 607 | + TO_MATCH_ENVRCPT_SOME(0.00)[]; |
| 608 | + FROM_HAS_DN(0.00)[]; |
| 609 | + NEURAL_HAM(-0.00)[-1.000]; |
| 610 | + HAS_X_GMSV(0.00)[[email protected]]; |
| 611 | + DMARC_NA(0.00)[example.com]; |
| 612 | + RCVD_VIA_SMTP_AUTH(0.00)[]; |
| 613 | + MIME_TRACE(0.00)[0:~]; |
| 614 | + MID_RHS_MATCH_FROM(0.00)[]; |
| 615 | + DKIM_TRACE(0.00)[example.com:+]; |
| 616 | + RCPT_COUNT_TWO(0.00)[2]; |
| 617 | + TO_DN_NONE(0.00)[]; |
| 618 | + HAS_X_AS(0.00)[[email protected]]; |
| 619 | + HAS_X_ANTIABUSE(0.00)[]; |
| 620 | + RCVD_COUNT_TWO(0.00)[2]; |
| 621 | + FROM_EQ_ENVFROM(0.00)[]; |
| 622 | + ASN(0.00)[asn:20857, ipnet:37.97.128.0/17, country:NL]; |
| 623 | + RCVD_TLS_ALL(0.00)[] |
| 624 | +X-Rspamd-Queue-Id: E15722D749 |
| 625 | +X-EsetId: 37303A29E962D55F607264 |
| 626 | +
|
| 627 | +Container vaultwarden in Container Manager stopped unexpectedly. Please select vaultwarden on the <b>Container</b> page, click the <b>Details</b> button, and go to the <b>Log</b> tab for details.<BR><BR>From SERVER1<BR><BR><BR> |
| 628 | +EOT; |
| 629 | + |
| 630 | + $message = new FileMessage($contents); |
| 631 | + |
| 632 | + expect( $message-> from()-> email())-> toBe( '[email protected]'); |
| 633 | + expect($message->from()->name())->toBe('DAP | SERVER1'); |
| 634 | + expect($message->subject())->toBe('[DAP | SERVER1] Container vaultwarden in Container Manager stopped unexpectedly'); |
| 635 | +}); |
0 commit comments