From owner-freebsd-questions@FreeBSD.ORG Tue Dec 6 18:11:53 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6228416A41F for ; Tue, 6 Dec 2005 18:11:53 +0000 (GMT) (envelope-from chowse@charter.net) Received: from mxsf02.cluster1.charter.net (mxsf02.cluster1.charter.net [209.225.28.202]) by mx1.FreeBSD.org (Postfix) with ESMTP id 64F9A43D62 for ; Tue, 6 Dec 2005 18:11:52 +0000 (GMT) (envelope-from chowse@charter.net) Received: from mxip07a.cluster1.charter.net (mxip07a.cluster1.charter.net [209.225.28.137]) by mxsf02.cluster1.charter.net (8.12.11/8.12.11) with ESMTP id jB6IBmWV024487 for ; Tue, 6 Dec 2005 13:11:49 -0500 Received: from 24-176-115-13.dhcp.jcsn.tn.charter.com (HELO [192.168.254.3]) ([24.176.115.13]) by mxip07a.cluster1.charter.net with ESMTP; 06 Dec 2005 13:11:48 -0500 X-IronPort-AV: i="3.99,222,1131339600"; d="scan'208"; a="1692467075:sNHT21935770" User-Agent: Microsoft-Entourage/11.2.1.051004 Date: Tue, 06 Dec 2005 12:11:45 -0600 From: Charles Howse To: Giorgos Keramidas Message-ID: Thread-Topic: sendmail local-host-names Thread-Index: AcX6kIQxwr7Y+maDEdqPFwARJH5tYg== In-Reply-To: <20051206175212.GA15873@flame.pc> Mime-version: 1.0 Content-type: text/plain; charset="US-ASCII" Content-transfer-encoding: 7bit Cc: questions Subject: Re: sendmail local-host-names X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 06 Dec 2005 18:11:53 -0000 > On 2005-12-06 10:54, Charles Howse wrote: >> Giorgos Keramidas wrote: >>> On 2005-12-06 10:35, Charles Howse wrote: >>>> The hostname of my FreeBSD box is: >>>> moe.local >>>> >>>> User charles has an account, has been added to the qpopper authentication >>>> database, and sendmail_enable="NO" is in /etc/rc.conf. >>>> >>>> In /etc/mail/local-host-names, I have: >>>> moe.local >>>> larry.local >>>> local >>>> >>>> It's working, but I think I have too many entries in local-host-names. >>>> What entries are necessary? >>> >>> If your local hostnames are listed as names of one of the local IP >>> addresses in your /etc/hosts, then none is needed. Sendmail will >>> discover the local addresses on its own. >> >> Not quite sure I understand. >> Here is /etc/hosts from FreeBSD: >> >> [charles@moe:~]$ cat /etc/hosts >> ::1 localhost.local localhost >> 127.0.0.1 localhost.local localhost >> 192.168.254.4 moe.local moe >> 192.168.254.4 moe.local. >> 192.168.254.3 larry >> 192.168.254.3 larry.local >> >> Are you saying that since I have larry.local in /etc/hosts, then I don't >> need anything at all in local-host-names? > > Exactly. You can see the list of host names which Sendmail considers > local by running sendmail in "test mode" and expanding the $=w macro to > see what hostnames it has already "discovered" as local: > > $ echo '$=w' | sendmail -bt > > This will print a list of hostnames much like the one shown below: > > flame:/home/keramida$ echo '$=w' | sendmail -bt > ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) > Enter
>> > [IPv6:::1] > ftp.pc > [IPv6:fe80::1] > irc.pc > flame.pc > www.pc > mail.pc > localhost.localdomain > localhost > flame > [127.0.0.1] > ns.pc > localhost.pc > [IPv6:fe80::211:95ff:feca:e5e8] > flame.localdomain > freebsd.pc >> > flame:/home/keramida$ > > If a hostname is listed in the $=w class, then Sendmail has already > discovered it as "local" and you don't need to add it to > /etc/mail/local-host-names. > >> For clarity, I'm doing local mail only, no Internet mail. > > It shouldn't make a big difference, in this case. Well, OK then! In the past, I was just *certain* I had to had something in local-host-names. Oh, well. :-) [charles@moe:~]$ echo '$=w' | sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter
[IPv6:::1] moe [192.168.254.4] [IPv6:fe80::1] [IPv6:fe80::2a0:ccff:fe29:689d] moe.local localhost.local localhost larry.local [localhost.local] local [127.0.0.1] [root@moe:~]# rm /etc/mail/local-host-names [root@moe:~]# killall -HUP sendmail [root@moe:~]# echo '$=w' | sendmail -bt ADDRESS TEST MODE (ruleset 3 NOT automatically invoked) Enter
[IPv6:::1] moe [192.168.254.4] [IPv6:fe80::1] [IPv6:fe80::2a0:ccff:fe29:689d] moe.local localhost.local localhost [localhost.local] [127.0.0.1] [root@moe:~]# mail charles Subject: test44 hello . EOT [root@moe:~]# mail -u charles Mail version 8.1 6/6/93. Type ? for help. "/var/mail/charles": 1 message 1 new >N 1 charles@moe.local Tue Dec 6 12:06 18/636 "test44" & q "/var/mail/charles" complete