[comp.sys.att] sendmail and delivery problem

lees@briggs1.lbs.msu.edu (John Lees) (11/13/90)

We have a mail delivery problem on our 3B2-500s running 3.1.1 and
sendmail 4.12 (9/7/83) from Wollongong. The problem is that all
mail from off-site is delivered as "From root". The following line
begins with ">From", and has the correct address of the sender. The
remainder of the message is just fine. Example:

  From root Mon Nov 12 17:47 EST 1990
  >From freemacs-request@sun.soe.clarkson.edu  Mon Nov 12 17:47:21 1990

The sendmail.cf uses this definition for the mailer:

Mlocal, P=/bin/mail, F=lsSMmh, S=10, R=10, A=mail $u

I thought the problem might be that there is no "-d" option to mail, as
I have seen on other systems, but adding this option results in no mail
bewing delivered at all. (BTW, freezing the sendmail.cf causes sendmail
to complain "out of memory" on its next invocation. Sheeesh.)

These machines were donated by AT&T, the software is no longer being
updated, et cetera. Thanks for any help!

- - - - M i c h i g a n   S t a t e   U n i v e r s i t y - - - - O
 John Lees                    Instructor in Computer Science     OoO
 Graduate student             Lyman Briggs School                /O
 Department of Philosophy     College of Natural Science        |
 114 Justin Morrill Hall      E-190 Holmes Hall                (|) flower
 East Lansing, MI 48824-1036  East Lansing, MI 48825-1107 USA  _|_  power
    lees@briggs1.lbs.msu.edu, lees@msuegr.bitnet, ...!uunet!frith!lees

bruce@sonyd1.Broadcast.Sony.COM (Bruce Lilly) (11/15/90)

In article <1990Nov13.141646.4032@msuinfo.cl.msu.edu> lees@briggs1.lbs.msu.edu (John Lees) writes:
>We have a mail delivery problem on our 3B2-500s running 3.1.1 and
>sendmail 4.12 (9/7/83) from Wollongong. The problem is that all
>mail from off-site is delivered as "From root". The following line
>begins with ">From", and has the correct address of the sender. The
>remainder of the message is just fine. Example:
>
>  From root Mon Nov 12 17:47 EST 1990
>  >From freemacs-request@sun.soe.clarkson.edu  Mon Nov 12 17:47:21 1990
> [ ... ]

1) version 4.12 is ancient (it has the pre-Morris worm bugs!)
2) the "From " lines do not indicate where the message came
    from; the "From:" RFC-822 header does. The problem is in your
    mail user agent (MUA), not in sendmail (the MTA).

I recommend getting sendmail 5.65 with IDA 1.3.5 enhancements, which is
easily ported to System V.

-- 
    Bruce Lilly, Product Manager,      | bruce@Broadcast.Sony.COM
    Digital Television Tape Recording, | uunet!{sonyusa,vmp}!sonyd1!bruce
    Sony, 3 Paragon Drive, Montvale,   | lilb@sony.compuserve.com (slow)
    NJ 07645-1735  |  Telephone: 1(201)358-4161  |  FAX: 1(201)358-4089

andy@jhunix.HCF.JHU.EDU (Andy S Poling) (11/15/90)

In article <1990Nov13.141646.4032@msuinfo.cl.msu.edu> lees@briggs1.lbs.msu.edu (John Lees) writes:
>We have a mail delivery problem on our 3B2-500s running 3.1.1 and
>sendmail 4.12 (9/7/83) from Wollongong. The problem is that all
>mail from off-site is delivered as "From root". The following line
>begins with ">From", and has the correct address of the sender. The
>remainder of the message is just fine. Example:
>
>  From root Mon Nov 12 17:47 EST 1990
>  >From freemacs-request@sun.soe.clarkson.edu  Mon Nov 12 17:47:21 1990
>
>The sendmail.cf uses this definition for the mailer:
>
>Mlocal, P=/bin/mail, F=lsSMmh, S=10, R=10, A=mail $u
>
>I thought the problem might be that there is no "-d" option to mail, as
>I have seen on other systems, but adding this option results in no mail
>bewing delivered at all. (BTW, freezing the sendmail.cf causes sendmail
>to complain "out of memory" on its next invocation. Sheeesh.)

This is a long-standing problem with the /bin/mail on various SysV boxes.
/bin/mail is adding the first From_ line and escaping the second one (which
it doesn't do right anyway - it can still allow spoofing).  /bin/mail can
also cause people to be charged for receiving mail (not reading it) because
it resets it's uid.

I finally got fed up enough to write a no-frills program to bop mail into
people's mailboxes.  It doesn't do forwarding, or aliasing, but who cares.
It was written for use with sendmail and thus doesn't try to add it's own
From_ line.  The command line is eminently simple:

	/usr/local/bin/delivermail username < mail_message

A sample sendmail.cf Mlocal definition is

Mlocal, Path=/usr/local/bin/delivermail,
	Flags= DFPSUsl,
	Sender=10,
	Recipient=11
	Argv=delivermail $u

There are no command-line flags.  Sendmail (and, I believe, MMDF as well)
provides all of the frills you could want already anyway.  Actually, it does
have one compile-time-enablable frill - I added the capability to "write" to
the user's terminal whenever they receive mail if the user-execute bit on
their tty is enabled.

We are using it on our AT&T 3b4000 (SysVr3.1.5) with no apparent problems.
It is, however, SysV-specific in that it uses lockf() instead of flock() and
putenv().  It can be anon-FTPed from jhunix.hcf.jhu.edu (128.220.2.5) in
pub/delivermail/shar.Z.  I consider it a reasonable alternative to /bin/mail
for use by sendmail.

That's my solution... throw code at the problem :-)

-Andy
--
Andy Poling                              Internet: andy@gollum.hcf.jhu.edu
UNIX Systems Programmer                  Bitnet: ANDY@JHUNIX
Homewood Academic Computing              Voice: (301)338-8096    
Johns Hopkins University                 UUCP: uunet!mimsy!aplcen!jhunix!andy