[comp.mail.sendmail] "buildaddr: no host"?

bob@MorningStar.Com (Bob Sutterfield) (02/15/91)

(Be gentle with me - though I have some examples, this is my first
solo sendmail.cf :-)

While installing 5.65+IDA on a Sun SPARCstation-1 under SunOS 4.0.3c,
I find myself having the following odd interaction.  When my Mlocal
looks like

Mlocal, P=[IPC], F=mDFMpXLCU, S=10, R=10, A=IPC mstar, E=\r\n

(that is, all "local" delivery should happen via SMTP to local host
"mstar"), I see the following:

220 volitans.morningstar.com Sendmail (line no{se) 5.65a/91021403 slinging bits at Thu, 14 Feb 91 15:34:47 -0500
helo scifo.morningstar.com
250 Hello scifo.morningstar.com, pleased to meet you
mail from:<bob@morningstar.com>
554 buildaddr: no host
554 buildaddr: no host
554 buildaddr: no host
554 setsender: can't even parse postmaster!

But when Mlocal is

Mlocal, P=/bin/mail, F=UDFMlmnrs, S=9, A=mail -d $u

all seems well.  I'd prefer to use SMTP to deliver to the machine that
exports /usr/spool/mail, rather than a local /bin/mail, in order to
avoid potential file locking conflicts.

Any suggestions?  Where might I begin looking for the cause of the
buildaddr and setsender complaints?

vixie@decwrl.dec.com (Paul A Vixie) (02/15/91)

>> Mlocal, P=[IPC], F=mDFMpXLCU, S=10, R=10, A=IPC mstar, E=\r\n
>> [...]
>> 554 buildaddr: no host

IPC needs a $h in the A=.  You basically can't do what you want to do,
though I admit that it makes sense.  ($h can't be coerced to be some
constant string like "mstar" at this point in the delivery process,
so that's not an option either.)

If you want to cause all local deliveries to be on a central machine,
then I suggest a centralized /usr/lib/aliases file (distributed with
YP or with rdist or even with NFS).  There would be things in this file
like
	bob: bob@mstar

"mstar"'s sendmail.cf file would strip its own name off in S0 and would
fall into Mlocal which would use /bin/mail.  All other clients of this
"aliases" file would not strip "mstar" off and would therefore end up
using Mtcp or Msmtp or whatever you call your IPC mailer.  This is what
we do here, and we have more than 1300 hosts in "pa.dec.com"; it works
quite well.

Cheers,
--
Paul Vixie
DEC Western Research Lab	<vixie@wrl.dec.com>
Palo Alto, California		...!decwrl!vixie

rlk@think.com (Robert Krawitz) (02/15/91)

In article <VIXIE.91Feb14135147@volition.pa.dec.com>, vixie@decwrl (Paul A Vixie) writes:
]>> Mlocal, P=[IPC], F=mDFMpXLCU, S=10, R=10, A=IPC mstar, E=\r\n
]>> [...]
]>> 554 buildaddr: no host
]
]IPC needs a $h in the A=.  You basically can't do what you want to do,
]though I admit that it makes sense.  ($h can't be coerced to be some
]constant string like "mstar" at this point in the delivery process,
]so that's not an option either.)

Hmm.  We have no problem doing this, without the satellite mailers
knowing anything whatsoever about aliases.  You can, of course, invoke
the local mailer with a host.  Here are a few excerpts from our
satellite sendmail.cf to show what we do.  Obviously, our satellite
mailers are completely stupid.  There's no reason I can see why I
couldn't have chosen the local mailer here.

DNmail.think.com

Mlocal, P=[IPC], F=msDFMuCX, S=11, R=21, A=TCP $h
Mprog, P=[IPC], F=msDFMuCX, S=11, R=21, A=TCP $h

Mether,	P=[IPC], F=msDFMuCX, S=11, R=21, A=TCP $h
S11

S21
# None needed.

S0
# everything else is a local name
R$+			$#ether $@$N $:$1			local names
-- 
ames >>>>>>>>>  |	Robert Krawitz <rlk@think.com>	245 First St.
bloom-beacon >  |think!rlk	(postmaster)		Cambridge, MA  02142
harvard >>>>>>  .	Thinking Machines Corp.		(617)234-2116

rickert@mp.cs.niu.edu (Neil Rickert) (02/15/91)

In article <BOB.91Feb14155039@volitans.MorningStar.Com> bob@MorningStar.Com (Bob Sutterfield) writes:
>While installing 5.65+IDA on a Sun SPARCstation-1 under SunOS 4.0.3c,
>I find myself having the following odd interaction.  When my Mlocal
>looks like
>
>Mlocal, P=[IPC], F=mDFMpXLCU, S=10, R=10, A=IPC mstar, E=\r\n
>
>(that is, all "local" delivery should happen via SMTP to local host
>"mstar"), I see the following:

  What is happening here is that 'sendmail' is not recognizing your local
