[exim] got this garbage from HP

Página superior
Eliminar este mensaje
Responder a este mensaje
Autor: Jasen Betts
Fecha:  
A: exim-users
Asunto: [exim] got this garbage from HP

The "MIME-Version:" header not being separated from the "Subject:" header.

I sustpected the problem was line endings and yes it turns out to be
so. the HP is using a mix of '0a' and '0d-0a' in the message headers

I got this garbage data block from a client's HP printer, some details
have been masked "xx" to protect the innocent.

0000   46 72 6f 6d 3a 20 22 3d 3f 75 74 66 2d 38 3f 51   From: "=?utf-8?Q
0010   3f 48 50 3d 32 30 50 72 69 6e 74 65 72 3f 3d 22   ?HP=20Printer?="
0020   20 3c 48 50 2e 50 72 69 6e 74 65 72 40 xx xx xx   <HP.Printer@xxx
0030   xx xx xx xx xx xx xx xx xx 74 3e 0d 0a 54 6f 3a   xxxxxxxxxx>..To:
0040   20 3c xx xx xx xx xx xx xx xx xx xx xx xx xx 40   <xxxxxxxxxxxxx@
0050   67 6d 61 69 6c 2e 63 6f 6d 3e 0d 0a 53 75 62 6a   gmail.com>..Subj
0060   65 63 74 3a 53 63 61 6e 2d 74 6f 2d 45 6d 61 69   ect:Scan-to-Emai
0070   6c 20 54 65 73 74 20 4d 65 73 73 61 67 65 20 66   l Test Message f
0080   72 6f 6d 20 48 50 20 43 6f 6c 6f 72 20 4c 61 73   rom HP Color Las
0090   65 72 4a 65 74 20 50 72 6f 20 4d 34 37 38 66 2d   erJet Pro M478f-
00a0   39 66 0a 4d 49 4d 45 2d 56 65 72 73 69 6f 6e 3a   9f.MIME-Version:
00b0   20 31 2e 30 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79   1.0..Content-Ty
00c0   70 65 3a 6d 75 6c 74 69 70 61 72 74 2f 6d 69 78   pe:multipart/mix
00d0   65 64 3b 63 68 61 72 73 65 74 3d 75 74 66 2d 38   ed;charset=utf-8
00e0   3b 20 62 6f 75 6e 64 61 72 79 3d 22 2d 2d 2d 2d   ;boundary="----
00f0   3d 5f 50 61 72 74 5f 42 6f 75 6e 64 61 72 79 5f   =_Part_Boundary_
0100   30 30 30 30 30 30 30 31 5f 32 34 65 39 35 39 66   00000001_24e959f
0110   62 2e 36 35 31 31 63 39 61 36 22 0d 0a 0d 0a 0d   b.6511c9a6".....
0120   0a 0d 0a 2d 2d 2d 2d 2d 2d 3d 5f 50 61 72 74 5f   ...------=_Part_
0130   42 6f 75 6e 64 61 72 79 5f 30 30 30 30 30 30 30   Boundary_0000000
0140   31 5f 32 34 65 39 35 39 66 62 2e 36 35 31 31 63   1_24e959fb.6511c
0150   39 61 36 0d 0a 43 6f 6e 74 65 6e 74 2d 54 79 70   9a6..Content-Typ
0160   65 3a 74 65 78 74 2f 70 6c 61 69 6e 3b 63 68 61   e:text/plain;cha
0170   72 73 65 74 3d 75 74 66 2d 38 3b 20 0d 0a 43 6f   rset=utf-8; ..Co
0180   6e 67 72 61 74 75 6c 61 74 69 6f 6e 73 21 0a 0a   ngratulations!..
0190   54 68 65 20 73 65 74 74 69 6e 67 73 20 79 6f 75   The settings you
01a0   20 68 61 76 65 20 63 6f 6e 66 69 67 75 72 65 64    have configured
01b0   20 61 72 65 20 63 6f 72 72 65 63 74 2e 0a 0a 4e    are correct...N
01c0   6f 74 65 3a 20 54 68 69 73 20 65 6d 61 69 6c 20   ote: This email 
01d0   6d 65 73 73 61 67 65 20 69 73 20 61 75 74 6f 6d   message is autom
01e0   61 74 69 63 61 6c 6c 79 20 67 65 6e 65 72 61 74   atically generat
01f0   65 64 2e 20 44 6f 20 6e 6f 74 20 72 65 70 6c 79   ed. Do not reply
0200   20 74 6f 20 74 68 69 73 20 6d 65 73 73 61 67 65    to this message
0210   2e 0a 0a 44 65 76 69 63 65 20 49 64 65 6e 74 69   ...Device Identi
0220   66 69 63 61 74 69 6f 6e 0a 0a 50 72 6f 64 75 63   fication..Produc
0230   74 20 53 65 72 69 61 6c 20 4e 75 6d 62 65 72 3a   t Serial Number:
0240   20 43 4e 43 52 51 xx xx xx xx xx 0a 0a 0a 0d 0a   CNCRQxxxxxx.....


Exim seems to translate the lone LF into a space which breaks the
message, OTOH Gmail seems to convert it into a line break which fixes it.

Obviouly the best thing to to would be to get HP to fix their device,
but is there any interest in chaging the line break detection in exim?

--
Jasen.
pǝsɹǝʌǝɹ sʇɥƃᴉɹ ll∀