[aur-dev] [PATCH 1/3] notify: Reintroduce Message-ID again

Lukas Fleischer lfleischer at archlinux.org
Thu Feb 18 20:17:17 UTC 2016


In commit 7b57e0e (Set Message-ID when sending package request emails,
2014-07-01), we changed the code responsible for sending notifications
such that the value of the Message-ID header is set deterministically in
the first email referring to a request. Unfortunately, this was
forgotten when porting the notification routines to Python in 9746a65
(Port notification routines to Python, 2015-06-27) and later fixed by
092e00f (notify: Fix references in request notifications, 2015-10-10).
However, when fixing another bug, the old behavior of not setting a
Message-ID was restored by d87b138 (notify: Fix merging of header dicts,
2015-10-26). Revert that particular change once more and add a comment
such that the line gets extra attention, should it be changed in the
future.

Fixes FS#48239.

Signed-off-by: Lukas Fleischer <lfleischer at archlinux.org>
---
 scripts/notify.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/notify.py b/scripts/notify.py
index 56534ae..2dd8805 100755
--- a/scripts/notify.py
+++ b/scripts/notify.py
@@ -324,7 +324,8 @@ def request_open(cur, uid, reqid, reqtype, pkgbase_id, merge_into=None):
         refs = '[1] ' + user_uri + '\n'
         refs += '[2] ' + pkgbase_uri + '\n'
     thread_id = '<pkg-request-' + reqid + '@aur.archlinux.org>'
-    headers = headers_reply(thread_id)
+    # Use a deterministic Message-ID for the first email referencing a request.
+    headers = headers_msgid(thread_id)
     headers.update(headers_cc(cc))
 
     send_notification(to, subject, body, refs, headers)
-- 
2.7.1


More information about the aur-dev mailing list