We have a problem with the lexer's processing of mime boundary lines. If the boundary line immediately follows a base64 encoded line, the mime boundary is not recognized in lexer_v3.l. The mime part header after it is then processed as body text. If the boundary line follows a blank line (or plain text), all is fine. From Content-type: multipart/mixed; boundary="simple boundary" --simple boundary Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: base64 dGVzdCAg --simple boundary Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: base64 dGVzdCAg --simple boundary Content-type: text/plain; charset=us-ascii Content-Transfer-Encoding: base64 dGVzdCAg --simple boundary-- 2.5.4 - never-interactive (w/o YY_GET_NEW_LINE) rule 246 ("simple") should be rule 206 ("--simple boundary") line 16 should be 'h i' state (header/initial) *** 14 b t 9 dGVzdCAg *** 15 b t 18 --simple boundary --accepting rule at line 246 ("simple") simple *** 16 b t 43 Content-type: text/plain; charset=us-ascii 2.5.31 - never-interactive (w/o YY_GET_NEW_LINE) line 16 should be 'h i' state (header/initial) rule 206 ("--simple boundary") is correct *** 14 b t 9 dGVzdCAg *** 15 b t 18 --simple boundary *** 16 b t 43 Content-type: text/plain; charset=us-ascii --accepting rule at line 206 ("--simple boundary