maddy icon indicating copy to clipboard operation
maddy copied to clipboard

CreateMessage error when trying to add a message

Open Oreolek opened this issue 2 years ago • 1 comments

Tried to copy a message from another account.

CreateMessage (extractCachedData): message: malformed MIME header key: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http.

The message in question is an old invoice email that starts like this:

Content-Type: text/html; charset=utf8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">	 
<title>Чек об оплате</title>
</head>
<body>

So it announces itself like UTF-8 but actually it's UTF-8 displayed as Windows-1252 or so? Subject line is also malformed in a similar fashion. Also note the double <head> tag.

No error in log files, this is only what Thunderbird displays and Thunderbird truncated the response.

Log files

Log file is empty. (to clarify: completely empty with debug 0 and no lines about this with debug 1)

Server

maddy 0.6.2 linux/amd64 go1.18.3

storage.imapsql local_mailboxes {
    driver postgres
}

I'd like to:

  • get something useful in the log file about this
  • actually receive this message in my inbox

Oreolek avatar Sep 16 '22 20:09 Oreolek

Content-Type: text/html; charset=utf8
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

There is no empty line separating message header and body, hence maddy fails to parse it. Currently such messages cannot be stored or processed by maddy.

foxcpp avatar Sep 20 '22 09:09 foxcpp