binwiederhier / ntfy

Send push notifications to your phone or desktop using PUT/POST
https://ntfy.sh
Apache License 2.0
18.54k stars 729 forks source link

Missing mandatory header in Email notification #1206

Closed didier13150 closed 4 weeks ago

didier13150 commented 1 month ago

:lady_beetle: Describe the bug

Email notifications sent by my private ntfy instance were not accepted by remote smtp server due to missing header Date (https://tools.ietf.org/html/rfc5322#section-3.6).

Here is the amavis scanner (email spam and virus scanner) report

554 5.6.0 bounce, id=3454424-13 - bad header Missing required header field: "Date"

:computer: Components impacted

ntfy server

:bulb: Screenshots and/or logs Full email headers

Return-Path: <notify@example.com>
Received: from localhost (unknown [172.30.0.15])
    (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)
     key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
    (No client certificate requested)
    by smtp.example.com (Postfix) with UTF8SMTPSA id 3C4397E1B4E
    for <user@example.com>; Tue, 22 Oct 2024 17:18:54 +0200 (CEST)
From: "notify.example.com/alertes" <notify@example.com>
To: user@example.com
Subject: =?utf-8?b?8J+OiSBCb25qb3VyIE1vbmRl?=
Content-Type: text/plain; charset="utf-8"

:crystal_ball: Additional context

Just add the missing header to email notification to make ntfy perfect :wink:

Big thanks to the team

wunter8 commented 1 month ago

This has been added to ntfy, but it hasn't been released yet: https://github.com/binwiederhier/ntfy/pull/1141

You can download the current source code and compile ntfy yourself or wait for the next release. (I'm not sure when it will be)

didier13150 commented 4 weeks ago

Thanks for your reply, I just test the main branch and it works like a charm