sendmail error: "Local configuration error, hostname not recognized as local"

From: Dicky Shum <dickys_at_HK.Super.NET>
Date: Tue, 14 Nov 1995 14:33:58 +0800 (HKT)

Hi OSF Managers,

We are using Digital Unix ver 3.2a and we got the problem about sendmail.

Our domain name is: china-motion.com
The mail hub host name is: mail.china-motion.com


After we setup our mail server, we cannot send mail out of our domain,
i.e. mail cannot be delivered out of china-motion.com domain (however,
There is no problem on receiving in-coming mail). We have tried to add
'Cw' macro into the sendmail.cf file but no effect. The error message
from server and /var/adm/sendmail/sendmail.cf are shown as follows.

Is it impossible to use the hostname like 'mail'? Any reply mail can
be sent to dickys_at_hk.super.net

Thanks,
Dicky Shum


***************************
* *
* sendmail version *
* *
***************************

root:/var/adm/sendmail> telnet localhost mail
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.china-motion.com Sendmail 5.65 (1.1.8.2/13Nov95-0721PM) Tue, 14 Nov
1995
12:55:08 +0800
quit
221 mail.china-motion.com closing connection
Connection closed by foreign host.
root:/var/adm/sendmail>
root:/var/adm/sendmail>




***************************
* *
* Eudora 1.52 return *
* *
***************************


   ----- Transcript of session follows -----
While talking to china-motion.com:
>>> HELO mail.china-motion.com
<<< 553 Local configuration error, hostname not recognized as local
554 <dickys_at_hk.super.net>... Service unavailable

   ----- Unsent message follows -----
Received: from [202.64.196.152] by mail.china-motion.com;
(5.65/1.1.8.2/13Nov95-0721PM)
        id AA16849; Tue, 14 Nov 1995 12:13:45 +0800
Date: Tue, 14 Nov 1995 12:13:45 +0800
Message-Id: <9511140413.AA16849_at_mail.china-motion.com>
X-Sender: dicky_at_mail.china-motion.com (Unverified)
X-Mailer: Windows Eudora Light Version 1.5.2
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
To: dickys_at_hk.super.net
From: Dicky Shum <dicky_at_china-motion.com>
Subject: test 1243

test 123




***************************
* *
* sendmail configuration *
* *
***************************



root:/var/adm/sendmail>
root:/var/adm/sendmail> cat sendmail.cf
#
# *****************************************************************
# * *
# * Copyright (c) Digital Equipment Corporation, 1991, 1995 *
# * *
# * All Rights Reserved. Unpublished rights reserved under *
# * the copyright laws of the United States. *
# * *
# * The software contained on this media is proprietary to *
# * and embodies the confidential technology of Digital *
# * Equipment Corporation. Possession, use, duplication or *
# * dissemination of the software and media is authorized only *
# * pursuant to a valid written license from Digital Equipment *
# * Corporation. *
# * *
# * RESTRICTED RIGHTS LEGEND Use, duplication, or disclosure *
# * by the U.S. Government is subject to restrictions as set *
# * forth in Subparagraph (c)(1)(ii) of DFARS 252.227-7013, *
# * or in FAR 52.227-19, as applicable. *
# * *
# *****************************************************************
#
# HISTORY
#
# _at_(#)$RCSfile: sendmail.cf.pd,v $ $Revision: 1.1.8.2 $ (DEC) $Date:
1993/09/07 21:42:57 $
#
# cruft to let old bindsetup work. these macros are not used.
#
DDLOCAL
DAmail
############################################################ _at_Ltag(Intro)
############################################################
#####
##### SENDMAIL CONFIGURATION FILE
#####
##### Paul Vixie, forked off on 9-December-90
##### Paul Vixie, major MAIL11/MR work on 17-July-1991
##### Paul Vixie, Todd Kaehler and Fred Avolio: parameterized, August 1992
#####
#####
############################################################
############################################################

## predefined
# $y decnet node name (if known) (if running a recent binary)
# $w fully-qualified hostname
# $j same as $w (except IDA, which is all-lower-case, strip-at-first-dot)
##

############################################################ _at_Ltag(LocalInfo)
### local info
############################################################

# parent domain
DPchina-motion.com

# my domain
DNchina-motion.com

