ssmtp 2.38.7-4 reads headers from message body.

Frank Slootweg franks_cygwin@yahoo.com
Fri Oct 17 13:45:00 GMT 2003


Corinna Vinschen <corinna-cygwin@cygwin.com> wrote:
> On Fri, Oct 17, 2003 at 12:08:40PM +0200, Corinna Vinschen wrote:
> > On Fri, Oct 17, 2003 at 11:04:19AM +0100, Sam Edge wrote:
> > > Corinna Vinschen <corinna-cygwin@cygwin.com> wrote in
> > > <20031017093307.GK25076@cygbert.vinschen.de>
> > > in gmane.os.cygwin on Fri, 17 Oct 2003 11:33:07 +0200:
> > >
> > > > I'm not familar with the mail-related RFCs.  Is
> > > > it allowed to send lines with DOS lineendings?
> > >
> > > 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...

  Thanks! That is it! I converted the input file from DOS (\r\n) to UNIX
(\n) format and now ssmtp works correctly, i.e. it only reads From: and
To: from the header, not from the body. So now I only have to
incorporate this conversion into my tin (newsreader) setup.

  So my problem is solved, but what about the generic problem? IMO ssmtp
in a Cygwin environment should be able to handle DOS format data. AFAIK,
there are (POSIX? XPG?) standards for opening a stream in text mode,
which should make things compatible between ('DOS' and UNIX) platforms.
Anyway, even if ssmtp is supposed to be 'UNIX-only', then why can it
(apparently) handle DOS format lines *in* the header and *in* the body,
but not *between* the header and body?

  What happens now? Do the author(s)/maintainer(s) of ssmtp pick up this
issue? The Cygwin "Where should I send problem reports?" page
(<http://cygwin.com/problems.html>) requests not to send bug reports
directly to the author(s)/maintainer(s), but will they really pick up
bug reports from this high volume mailing list (cygwin@cygwin.com)?







--
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/



More information about the Cygwin mailing list