diff options
| author | Hannu Hartikainen <hannu@hrtk.in> | 2021-07-02 12:13:09 +0300 |
|---|---|---|
| committer | David Bremner <david@tethera.net> | 2021-08-29 18:10:08 -0700 |
| commit | 717e3dcdc3e55d72c8e4a1948708c34170dbf926 (patch) | |
| tree | 201a67a609ac6e83ff71206e31f50ada26623824 /notmuch-reply.c | |
| parent | 8c0bebedc5edbff5ddc46b66da1177ec18f48c69 (diff) | |
lib: consider all instances of Delivered-To header
When using notmuch-reply and guessing the From: address from
Delivered-To headers, I had the wrong address chosen today. This was
because the messages from the notmuch list contain these headers in this
order:
Delivered-To: hannu.hartikainen@gmail.com
...
Delivered-To: hannu@hrtk.in
In my .notmuch-config I have the following configuration:
primary_email=hannu@hrtk.in
other_email=hannu.hartikainen@gmail.com;...
Before this change, notmuch-reply would guess From: @gmail.com because
that is the first Delivered-To header present. After the change, the
primary address is chosen as I would expect.
Diffstat (limited to 'notmuch-reply.c')
| -rw-r--r-- | notmuch-reply.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/notmuch-reply.c b/notmuch-reply.c index 08140799..ebb621e0 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -464,8 +464,8 @@ guess_from_in_received_by (notmuch_database_t *notmuch, const char *received) * (last Received: header added) and try to extract from them * indications to which email address this message was delivered. * - * The Received: header is special in our get_header function and is - * always concatenated. + * The Received: header is among special ones in our get_header function + * and is always concatenated. * * Return the address that was found, if any, and NULL otherwise. */ @@ -499,6 +499,9 @@ guess_from_in_received_headers (notmuch_message_t *message) * headers: Envelope-To, X-Original-To, and Delivered-To (searched in * that order). * + * The Delivered-To: header is among special ones in our get_header + * function and is always concatenated. + * * Return the address that was found, if any, and NULL otherwise. */ static const char * |