# name exported on external internet mail
DWchina-motion.com

# my official hostname
Dj$w


#
# aliases at the $P level -- we think we are authoritative for these
#
Cdchina-motion

#
# usernames which will be _at_host qualified on outbound localdom mail
#
CNroot postmaster news uucp mailer-daemon rdist nobody daemon pop

#
# trash top-level domains -- don't use $[...$] on names ending with these
#
CTUUCP USENET UMC DNET

############################################################
#
# General configuration information
#
############################################################

# Version Number
DV1.1.8.2/13Nov95-0721PM

##########################
### Special macros ###
##########################

# my name
DnMAILER-DAEMON
# UNIX header format
DlFrom $g $d
# delimiter (operator) characters
Do.:%_at_!^=/[]
# format of a total name
Dq$?x$x $.<$g>
# SMTP login message
De$j Sendmail $v ($V) $b

###################
### Options ###
###################

# wait 5 minutes for newaliases to complete
Oa
# location of alias file
OA/var/adm/sendmail/aliases
# default delivery mode (deliver in background)
Odbackground
# temporary file mode
OF0600
# default UID
Ou1
# default GID
Og1
# location of help file
OH/usr/share/lib/sendmail.hf
# log level
OL9
# include sender if she's on an alias to which she's sending
Om
# queue directory
OQ/var/spool/mqueue
# read timeout -- violates protocols
Or1h
# status file
OS/var/adm/sendmail/sendmail.st
# queue up everything before starting transmission
Os
# use separate envelope/header rewriting rulesets (IDA)
O/
# default timeout interval
OT3d
# load average for forcing "Odq" behaviour
Ox20
# load average for refusing connections
OX12

###############################
### Message precedences ###
###############################

Pfirst-class=0
Pspecial-delivery=100
Pjunk=-100

#########################
### Trusted users ###
#########################

Troot daemon uucp news

#############################
### Format of headers ###
#############################

H?P?Return-Path: <$g>
#HReceived: by $j; id $i; $b
HReceived: $?sfrom $s $.by $j; ($v/$V)
        id $i; $b
H?D?Resent-Date: $a
H?D?Date: $a
H?F?Resent-From: $q
H?F?From: $q
H?x?Full-Name: $x
HSubject:
H?M?Resent-Message-Id: <$t.$i_at_$j>
H?M?Message-Id: <$t.$i_at_$j>

###########################
### Rewriting rules ###
###########################

##
## S1/S2 (and S5/S6 in IDA) are called before the per-mailer S= and R= rwsets.
## for any address types which we export in native format (e.g., uucp !-form)
## rather than pseudodomain format (e.g., mail11 _at_node.decnet form), we need
## to undo the effects of S3/S7 here, so that the per-mailer rwsets will see
## them as "unqualified" and add the appropriate qualification to them. note
## that this is a deeply divisive issue; these so-called "mixed-mode" addresses
## (e.g., vixie!paul_at_decwrl.dec.com) have different interpretations depending
## on who you ask. since you're running our config file, you're getting our
## particular leanings. if you want it done some other way, do it yourself.
## (vix)

################################
# Sender Field Pre-rewriting #
################################
S1
R$+<_at_$-.UUCP> $2!$1 decapsulate UUCP

###################################
# Recipient Field Pre-rewriting #
###################################
S2
R$+<_at_$-.UUCP> $2!$1 decapsulate UUCP

###########################
# Name Canonicalization #
###########################
S3

# handle "from:<>" special case
R<> $_at__at_ turn into magic token

# route-addr's look canonical but aren't
R<_at_$+:$+>$* _at_$1:$2 unfocus <route-addr>

# already canonical?
R$*<_at_$+>$* $_at_$>7$1<_at_$2>$3 idempotency is good

# basic textual canonicalization -- note lack of RFC733 heuristic here
R$*<$+>$* $2 basic RFC822 parsing

# make sure <_at_a,_at_b,_at_c:user_at_d> syntax is easy to parse -- undone later
R_at_$+,$+ _at_$1:$2 change all "," to ":"
R_at_$+:$+ $_at_$>7<_at_$1>:$2 handle <route-addr>

