~rjarry/aerc-devel

9 3

Bug with weird email

Details
Message ID
<COU92STECWQF.1FVEPPBHRZGNN@PhilippN-Vostro-5490>
DKIM signature
missing
Download raw message
Hey, I've revently recieved an email where aerc in the inbox list just
displayed "(unable to fetch header)", instead of the timestamp, subject,
etc. When I press <Enter> on that mail, the mail doesn't open, the
bottom line displays the message: "could not get structure: message:
malformed MIME header line: <!DOCTYPE html>". However, I can just fine
open that mail in my webmailer, and it displays correctly. I assume this
is a bug with the mail backend aerc is using. BTW, the mail is stored in
a maildir. If there is some other place upstream where I should report
this, don't hesitate to tell me where. Also you can ask me questions
about a mail, but I'll not post the mail publicly, as it was from my
bank.

Here is a thing that i assume is related to how aerc interact with the
email backend. When I'm in the mail i got after the weird mail, and then
press J, making aerc open the broken mail, aerc crashes. I'll attach a
crash report.
Details
Message ID
<COU98NDLKHK3.46M977AQILE5@mashenka>
In-Reply-To
<COU92STECWQF.1FVEPPBHRZGNN@PhilippN-Vostro-5490> (view parent)
DKIM signature
missing
Download raw message
Hi,

On Mon Dec 05, 2022 at 23:50, laalsaas wrote:
> Hey, I've revently recieved an email where aerc in the inbox list just
> displayed "(unable to fetch header)", instead of the timestamp, subject,
> etc. When I press <Enter> on that mail, the mail doesn't open, the
> bottom line displays the message: "could not get structure: message:
> malformed MIME header line: <!DOCTYPE html>". However, I can just fine
> open that mail in my webmailer, and it displays correctly. I assume this
> is a bug with the mail backend aerc is using. BTW, the mail is stored in
> a maildir. If there is some other place upstream where I should report
> this, don't hesitate to tell me where. Also you can ask me questions
> about a mail, but I'll not post the mail publicly, as it was from my
> bank.
>
> Here is a thing that i assume is related to how aerc interact with the
> email backend. When I'm in the mail i got after the weird mail, and then
> press J, making aerc open the broken mail, aerc crashes. I'll attach a
> crash report.

could you try installing the latest master from source and see if it does the
same? I have a vague memory that we had something like this already and was
fixed since the latest release.

Best,
Bence


--
+36305425054
bence.ferdinandy.com
Details
Message ID
<COUKP892AM9F.34ANGVUKCS2SE@hera>
In-Reply-To
<COU92STECWQF.1FVEPPBHRZGNN@PhilippN-Vostro-5490> (view parent)
DKIM signature
missing
Download raw message
On Mon Dec 5, 2022 at 11:50 PM CET, laalsaas wrote:
> the bottom line displays the message: "could not get structure:
> message: malformed MIME header line: <!DOCTYPE html>".
Pretty sure the mail does not follow standard and we can't cater to
every non-standard kind of mail. To say for certain we would need the
complete mail (including headers)

> However, I can just fine open that mail in my webmailer, and it
> displays correctly.
Since the webmailer is already using HTML it's probably more flexible in
this regard.

-- 
Moritz Poldrack
https://moritz.sh
Details
Message ID
<COUW56TT52DN.3IZEJHYF8R57G@PhilippN-Vostro-5490>
In-Reply-To
<COU98NDLKHK3.46M977AQILE5@mashenka> (view parent)
DKIM signature
missing
Download raw message
I just recompiled on master, with the following results:

- The mail still displays as "(unable to fetch header)"

- I still can't open the mail with "could not get structure: message:
  malformed MIME header line: <!DOCTYPE html>".

- If I am in the email I got after the weird mail and press J, the
  bottom status line displays the same message, and the main window
  display the same message prefixed with "could not view message: ".
  This seems like an improvement, however, aerc crashes as soon as I try
  to leave the message (by pressing J/K/C-n). Attached you'll once again
  find the crash report.
