From bb9916703c867f69de3b5544306a5bfdb8fc3612 Mon Sep 17 00:00:00 2001 From: Adam Cooper Date: Mon, 5 Aug 2024 12:12:19 -0400 Subject: [PATCH] [bin] [autoreply] Reinstate the fix for date header of autoreply --- bin/autoreply/autoreply.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/autoreply/autoreply.sh b/bin/autoreply/autoreply.sh index 3dff41f..029721f 100755 --- a/bin/autoreply/autoreply.sh +++ b/bin/autoreply/autoreply.sh @@ -52,7 +52,7 @@ while IFS= read -r -d '' thread ; do orig_body="$(jq -r '.original.body[0].content[] | select(."content-type" == "text/plain") | .content' $temporary_reply)" # Copy canned message to temporary file - printf "From: %s\nSubject: %s\nTo: %s\nIn-Reply-To: %s\nReferences: %s\n\n" "$sender" "$subject" "$recipient" "$in_reply_to" "$references" >> "$temporary_file" + printf "From: %s\nSubject: %s\nTo: %s\nDate: $(date +'%a, %d %b %Y %R %z')\nIn-Reply-To: %s\nReferences: %s\n\n" "$sender" "$subject" "$recipient" "$in_reply_to" "$references" >> "$temporary_file" cat /home/adam/dotfiles/bin/autoreply/misdirected_email_autoreply.txt >> "$temporary_file" printf "\n\nOn %s, %s wrote:\n" "$date" "$orig_sender" >> "$temporary_file"