]> git.ipfire.org Git - thirdparty/dovecot/core.git/commit
lib-mail: istream-header-filter - Fix HEADER_FILTER_ADD_MISSING_EOH with empty input
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Tue, 13 Jun 2017 18:54:00 +0000 (21:54 +0300)
committerVille Savolainen <ville.savolainen@dovecot.fi>
Fri, 16 Jun 2017 06:18:05 +0000 (09:18 +0300)
commitd8c688a9889135ffa5ac9fe9043a227447a57727
tree017a34e7149728444e0d665926770d20ede61647
parentffc73186695a334a9b08be0e6f68aa922016a68e
lib-mail: istream-header-filter - Fix HEADER_FILTER_ADD_MISSING_EOH with empty input

The result for "" should be "\n", not "\n\n". The second "\n" would belong
to the mail body.

This fixes calculating hashes for incremental dsync when mail didn't have
Date or Message-ID headers, resulting in e.g.:

Warning: Deleting mailbox 'INBOX': UID=1 already exists locally for a different mail: Headers hashes don't match (e1c06d85ae7b8b032bef47e42e4c08f9 vs 68b329da9893e34099c7d8ad5cb9c940)
src/lib-mail/istream-header-filter.c
src/lib-mail/test-istream-header-filter.c