[Mimedefang] Bare returns in message body

Aleksandar Milivojevic alex at milivojevic.org
Tue Nov 15 11:56:49 EST 2005


Quoting "David F. Skoll" <dfs at roaringpenguin.com>:

> David F. Skoll wrote:
> Sigh.  When you send body chunks back to Sendmail, it converts CRLF
> to LF, because it's writing it to a queue file, which is stored with
> UNIX-convention line endings.  Also, when Sendmail reads the queue
> file and sends it to MIMEDefang, it converts LF to CRLF.
>
> So:
>
> - There is no way to see a lone LF from milter.
> - There IS a way to see a lone CR.
> - There is no way to know if the CRLF you see in your milter was REALLY
>  a CRLF on the wire, or just a LF on the wire.
> - When you send a body BACK to Sendmail, it makes no difference if you
>  terminate lines with LF or CRLF.
>
> What a mess.

In other words, it should be Sendmail that should be patched to reject bare CR
and bare LF.  Patch against Sendmail (as config option)?

I know of at least one popular IMAP server, namely Cyrus IMAPD, that does such
checks and rejects messages that contain bare newlines.  Furthermore, 
it is not
conditional (unless you hack Cyrus code, it is not possible to turn it 
off).  So
this is nothing new, and could be considered common practice at many sites (be
them aware of it or not).

IMO, MIMEDefang should at least set suspicios char flag when it 
encounters bare
CR or LF (well, the later is probably not possible to detect on Unix systems).

----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.





More information about the MIMEDefang mailing list