himalaya icon indicating copy to clipboard operation
himalaya copied to clipboard

Error when date has different format

Open rEnr3n opened this issue 3 years ago • 4 comments

$ himalaya --version
himalaya 0.5.10

I'm using the maildir backend and I got this error when I start the app.

$ himalaya
Error: cannot parse maildir envelopes from "/home/ren/.mail/purelymail"

Caused by:
    0: cannot parse maildir mail entry
    1: cannot parse maildir message date "05-FEB-2021 22:05:02"
    2: input contains invalid characters

I checked the email and it has the following three lines:

Received: from smtp-nlb02 ([10.141.249.58]) by M61SV059 with Microsoft SMTPSVC(10.0.17763.1);
	 Fri, 5 Feb 2021 22:05:02 +0800
Date: 05-FEB-2021 22:05:02

I don't see this in other emails. The other emails have the following format: Date: Fri, 5 Feb 2021 22:05:02 +0800

rEnr3n avatar Apr 20 '22 09:04 rEnr3n

Clearly the date does not follow the RFC. I cannot even see from which RFC this date format derives from :disappointed: not sure how to help. Any suggestion?

soywod avatar May 07 '22 20:05 soywod

I checked all the emails that have problematic values on Date:. They all have the correct format at the end of Received: just like OP. Others have these:

Received: from smtp-nlb02 ([10.141.249.58]) by M61SV059 with Microsoft SMTPSVC(10.0.17763.1)
    by mail.example.com
    ; Fri, 5 Feb 2021 22:05:02 +0800
Received: from smtp-nlb02 ([10.141.249.58]) by M61SV059 with Microsoft SMTPSVC(10.0.17763.1)
    by mail.example.com
    for <[email protected]>; Fri,  5 Feb 2021 22:05:02 +0800

I don't completely understand the RFC but there's a mention here about folding. Is that what you're looking for?

rEnr3n avatar May 10 '22 07:05 rEnr3n

I don't completely understand the RFC but there's a mention here about folding. Is that what you're looking for?

It could be the issue indeed. I will investigate. Could you share a complete raw email so I can reproduce and debug locally?

soywod avatar May 21 '22 07:05 soywod

I just sent you an email with the attached file.

rEnr3n avatar May 21 '22 11:05 rEnr3n