# more miscellaneous cleanup
R$+:$*;$* $_at_$1:$2;$3 list syntax
R$+_at_$+ $:$1<_at_$2> focus on domain
R$+<$+_at_$+> $1$2<_at_$3> move gaze right
R$+_at_$+<_at_$+> $1%$2<_at_$3> a_at_b_at_c_at_d ->a%b%c_at_d


# things that are still in _at_-form are ready to eat
R$+<_at_$+> $_at_$>7$1<_at_$2> now canonical



# convert rightmost % to _at_ (ruleset 7 has the rest of the magic for this)
R$+%$+ $_at_$>7$1<_at_$2> user%host

# (ruleset 3 ends here. we don't exit through
# $>7 here as with the other exits from ruleset 3
# since we only exit through S7 when we make a
# change.)

##### special local conversions (exit path from S3)
S7
R$*<_at_$+%$+>$* $1%$2<_at_$3>$4 move _at_ right after
%
R$+<_at_POP>$* $_at_$1<_at_POP>$2 POP already OK
R$*<_at_$->$* $_at_$1<_at_$2.$N>$3 qualify hostnames

#################################
# Final Output Post-rewriting #
#################################
S4

R_at_ $_at_ handle <> error addr
R$*<$+>$* $1$2$3 defocus
R_at_$+:$+:$+ _at_$1,$2:$3 <route-addr> canonical
R_at_$+:$+ $_at_<_at_$1:$2> route-addr needs <>

#################################
# (IDA) header senders #
#################################
S5
R$+ $_at_$>1$1 same as envelope

#################################
# (IDA) header recipients #
#################################
S6
R$+ $_at_$>2$1 same as envelope

#################################
# Utility: strip local domain #
#################################

# this is neccessarily tricky. S0 needs to strip off the local host(s) and
# it may take several passes to do that (consider $-%$j%$j%$j or $U!$-_at_$j).
# this requires iterate-until-no-change, which is a semantic not directly
# provided by sendmail. sendmail does permit recursion, though, which we
# use. S0 calls S8, which calls itself whenever it makes a change, else falls
# out the bottom when it has nothing left to strip.
#
# S8 starts by calling S3 since on the subsequent recursive calls, a change
# will have been made and the canonicalizion will have been lost. we would
# like to use $>8$>3 but that doesn't work the way you'd expect. the cost
# here is that S3 gets called once at the top even though S3 was called before
# S0 so there's nothing for it to do. this is why S3 must be idempotent and
# also why S3's "no change needed" condition is so close to its top.

S8

R$+ $:$>3$1 needed for recursions

R$*<_at_$j>$* $:$1<_at_>$2 _at_myfqdm
R$*<_at_$=w>$* $:$1<_at_>$3 _at_my alias
R$*<_at_$=w.$N>$* $:$1<_at_>$3 _at_my alias

# next two lines only gen'd if have aliases for all and $N isn't LOCAL
R$*<_at_$N>$* $:$1<_at_>$2 _at_mydomain
R$*<_at_$=d.$P>$* $:$1<_at_>$3 _at_codomain




# here's where we recurse if a change was made
R<_at_>:$* $_at_$>8$1 localhost/route-addr
R$*<_at_>$* $_at_$>8$1$2 localhost

########################################
# Utility: canonicalize local domain #
########################################

S9

# (next four lines are only generated if $N isn't LOCAL)
R$*<_at_$->$* $:$1<_at_$2.$N>$3 qualify
R$*<_at_$+.$=T>$* $_at_$1<_at_$2.$3>$4 trash pseudodom, lv
aln
R$*<_at_$+.$=T.$P>$* $_at_$1<_at_$2.$3.$P>$4 qualified trash, lv aln
R$*<_at_$+>$* $:$1<_at_$[$2$]>$3 canon'ize complex names

############################################################
############################################################
#####
##### RULESET 0
#####
############################################################
############################################################

S0

# special cases
#
R_at_ $#local $:$n handle <> form
R$*<_at_[$+]>$* $#smtp $_at_[$2] $:$1<_at_[$2]>$3 numeric internet spec

# localize if possible (rip off _at_DOMAINs for which we are authoritative)
#
R$*<_at_$+>$* $:$>8$1<_at_$2>$3

# Fake hosts in my domain
#
R$+<_at_POP> $#pop $_at_$j $:$1 username_at_POP

