delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/17/09:57:31

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: Sam Edge <sam DOT edgeZZZ AT lineone DOT net>
To: cygwin AT cygwin DOT com
Subject: Re: ssmtp 2.38.7-4 reads headers from message body.
Date: Fri, 17 Oct 2003 14:56:31 +0100
Organization: .
Reply-To: cygwin AT cygwin DOT com
Message-ID: <8vsvovcoi07tr9isks65dauq7cu4usfn6i@4ax.com>
References: <00be01c393c0$869213b0$647ba8c0 AT neth DOT hp DOT com> <20031016115054 DOT GH28997 AT cygbert DOT vinschen DOT de> <021e01c3940b$9ef6c770$647ba8c0 AT neth DOT hp DOT com> <20031017093307 DOT GK25076 AT cygbert DOT vinschen DOT de> <e5fvovkqm0m6l0coe2cpp78k89dvluh6qc AT 4ax DOT com> <20031017100840 DOT GN25076 AT cygbert DOT vinschen DOT de> <20031017102654 DOT GO25076 AT cygbert DOT vinschen DOT de>
In-Reply-To: <20031017102654.GO25076@cygbert.vinschen.de>
MIME-Version: 1.0
X-Posting-Agent: Hamster/2.0.0.1
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id h9HDvTxM019830

Corinna Vinschen <corinna-cygwin AT cygwin DOT com> wrote in
<20031017102654 DOT GO25076 AT cygbert DOT vinschen DOT de>
in gmane.os.cygwin on Fri, 17 Oct 2003 12:26:54 +0200:

> > > The RFCs for SMTP e-mail (RFC2821 and its predecesors) /require/ CR-LF
> > > ("\r\n" i.e. "DOS") line endings. (Probably because debugging using
> > > dumb terminals or printers was easier that way in days of yore.)
> > 
> > Interesting.  So a check as in ssmtp:
> >   while ((fgets (buffer, sizeof buffer, stdin) != NULL) && (buffer[0] != '\n'))
> >     {
> >       /* It's a header line */
> >     }
> > seems a bit oversimplified, right?
> 
> Well, this happens when reading the input file.  When writing the output
> stream to the mailhub, it uses \r\n explicitely.
> So ssmtp assumes that the input file is using only \n.  Of course, ssmtp
> has never been written with textmode mounts in mind...

Answered your own question. :-D

The translation between the SMTP stream's CRLF and the UNIX (or DOS
text-mode) LF is maybe done elsewhere?

Does ssmtp explicitly set stdin to be text-mode? If it's coming from a
UNIX background maybe not. Might be a simple fix then, to get it to do
so before starting to read?

Regards,
-- 
Sam Edge

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019