Workaround a RECEIVED message field missing actual date info.

This commit is contained in:
Jacek Piszczek 2021-03-15 20:38:04 -04:00
parent 47c6f35f5a
commit 025c155919

View File

@ -82,12 +82,18 @@ void messageParser::parse(const shared_ptr <const message>& msg) {
// Date
shared_ptr <const headerField> recv = msg->getHeader()->findField(fields::RECEIVED);
static const datetime unsetDate;
m_date = unsetDate;
if (recv) {
m_date = recv->getValue <relay>()->getDate();
} else {
}
// RECEIVED may in some cases contain no date at all
if (unsetDate == m_date) {
shared_ptr <const headerField> date = msg->getHeader()->findField(fields::DATE);