X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=lib%2Fmessage-file.c;h=68f646a4e56d878459d37a665ca0298621e0c1d9;hp=647ccf3abedaaf52f95bcc44e9a3199de8d4b42d;hb=717e3dcdc3e55d72c8e4a1948708c34170dbf926;hpb=8c0bebedc5edbff5ddc46b66da1177ec18f48c69 diff --git a/lib/message-file.c b/lib/message-file.c index 647ccf3a..68f646a4 100644 --- a/lib/message-file.c +++ b/lib/message-file.c @@ -291,11 +291,16 @@ _notmuch_message_file_get_header (notmuch_message_file_t *message, if (value) return value; - if (strcasecmp (header, "received") == 0) { + if (strcasecmp (header, "received") == 0 || + strcasecmp (header, "delivered-to") == 0) { /* - * The Received: header is special. We concatenate all - * instances of the header as we use this when analyzing the - * path the mail has taken from sender to recipient. + * The Received: header is special. We concatenate all instances of the + * header as we use this when analyzing the path the mail has taken + * from sender to recipient. + * + * Similarly, multiple instances of Delivered-To may be present. We + * concatenate them so the one with highest priority may be picked (eg. + * primary_email before other_email). */ decoded = _notmuch_message_file_get_combined_header (message, header); } else {