Details
Message ID
<COUWA66FRO11.1TNSSSLCLI7BN@hera>
In-Reply-To
<COUW56TT52DN.3IZEJHYF8R57G@PhilippN-Vostro-5490> (view parent)
DKIM signature
missing
Download raw message
Could you provide the mail? Feel free to redact confidential data as
needed.
-- 
Moritz Poldrack
https://moritz.sh
Details
Message ID
<COUWPHB1ISD5.1ZS529XU8FMIY@PhilippN-Vostro-5490>
In-Reply-To
<COUKP892AM9F.34ANGVUKCS2SE@hera> (view parent)
DKIM signature
missing
Download raw message
On Tue Dec 6, 2022 at 9:00 AM CET, Moritz Poldrack wrote:
> On Mon Dec 5, 2022 at 11:50 PM CET, laalsaas wrote:
> > the bottom line displays the message: "could not get structure:
> > message: malformed MIME header line: <!DOCTYPE html>".
> Pretty sure the mail does not follow standard and we can't cater to
> every non-standard kind of mail. To say for certain we would need the
> complete mail (including headers)
That is indeed very likely. I have looked at the mail in raw and noticed
two things:

Firstly, the mail contains this Header:
> X-Amavis-Alert: BAD HEADER SECTION, MIME error: error: couldn't parse head;
>     error near:; <html lang="de">

Secondly, I noticed that the mail contains this sequence:

> Content-Type: text/html; charset=iso-8859-1
> Content-Transfer-Encoding: 8bit
> <!DOCTYPE html>
> <html lang="de">
[continued html version of the mail].

I don't know the MIME standard well enough to be certain, but i think
there should be a blank line after 8bit. At leas when i open the mail
with a texteditor, insert that blank line, aerc can display the mail.
Details
Message ID
<COUWQK6MIM53.1YULAEO4FMGV8@hera>
In-Reply-To
<COUWPHB1ISD5.1ZS529XU8FMIY@PhilippN-Vostro-5490> (view parent)
DKIM signature
missing
Download raw message
On Tue Dec 6, 2022 at 6:21 PM CET, laalsaas wrote:
> > Content-Type: text/html; charset=iso-8859-1
> > Content-Transfer-Encoding: 8bit
> > <!DOCTYPE html>
> > <html lang="de">
> [continued html version of the mail].
>
> I don't know the MIME standard well enough to be certain, but i think
> there should be a blank line after 8bit. At leas when i open the mail
> with a texteditor, insert that blank line, aerc can display the mail.
That is indeed not a valid mail. And that is also the reason Amavis
fails to parse it. You might want to send the sender a small info about
that.

Regarding the solution of this issue, I don't think we actually have to
do anything. Mails to read with aerc have to follow the established
standards and we can't really cater to everyone not following standards
or bending them to their will :)

-- 
Moritz Poldrack
https://moritz.sh
Details
Message ID
<COUWWQH3XA4T.2C7VW134GF392@PhilippN-Vostro-5490>
In-Reply-To
<COUWQK6MIM53.1YULAEO4FMGV8@hera> (view parent)
DKIM signature
missing
Download raw message
On Tue Dec 6, 2022 at 6:26 PM CET, Moritz Poldrack wrote:
> Regarding the solution of this issue, I don't think we actually have to
> do anything. Mails to read with aerc have to follow the established
> standards and we can't really cater to everyone not following standards
> or bending them to their will :)
I do agree that it's not aerc's job to parse invalid mails. However, I
would argue that it shouldn't crash when trying to display them.
Details
Message ID
<COUX4AB6R6CH.3GOYKIC505O1E@hera>
In-Reply-To
<COUWWQH3XA4T.2C7VW134GF392@PhilippN-Vostro-5490> (view parent)
DKIM signature
missing
Download raw message
On Tue Dec 6, 2022 at 6:31 PM CET, laalsaas wrote:
> I do agree that it's not aerc's job to parse invalid mails. However, I
> would argue that it shouldn't crash when trying to display them.
You have a point there.

-- 
Moritz Poldrack
https://moritz.sh
Details
Message ID
<6a02aea2-aa89-487a-8a91-646702fcc7d2@ferdinandy.com>
In-Reply-To
<COUX4AB6R6CH.3GOYKIC505O1E@hera> (view parent)
DKIM signature
missing
Download raw message
We definitely shouldn't crash ever if possible :D
Reply to thread Export thread (mbox)