# Real hosts in my domain
#
R$*<_at_$*$N>$* $#smtpl $_at_$2$N $:$1<_at_$2$N>$3 our domain; no gw

# Parent domain
#
R$*<_at_$*$P>$* $#smtp $_at_china-motion.com $:$1<_at_$2$P>$3 our domain; gw

# Nonlocal mail
#
R$*<_at_$+>$* $#smtpr $_at_china-motion.com $:$1<_at_$2>$3 use gateway

# Local mail
#

R$+ $#local $:$1 must be local

############################################################
############################################################
#####
##### Local, POP and Program mailers
#####
############################################################
############################################################

Mlocal, P=/bin/mail, F=lsDFMmn, S=10, R=20, A=mail -r $f -d $u
Mprog, P=/bin/sh, F=lsDFM, S=10, R=20, A=sh -c $u
Mpop, P=/usr/lib/mh/spop, F=nsmFDM, S=10, R=20, A=pop $u

S10
R_at_ $n errors to mailer-daemon

S20

############################################################
############################################################
#####
##### SMTP to hosts inside the local domain
#####
############################################################
############################################################

Msmtpl, P=[IPC], F=mDFMuX, S=11, R=21, A=IPC $h, E=\r\n

# (we pull off the local hostname in all cases, and then selectively add it
# back on. we would add it back if the aliases aren't shared across all
# hosts in this domain, or if the user is root or one of the others that
# we want to know the hostname for.)
#
S11
R$*<_at_$j>$* $>3$1$2 strip local host name
R$*<_at_$+>$* $:$>9$1<_at_$2>$3 canonicalize domain
# (next two lines are only present if aliases aren't shared across localdom)
R$*<_at_$+>$* $_at_$1<_at_$2>$3 already has an _at_domain
R$+ $_at_$1<_at_$j> add our hostname

# (by running S11 on recipients, we get the above behaviour on To: and Cc:
# headers, as well as for the envelope recipient. this is good since we
# always call $#smtpl with hostname attached, which means that we won't be
# down here at all if $j is in the address (that would have been stripped
# in S0), and we will therefore qualify any domain-less addresses with our
# own hostname before sending them to other hosts in our domain. this is
# all ugly but it's what you have to do if your aliases aren't shared. --vix)
#
S21
R$+ $_at_$>11$1 nothing special here

############################################################
############################################################
#####
##### SMTP to hosts outside the local domain
#####
############################################################
############################################################

Msmtp, P=[IPC], F=mDFMuXL, S=12, R=22, A=IPC $h, E=\r\n

S12
R<_at_$+>$* $_at_<_at_$1>$2 <route-addr> syntax
R$*<_at_[$+]>$* $_at_$1<_at_[$2]>$3 numeric, lv alone
R$*<_at_$+>$* $_at_$>9$1<_at_$2>$3 canonicalize domain
R$=N $_at_$1<_at_$j> Add $j to local
R$- $:$1??$(_at_ $1 $: $) Look up aliases
R$-??$+ $_at_$1<_at_$j> Found it - reformat
R$-?? $:$1 undo dammage
R$+ $_at_$1<_at_$W> fix up return addr

S22
R$+ $_at_$>12$1 nothing special here

############################################################
############################################################
#####
##### SMTP to relay host
#####
############################################################
############################################################

Msmtpr, P=[IPC], F=mDFMuX, S=13, R=23, A=IPC $h, E=\r\n

# (we pull off the local hostname in all cases, and then selectively add it
# back on. we would add it back if the user is root or one of the others
# for which we want to know the hostname. Otherwise we want to look like we
# are a local user on the relay machine. This is to allow for "cleaner"
# addresses when crossing mail domains. --FMA)
#
S13
R$*<_at_$j>$* $>3$1$2 strip local host name
R$*<_at_$+>$* $:$>9$1<_at_$2>$3 canonicalize domain
R$=N $_at_$1<_at_$j> qualify nonhidden users
R$- $:$1??$(_at_ $1 $: $) Look up aliases
R$-??$+ $_at_$1<_at_$j> Found it - reformat
R$-?? $:$1 undo dammage

S23
R$+ $_at_$>13$1 nothing special here

root:/var/adm/sendmail>



        - end -
Received on Tue Nov 14 1995 - 10:21:08 NZDT

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:46 NZDT