From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96075325006611.tru64-unix-managers.marc@archive.invalid> From: Dicky Shum Date: Tue, 14 Nov 1995 06:33:58 +0000 To: tru64-unix-managers Subject: sendmail error: "Local configuration error, hostname not X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96075325006611 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@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 ... 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@mail.china-motion.com> X-Sender: dicky@mail.china-motion.com (Unverified) X-Mailer: Windows Eudora Light Version 1.5.2 Mime-Version: 1.0 Content-Type: text/plain; charset=3D"us-ascii" To: dickys@hk.super.net From: Dicky Shum 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 # # @(#)$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 ############################################################ @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) ## ############################################################= @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 @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=7F # 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.:%@!^=3D/[] # 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=3D0 Pspecial-delivery=3D100 Pjunk=3D-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@$j> H?M?Message-Id: <$t.$i@$j> ########################### ### Rewriting rules ### ########################### ## ## S1/S2 (and S5/S6 in IDA) are called before the per-mailer S=3D and R=3D= rwsets. ## for any address types which we export in native format (e.g., uucp= !-form) ## rather than pseudodomain format (e.g., mail11 @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@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$+<@$-.UUCP> $2!$1 decapsulate UUCP ################################### # Recipient Field Pre-rewriting # ################################### S2 R$+<@$-.UUCP> $2!$1 decapsulate UUCP ########################### # Name Canonicalization # ###########################=7F S3 # handle "from:<>" special case R<> $@@ turn into magic token # route-addr's look canonical but aren't R<@$+:$+>$* @$1:$2 unfocus # already canonical? R$*<@$+>$* $@$>7$1<@$2>$3 idempotency is good # basic textual canonicalization -- note lack of RFC733 heuristic here R$*<$+>$* $2 basic RFC822 parsing # make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later R@$+,$+ @$1:$2 change all "," to ":" R@$+:$+ $@$>7<@$1>:$2 handle # more miscellaneous cleanup R$+:$*;$* $@$1:$2;$3 list syntax R$+@$+ $:$1<@$2> focus on domain R$+<$+@$+> $1$2<@$3> move gaze right R$+@$+<@$+> $1%$2<@$3> a@b@c@d ->a%b%c@d # things that are still in @-form are ready to eat R$+<@$+> $@$>7$1<@$2> now canonical # convert rightmost % to @ (ruleset 7 has the rest of the magic for this) R$+%$+ $@$>7$1<@$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$*<@$+%$+>$* $1%$2<@$3>$4 move @ right after % R$+<@POP>$* $@$1<@POP>$2 POP already OK R$*<@$->$* $@$1<@$2.$N>$3 qualify hostnames ################################# # Final Output Post-rewriting # ################################# S4 R@ $@ handle <> error addr R$*<$+>$* $1$2$3 defocus R@$+:$+:$+ @$1,$2:$3 canonical R@$+:$+ $@<@$1:$2> route-addr needs <> ################################# # (IDA) header senders # ################################# S5 R$+ $@$>1$1 same as envelope ################################# # (IDA) header recipients # ################################# S6 R$+ $@$>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!$-@$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$*<@$j>$* $:$1<@>$2 @myfqdm R$*<@$=3Dw>$* $:$1<@>$3 @my alias R$*<@$=3Dw.$N>$* $:$1<@>$3 @my alias # next two lines only gen'd if have aliases for all and $N isn't LOCAL R$*<@$N>$* $:$1<@>$2 @mydomain R$*<@$=3Dd.$P>$* $:$1<@>$3 @codomain # here's where we recurse if a change was made R<@>:$* $@$>8$1 localhost/route-addr R$*<@>$* $@$>8$1$2 localhost ######################################## # Utility: canonicalize local domain # ######################################## S9 # (next four lines are only generated if $N isn't LOCAL) R$*<@$->$* $:$1<@$2.$N>$3 qualify R$*<@$+.$=3DT>$* $@$1<@$2.$3>$4 trash pseudodom, lv aln R$*<@$+.$=3DT.$P>$* $@$1<@$2.$3.$P>$4 qualified trash, lv aln R$*<@$+>$* $:$1<@$[$2$]>$3 canon'ize complex names ############################################################ ############################################################ ##### ##### RULESET 0 ##### ############################################################ ############################################################ S0 # special cases # R@ $#local $:$n handle <> form R$*<@[$+]>$* $#smtp $@[$2] $:$1<@[$2]>$3 numeric internet spec # localize if possible (rip off @DOMAINs for which we are authoritative) # R$*<@$+>$* $:$>8$1<@$2>$3 # Fake hosts in my domain # R$+<@POP> $#pop $@$j $:$1 username@POP # Real hosts in my domain # R$*<@$*$N>$* $#smtpl $@$2$N $:$1<@$2$N>$3 our domain; no gw # Parent domain # R$*<@$*$P>$* $#smtp $@china-motion.com $:$1<@$2$P>$3 our domain; gw # Nonlocal mail # R$*<@$+>$* $#smtpr $@china-motion.com $:$1<@$2>$3 use gateway # Local mail # R$+ $#local $:$1 must be local ############################################################ ############################################################ ##### ##### Local, POP and Program mailers ##### ############################################################ ############################################################ Mlocal, P=3D/bin/mail, F=3DlsDFMmn, S=3D10, R=3D20, A=3Dmail -r $f -d $u Mprog, P=3D/bin/sh, F=3DlsDFM, S=3D10, R=3D20, A=3Dsh -c $u Mpop, P=3D/usr/lib/mh/spop, F=3DnsmFDM, S=3D10, R=3D20, A=3Dpop $u S10 R@ $n errors to mailer-daemon S20 ############################################################ ############################################################ ##### ##### SMTP to hosts inside the local domain ##### ############################################################ ############################################################ Msmtpl, P=3D[IPC], F=3DmDFMuX, S=3D11, R=3D21, A=3DIPC $h, E=3D\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$*<@$j>$* $>3$1$2 strip local host name R$*<@$+>$* $:$>9$1<@$2>$3 canonicalize domain # (next two lines are only present if aliases aren't shared across localdom) R$*<@$+>$* $@$1<@$2>$3 already has an @domain R$+ $@$1<@$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$+ $@$>11$1 nothing special here ############################################################ ############################################################ ##### ##### SMTP to hosts outside the local domain ##### ############################################################ ############################################################ Msmtp, P=3D[IPC], F=3DmDFMuXL, S=3D12, R=3D22, A=3DIPC $h, E=3D\r\n S12 R<@$+>$* $@<@$1>$2 syntax R$*<@[$+]>$* $@$1<@[$2]>$3 numeric, lv alone R$*<@$+>$* $@$>9$1<@$2>$3 canonicalize domain R$=3DN $@$1<@$j> Add $j to local R$- $:$1??$(@ $1 $: $) Look up aliases R$-??$+ $@$1<@$j> Found it - reformat R$-?? $:$1 undo dammage R$+ $@$1<@$W> fix up return addr S22 R$+ $@$>12$1 nothing special here ############################################################ ############################################################ ##### ##### SMTP to relay host ##### ############################################################ ############################################################ Msmtpr, P=3D[IPC], F=3DmDFMuX, S=3D13, R=3D23, A=3DIPC $h, E=3D\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$*<@$j>$* $>3$1$2 strip local host name R$*<@$+>$* $:$>9$1<@$2>$3 canonicalize domain R$=3DN $@$1<@$j> qualify nonhidden users R$- $:$1??$(@ $1 $: $) Look up aliases R$-??$+ $@$1<@$j> Found it - reformat R$-?? $:$1 undo dammage S23 R$+ $@$>13$1 nothing special here root:/var/adm/sendmail> - end -