Strip the mailbox header when uploading messages from files
commit270d875293e4ef1bcdf85cbbe1f19fb8bdabb372
authorJan Kundrát <jkt@kde.org>
Wed, 12 Apr 2017 21:00:16 +0000 (12 23:00 +0200)
committerJan Kundrát <jkt@kde.org>
Wed, 12 Apr 2017 21:00:16 +0000 (12 23:00 +0200)
tree0b7b47b235825b81274d6c967db9710eba6196e8
parentb86184ae14bfcd7374616b1c1259b0cd47bb3c5e
Strip the mailbox header when uploading messages from files

Stuff which was created by `git format-patch` contains this header.
Dovecot deals with it reasonably well, but things start going south when
we rely on a correct format of such a message, and construct another one
by prepending a set of Resent-* headers to that. Suddenly, this stray
mailbox header is placed in the middle of headers and it breaks stuff.

TL;DR: try to accept garbage which user tries to upload. That 80
characters is in place as a desperate safeguard against randomly
stripping too much crap.

Change-Id: I48131ff1c308ce64fdb81d5a7d276f1b2439f8e5
src/Imap/Model/MailboxModel.cpp