[net.bugs] bugs in /bin/mail

gnu@hoptoad.uucp (John Gilmore) (10/11/86)

In article <1196@ncr-sd.UUCP>, matt@ncr-sd.UUCP (Matt Costello) writes:
>                         Why does mail go to so much trouble to preserve
> nulls in a mail file? ...                           Does anyone see any
> reason why stripping nulls would have a detrimental effect?

Yes.  Mail should just act as a transportation mechanism without imposing
any meaning on the data being transported.  In particular, making
assumptions like "nobody would want nulls in a message" is imposing
a meaning ("Nulls are useless in mail messages").

In point of fact, if mail and news would carry nulls without trouble,
we would not have to uuencode binary programs to mail them to each other,
post them to the net, etc.  Since people started mailing binaries
around, this has been noticed, and I applaud the System V maintenance
team for fixing this in their /bin/mail.  Berkeley hasn't fixed it,
to my knowledge, and if Sun has fixed it (they know about it), they
haven't shipped the fixed release yet.

There are also problems with bytes in which the top bit is set, at
least in Sun/Berkeley mail.  Further problems appear if you send text
which has long stretches without newlines.  If anyone wants specific
bug reports, ask me for a copy -- or try it yourself!
-- 
John Gilmore  {sun,ptsfa,lll-crg,ihnp4}!hoptoad!gnu   jgilmore@lll-crg.arpa
(C) Copyright 1986 by John Gilmore.             May the Source be with you!

scott@cdp.UUCP (10/13/86)

How can you send binaries in mail.  What happens if the string
"\nFrom" appears in te binary?  Shouldn't the user agent or
delivery system or someone be inserting a '>' before the From?
Won't this screw up the binary; or, if you don't insert the
'>', won't that screw up the user agent mail parser?

-scott
{ihnp4,...}!hplabs!cdp!scott

henry@utzoo.UUCP (Henry Spencer) (10/17/86)

> How can you send binaries in mail.

You can't, not reliably.  Mail is definitely a text-only facility.
Whether this is a good idea or not is another question, but the current
software definitely has that restriction.

> What happens if the string
> "\nFrom" appears in te binary?  Shouldn't the user agent or
> delivery system or someone be inserting a '>' before the From?

Yup.

> Won't this screw up the binary...

Yup, it will.  This is why uuencode and uudecode exist, for encoding
binaries as text.
-- 
				Henry Spencer @ U of Toronto Zoology
				{allegra,ihnp4,decvax,pyramid}!utzoo!henry