[PATCH 2/2] guess From address from Received headers

Carl Worth cworth at cworth.org
Tue Apr 6 18:55:34 PDT 2010


On Tue, 06 Apr 2010 12:45:57 -0700, Dirk Hohndel <hohndel at infradead.org> wrote:
>  When replying to a message notmuch tries to pick the correct From
>  address by looking which one of a user's configured email addresses
>  were included in To or Cc headers of the email that is being replied to.
>  If none of the users email addresses are in the To or Cc headers we now
>  try to guess from the first (chronologically, last) Received header
>  which domain this email was received in and therefore which of the
>  email addresses to use in a reply
>  If that fails we still use the primary email as From email

Thanks, Dirk.

This looks like an awfully useful and clever piece of
functionality. I've applied this patch, (with some tiny style
cleanups[*] afterwards), along with the previous patch that this depends
on.

I'd like to have a test case in the test suite for this as well, but I'm
not going to make the patch block on that (instead I just added that to
TODO).

-Carl

[*] I really need to add a CODING_STYLE document to advertise my
preferred style issues. And before you ask, yes, there *is* a patch for
that.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100406/d3fc8675/attachment.pgp>


More information about the notmuch mailing list