[comp.mail.sendmail] Problem with ">From" in header

davids@iscuva.ISCS.COM (David Schmidt) (09/28/89)

We've been having problems lately with mail coming in via SMTP from certain
hosts.  The problem occures when a ">From " line is in the header.  It
appears that sendmail decides that this is an invalid header and treats the
rest of the header as message body (inserting a blank line before the >From
line).

This ends up generating an "Apparently To:" header as the original "To:"
header is after the ">From" line.

We have a temporary fix in that removes ALL ">From" lines from the message
before it's sent from the other system, but this is just a hack.

Could anyone give me a fix for my sendmail.cf file that will get sendmail to
recognize the ">From" lines as valid header lines?

I am running Ultrix 3.0 on a MicroVAX II and we do not have source to the
Ultrix sendmail.

Thank you!
-- 
David Schmidt               UUCP:  davids@iscuva.ISCS.COM
ISC-Bunker Ramo Corporation        (uunet!iscuva!davids)
East 22425 Appleway         Phone: +1 509 927 5479
Liberty Lake, WA  99019

pinkas@cadev5.intel.com (Israel Pinkas ~) (09/29/89)

In article <2631@iscuva.ISCS.COM> davids@iscuva.ISCS.COM (David Schmidt) writes:

> We've been having problems lately with mail coming in via SMTP from certain
> hosts.  The problem occures when a ">From " line is in the header.  It
> appears that sendmail decides that this is an invalid header and treats the
> rest of the header as message body (inserting a blank line before the >From
> line).
>
> This ends up generating an "Apparently To:" header as the original "To:"
> header is after the ">From" line.
>
> We have a temporary fix in that removes ALL ">From" lines from the message
> before it's sent from the other system, but this is just a hack.
>
> Could anyone give me a fix for my sendmail.cf file that will get sendmail to
> recognize the ">From" lines as valid header lines?
>
> I am running Ultrix 3.0 on a MicroVAX II and we do not have source to the
> Ultrix sendmail.

The problem is that the line is not a valid header line.  I suprised that
it even gets delivered.

The RFC that control this (821 and 822) state that the format of a message
for SMTP is that the header lines all begin with the headers keyword,
followed by a colon, followed by the rest of the line.  (I'm simplifying
here.)  The header is to be followed by one blank line and then the body of
the message.  A line starteding with "From " or ">From " is not a valid
header line.

The format for Unix mailboxes has the "From " line before the header.
That's probably where this line is from.

You don't want to fix sendmail, you want to fix the machine that is
generating these lines.

The Apparently-To: header line is sendmail's work.  The recipients are
specified when the connection is established.  If sendmail can't find a
valid To: header, it will add in the Apparently-To: header.

-Israel Pinkas
--
--------------------------------------
Disclaimer: The above are my personal opinions, and in no way represent
the opinions of Intel Corporation.  In no way should the above be taken
to be a statement of Intel.

UUCP:	{amdcad,decwrl,hplabs,oliveb,pur-ee,qantel}!intelca!mipos3!cadev4!pinkas
ARPA:	pinkas%cadev4.intel.com@relay.cs.net
CSNET:	pinkas@cadev4.intel.com