]> git.notmuchmail.org Git - notmuch/commit
Rearchitect From: header guessing code for replies
authorDirk Hohndel <hohndel@infradead.org>
Mon, 26 Apr 2010 19:58:35 +0000 (12:58 -0700)
committerCarl Worth <cworth@cworth.org>
Mon, 26 Apr 2010 21:44:13 +0000 (14:44 -0700)
commit932e1c165cdb5dff769e4d290525f4f6b2f5ac81
tree2705359878213bd17756f01a6670c30096545d4e
parent5b8b0377cb68904eac8fc58a933d47f605a81725
Rearchitect From: header guessing code for replies

We want to be able to correctly guess the best From: header to use when
replying to emails. This is what we are looking at now:
 1 is one of the users' mail addresses in the To: or Cc: header
 2 check for an Envelope-to: header
 3 check for an X-Original-To: header
 4 check for a (for <email@add.res>) clause in Received: headers
 5 check for the domain part of known email addresses in the
      'by' part of Received headers
 6 fall back to the primary email address

This patch changes the algorithm for steps 2-5 of this process. Prior to
this patch we had a first attempt to implement only step 5 - but this
broke in many email setups where mail delivery to the local machine added
additional Received: lines.
Steps 2-4 are new, step 5 now analyzes the concatenated Received: header
(this was in the previous patch) to do this analysis.

Signed-off-by: Dirk Hohndel <hohndel@infradead.org>
notmuch-reply.c