Skip to content

Duplicate subject header on email notifications #188

@Pyr-000

Description

@Pyr-000

With email notifications enabled, the emails being sent appear to have two subject headers, specifically, one encoded subject and one plain ASCII subject, which can cause them to be rejected by the recipient mailserver. (If header validation is being enforced.)

This seems to happen both for test notifications and 'proper' notifications created after a successful backup.

Sample email header returned in a non-delivery report (some information redacted):

Return-Path: <***>
DKIM-Signature: ***
Content-Type: multipart/mixed; boundary="===============2710534224241857684=="
MIME-Version: 1.0
From: ***
To: ***
Date: Sun, 08 Mar 2026 10:45:31 -0000
LocalDate: Sun, 08 Mar 2026 11:45:31 +0100
X-MS-Reactions: disallow
Message-Id: <177296673126.3896.6871463284819149556@***>
Subject: =?utf-8?q?NetPerfect_Backup_Client_success_report_for_=24=7BMACHINE=5FID=7D_test=5Femail_on_repo_default?=
Subject: NetPerfect Backup Client success report for ${MACHINE_ID} test_email on repo default

From a cursory look, the issue appears to be here: ofunctions/mailer/init.py#L165

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions