What to do about "remote from" lines

Rob Warnock rpw3 at redwood.UUCP
Wed Jan 16 14:13:18 AEST 1985


+---------------
| This refers to systems running 4.1 BSD so all you 4.2 people please
| don't respond with data about sendmail...
| I have run into a problem interfacing the various mail programs to
| each other.  When mail comes in via uucp it gets the "remote from"
| string appended to the "From" line.  This causes the Berkeley Mail
| program to not recognize this as a "From" line.  The mail is
| displayed as the tail end of the previous mail message.
+---------------

I have seen this problem before, and it wasn't related to the
"remote from" string at all. I don't believe this is the problem. 
At Fortune they ran (still run for some users) 4.1bsd "Mail", and
it handles "remote from" just fine, as does the 4.1 derivative on
the 32:16 which I use.  In fact, the "remote from" is REQUIRED
if the address is to be parsed correctly (otherwise the message
is "From uucp"). If you have a string of sites all using Version 7
mail, you will have as many "From uucp ... remote from XXX" lines
as there are relay sites.

The problem is that BerkMail expects a blank line between messages,
and doesn't treat a line starting with "From " as a new message
unless the previous line was blank. What's probably happening is
that the PREVIOUS mail message didn't have a blank line after it.

With a mixture of sites sending to you, some will be running old
Version 7 mail (which DOESN'T force a blank line on the end of the
message, but also doesn't require it) and some will be running
BerkMail and others, which DO force a blank line. The "rmail"
program which receives uucp mail is basically Version 7 mail,
and DOESN'T force a blank line on the end. If the entire string
of sites from the originator to you are running V.7, and if the
original message did NOT have an "extra" newline at the end, the
mail can gobble the NEXT message (actually not gobble, but "annex").

The problem doesn't usually show up locally, since most editors
force the last line to have a newline, and most mailers tack a
newline on the end, but you can force it for testing if you have
a user running MH (or 'hm') who uses the Rand "E" editor (or any
other editor which allows you to create "incomplete last lines").
Try it. Or, manually create a bunch of mail with no blank lines
between and cat it onto the end of your mail spool file, then
read it with BerkMail... then read it with /bin/mail.

+---------------
| I can see two fixes to this problem:
| 
| 	1 - Use the rmail program which corrects the "From" lines
| 	    added to uucp mail.
+---------------

They are already correct. Don't "fix" it (you'll break it).

I know of no fix other than to change BerkMail's reader/parser to look
for "From " at the beginning of EVERY line, not just after blank lines.
(Alternatively, you can make "rmail" be a program which ensures that there
is a blank line on the end, and passes the result to /bin/mail...)

At Fortune, once we diagnosed the problem (and that took a while), all
that was done was to ask people not to write mail with "incomplete last
lines". You may need a more reliable solution.

p.s. The problem just started happening to me again recently, when a
uucp neighbor got a bad message stuck in the queue, and his "uux" daemon
sent me a complaining letter each time I polled. The daemon-generated
letters didn't have extra newlines, so my BerkMail started tacking
other people's mail onto the end of those error messages. Yucchh!


Rob Warnock
Systems Architecture Consultant

UUCP:	{ihnp4,ucbvax!dual}!fortune!redwood!rpw3
DDD:	(415)572-2607
USPS:	510 Trinidad Lane, Foster City, CA  94404



More information about the Comp.unix mailing list