[aur-dev] [PATCH 1/2] Remove Reply-To header from package request emails
These notification emails are sent to a public mailing list for discussion. Make sure that people can reply. Reported-by: Florian Pritz <bluewind@xinu.at> Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/lib/pkgreqfuncs.inc.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php index 26d543e..748b849 100644 --- a/web/lib/pkgreqfuncs.inc.php +++ b/web/lib/pkgreqfuncs.inc.php @@ -108,8 +108,7 @@ function pkgreq_file($ids, $type, $merge_into, $comments) { $headers .= "Bcc: $bcc\r\n"; } $thread_id = "<pkg-request-" . $request_id . "@aur.archlinux.org>"; - $headers .= "Reply-to: noreply@aur.archlinux.org\r\n" . - "From: notify@aur.archlinux.org\r\n" . + $headers .= "From: notify@aur.archlinux.org\r\n" . "In-Reply-To: $thread_id\r\n" . "References: $thread_id\r\n" . "X-Mailer: AUR"; @@ -179,8 +178,7 @@ function pkgreq_close($id, $accepted) { $headers .= "Bcc: $bcc\r\n"; } $thread_id = "<pkg-request-" . $id . "@aur.archlinux.org>"; - $headers .= "Reply-to: noreply@aur.archlinux.org\r\n" . - "From: notify@aur.archlinux.org\r\n" . + $headers .= "From: notify@aur.archlinux.org\r\n" . "In-Reply-To: $thread_id\r\n" . "References: $thread_id\r\n" . "X-Mailer: AUR"; -- 2.0.1
When sending the first notification email that belongs to a certain package request, set the Message-ID instead of the In-Reply-To and References headers. This is not only more RFC compliant but also fixes thread views in several clients, such as Pipermail. Signed-off-by: Lukas Fleischer <archlinux@cryptocrack.de> --- web/lib/pkgreqfuncs.inc.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/web/lib/pkgreqfuncs.inc.php b/web/lib/pkgreqfuncs.inc.php index 748b849..852554b 100644 --- a/web/lib/pkgreqfuncs.inc.php +++ b/web/lib/pkgreqfuncs.inc.php @@ -109,8 +109,7 @@ function pkgreq_file($ids, $type, $merge_into, $comments) { } $thread_id = "<pkg-request-" . $request_id . "@aur.archlinux.org>"; $headers .= "From: notify@aur.archlinux.org\r\n" . - "In-Reply-To: $thread_id\r\n" . - "References: $thread_id\r\n" . + "Message-ID: $thread_id\r\n" . "X-Mailer: AUR"; @mail($AUR_REQUEST_ML, "[PRQ#" . $request_id . "] " . ucfirst($type) . " Request for " . $row['Name'], $body, -- 2.0.1
participants (1)
-
Lukas Fleischer