mailer as a local mailer.  I am not quite sure why it didn't complain that
there is no local mailer, though.  Perhaps it has a split personality and
half thinks there is a local mailer.

  The long and short of it is, you can't do that.  The local mailer is
supposed to be local.

  I recommend you use the IDA configuration files.  The most recent
announced version is 1.4.2, but there are some changes to bring it to
level 1.4.2.9.  You can pick up the 1.4.2 version of 'Sendmail.mc' and
a patch to upgrade it, in mp.cs.niu.edu:/pub/cf

  You should then look into the MAILSERVER option, which is designed to
forward local mail to a server.  There were some problems in the early
implementation of MAILSERVER, which is why you should install the patch.
I believe this will solve most of your problems.

-- 
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
  Neil W. Rickert, Computer Science               <rickert@cs.niu.edu>
  Northern Illinois Univ.
  DeKalb, IL 60115                                   +1-815-753-6940

Andy.Linton@comp.vuw.ac.nz (Andy Linton) (02/15/91)

This isn't hard to do, see the following extracts from the .cf file:

--

######################
###  local macros  ###
######################

# local domain
DDcomp.vuw.ac.nz

# This machine's mail server (where we SMTP `local' mail to).

DSmailhost.comp.vuw.ac.nz

--

S0
# tidy up local domains
R$+@$+                  $:$>15$1@$2

#send it to the mailhost
R$+@$+                  $#TCP $@$S $:$1@$2

# local mail            send it to the mailhost too
R$+                     $#TCP $@$S $:$1@$D

--

############################################################
############################################################
#####
#####           Local and Program Mailer specification
#####
#####           We never use these but sendmail gets upset
#####           if they aren't here!
#####
############################################################
############################################################

MLOCAL,   P=/bin/mail,  F=lsDFMmnP, S=21/21, R=20/21, A=mail -r $g -d $u
P=/bin/sh,    F=lsDFMenuP, S=20, R=20, A=sh -c $u

S20

S21

############################################################
############################################################
#####
#####           SMTP/IPC Mailer specification
#####
############################################################
############################################################

MTCP,   P=[IPC], F=CDFMXmsu, E=\r\n, S=23/23, R=22/23, A=IPC $h

S22

S23
R$+@$+.$D       $@$1@$D
R$-             $@$1@$D

vixie@decwrl.dec.com (Paul A Vixie) (02/15/91)

>> R$+			$#ether $@$N $:$1			local names

Yes, that will work, if all your local mail really goes to the same place.
We've got ~1400 users and ~30 mail servers, so the aliases file is nec'y
for us.  Your solution is better in the pure case (one mail server).

Cheers,
--
Paul Vixie
DEC Western Research Lab	<vixie@wrl.dec.com>
Palo Alto, California		...!decwrl!vixie

rlk@think.com (Robert Krawitz) (02/16/91)

In article <VIXIE.91Feb14220945@volition.pa.dec.com>, vixie@decwrl (Paul A Vixie) writes:
]>> R$+			$#ether $@$N $:$1			local names
]
]Yes, that will work, if all your local mail really goes to the same place.
]We've got ~1400 users and ~30 mail servers, so the aliases file is nec'y
]for us.  Your solution is better in the pure case (one mail server).

You can still have one mailhub that distributes all mail to the
satellite servers (a three level hierarchy).  This avoids the problems
of distributed alias databases and associated confusion.
-- 
ames >>>>>>>>>  |	Robert Krawitz <rlk@think.com>	245 First St.
bloom-beacon >  |think!rlk	(postmaster)		Cambridge, MA  02142
harvard >>>>>>  .	Thinking Machines Corp.		(617)234-2116

vixie@decwrl.dec.com (Paul A Vixie) (02/16/91)

In article <1991Feb15.220501.15332@Think.COM> rlk@think.com (Robert Krawitz) writes:

vix> Yes, that will work, if all your local mail really goes to the same place.
vix> We've got ~1400 users and ~30 mail servers, so the aliases file is nec'y
vix> for us.  Your solution is better in the pure case (one mail server).

rlk> You can still have one mailhub that distributes all mail to the
rlk> satellite servers (a three level hierarchy).  This avoids the problems
rlk> of distributed alias databases and associated confusion.

I would do that if I could find one host on my network which was guaranteed
to be up all the time, and reachable all the time by all other subnets.  As
it is, I'd rather put my eggs in 30 baskets than one.
--
Paul Vixie
DEC Western Research Lab	<vixie@wrl.dec.com>
Palo Alto, California		...!decwrl!vixie