Skip to content

Commit

Permalink
commands: thread: Reference existing message when forwarding
Browse files Browse the repository at this point in the history
When forwarding a mail, the outgoing mail, and any follow up
conversation becomes a disjointed thread.  This removes the original
context, and makes it harder to find and track while the conversation
splits in two directions.

Add appropriate reference headers to the envelope when constructing a
forwarded mail to ensure that the conversations continue to be related
and therefore presented in the same thread with notmuch and alot.

Signed-off-by: Kieran Bingham <[email protected]>
  • Loading branch information
kbingham authored and pazz committed Jul 17, 2024
1 parent 398e2bc commit 6cd1b44
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions alot/commands/thread.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,6 +361,10 @@ async def apply(self, ui):
subject = fsp + subject
envelope.add('Subject', subject)

# Set forwarding reference headers
envelope.add('References', '<%s>' % self.message.get_message_id())
envelope.add('X-Forwarded-Message-Id', '<%s>' % self.message.get_message_id())

# set From-header and sending account
try:
from_header, account = determine_sender(mail, 'reply')
Expand Down

0 comments on commit 6cd1b44

Please sign in to comment.