Re: Netsendmail inserts double line endings?
"Gerd Stolpmann" <[email protected]> Thu, 10 Feb 2005 10:28:22 +0100 (CET)
| Newsgroups | gmane.comp.lang.ocaml.lib.net.devel |
|---|---|
| Message-ID | <[email protected]> |
Richard Jones said: > On Mon, Feb 07, 2005 at 10:20:11PM +0100, Gerd Stolpmann wrote: >> The generated mail uses CR LF as line separator. > > OK, I've confirmed that this is the case. Although it is, of course, > correct to send CR LF in mail messages and the SMTP protocol, I'm not > sure that it's correct to send CR LF to /usr/sbin/sendmail. Surely the > "protocol" being used between the process and /usr/sbin/sendmail is > pure Unix, therefore LF-terminated? I think so. Although it is still a surprising behaviour of exim; CR is handled as whitespace by Unix conventions. >> Although this is the standard for the mail messages themselves, it >> might be that the "sendmail" command emulation of exim takes CR LF as >> LF LF. Just a hypothesis. > > Exim doesn't mind about the CR LF in the mail headers. In the body, it > gets confused, and appears to turn CR LF into LF LF. By "body", I'm > also including the MIME headers for each of the two parts. > > The *really* weird thing about this bug, however, is that it only > bites when sending mail non-locally. I can send mail locally (through > exim), and it comes out just fine. When I send it non-locally, we get > the bug. > > Anyway, in the meantime I have been able to workaround the bug, > for both local and non-local mail, quite successfully, using: > > Netsendmail.sendmail ~mailer:"tr -d '\\015' | /usr/sbin/sendmail" msg > > Attached is my test program. It is quite simple to fix this problem in ocamlnet. Netsendmail.sendmail must only pass the eol conventions down to the functions actually generating the mail. I'll send a notice when it is done. Gerd ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany [email protected] http://www.gerd-stolpmann.de ------------------------------------------------------------ ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_ide95&alloc_id396&op=click