From owner-FreeBSD-users-jp@jp.freebsd.org  Thu Oct  2 10:22:03 1997
Received: by jaz.jp.freebsd.org (8.8.7+2.7Wbeta7/8.7.3) id KAA04274
	Thu, 2 Oct 1997 10:22:03 +0900 (JST)
Received: by jaz.jp.freebsd.org (8.8.7+2.7Wbeta7/8.7.3) with ESMTP id KAA04201
	for <FreeBSD-users-jp@jp.freebsd.org>; Thu, 2 Oct 1997 10:21:57 +0900 (JST)
Received: from interlink.or.jp (ppp0084.tokyo2.max.interlink.or.jp [203.141.130.85]) by po.interlink.or.jp (8.8.5/3.4W2) with ESMTP id KAA10074 for <FreeBSD-users-jp@jp.freebsd.org>; Thu, 2 Oct 1997 10:21:57 +0900 (JST)
Message-Id: <199710020121.BAA00224@interlink.or.jp>
To: FreeBSD-users-jp@jp.freebsd.org
Cc: seiken@interlink.or.jp
X-Mailer: Mew version 1.70 on Emacs 19.28.1 / Mule 2.3
Mime-Version: 1.0
Content-Type: Multipart/Mixed;
	boundary="--Next_Part(Thu_Oct__2_10:20:16_1997)--"
Content-Transfer-Encoding: 7bit
Date: Thu, 02 Oct 1997 10:21:07 +0900
From: Masanori Kiriake <seiken@interlink.or.jp>
Reply-To: FreeBSD-users-jp@jp.freebsd.org
Precedence: bulk
X-Distribute: distribute [version 2.1 (Alpha) patchlevel=20]
X-Sequence: FreeBSD-users-jp 18784
Subject: [FreeBSD-users-jp 18784] sendmail.cf =?ISO-2022-JP?B?GyRCJE5AX0RqJEskRCQkJEYbKEI=?=
Errors-To: owner-FreeBSD-users-jp@jp.freebsd.org
Sender: owner-FreeBSD-users-jp@jp.freebsd.org

----Next_Part(Thu_Oct__2_10:20:16_1997)--
Content-Type: Text/Plain; charset=iso-2022-jp
Content-Transfer-Encoding: 7bit

$B!!@ZL@$G$9!#(B sendmail $B$N@_Dj$N$3$H$G!"$_$J$5$^$KCR7C$rB_$7$F$$$?$@$-$?$/(B
$B%a!<%k$$$?$7$^$7$?!#(B

$B!!8=:_!"2q<R$H<+Bp$G(B FreeBSD $B$r;H$C$F$$$^$9!#$I$A$i$b(B 2.2.2-RELEASE $B$G!"(B
PC/AT $B$H(B PC-98 $B$G$9!#!!%a!<%i!<$O(B Mew Ver. 1.70 $B$G$9!#%$%s%?!<%M%C%H$X$O(B
$B<+Bp$b2q<R$b%@%$%"%k%"%C%W$G@\B3$7$F$$$^$9!#(B

$B!!;d$,;d08$K%a!<%k$rAw$k$H!"%W%m%P%$%@$r7PM3$;$:$KFO$-$^$9!#;d$,F1$8%I%a(B
$B%$%s$N?M!JF1$8%W%m%P%$%@$K$$$k?M!K$K%a!<%k$r=P$=$&$H$9$k$H!"!V$=$s$J?M$O(B
$B$$$J$$!W$HE\$i$l$F$7$^$$$^$9!#(B

$B!!$=$3$G!"$I$s$J>l9g$G$b%a!<%k$r%W%m%P%$%@$KEj$2$F$/$l$k$h$&$J@_DjJ}K!$O(B
$B$J$$$b$N$+$H;W$C$F$$$k$H$3$m$G$9!#(B

$B!!;29M$^$G$K(B sendmail.cf $B$rE:IU$7$?$$$H;W$$$^$9!#$J$K$+$h$$@_Dj$O$"$j$^(B
$B$9$G$7$g$&$+!#(B

$B!!$h$m$7$/$*4j$$$7$^$9!#(B


----Next_Part(Thu_Oct__2_10:20:16_1997)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

#
# Copyright (c) 1983 Eric P. Allman
# Copyright (c) 1988, 1993
#	The Regents of the University of California.  All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
# 1. Redistributions of source code must retain the above copyright
#    notice, this list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright
#    notice, this list of conditions and the following disclaimer in the
#    documentation and/or other materials provided with the distribution.
# 3. All advertising materials mentioning features or use of this software
#    must display the following acknowledgement:
#	This product includes software developed by the University of
#	California, Berkeley and its contributors.
# 4. Neither the name of the University nor the names of its contributors
#    may be used to endorse or promote products derived from this software
#    without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
# SUCH DAMAGE.
#
# @(#)proto.v5	3.69 (motonori/WIDE) 21 Apr 1997
# @(#)version.v5	3.5 (motonori/WIDE) 20 May 1996
# tms
# @(#)ostype	3.4 (motonori/WIDE) 26 Feb 1994
# @(#)bsd4.4	3.4 (motonori/WIDE) 25 Jan 1994
# @(#)general	3.14 (motonori/WIDE) 21 Apr 1997
# @(#)address	3.12 (motonori/WIDE) 19 Apr 1997
# @(#)canon	3.15 (motonori/WIDE) 08 Jun 1996
# @(#)mailer.v5	3.15 (motonori/WIDE) 11 Mar 1997
# @(#)numeric	3.7 (motonori/WIDE) 20 Sep 1994
# @(#)indirect	3.19 (motonori/WIDE) 05 Aug 1996
# @(#)error	3.16 (motonori/WIDE) 17 Sep 1996
# @(#)option.v5	3.24 (motonori/WIDE) 02 Feb 1997

############################################################################
############################################################################
#####
#####		SENDMAIL CONFIGURATION FILE
#####			for R8 sendmail
#####
##### built by root on tms.interlink.or.jp
#####       in /root/CF-3.5Wpl7
#####       with sendmail.def
#####       at Mon Jul  7 12:38:45 JST 1997
#####
############################################################################
############################################################################

# class/macro characters allocation information
#  macro X: MX sendmail flag (define "." if true) [allocchar]
#  class X: fake domain list and special terminators [allocchar]
#  macro Z: CF version [version.v5]
#  pair S: from address/local users [address]
#  macro R: default gateway [indirect]

# level 5 config file format
V5

#########################
#   Local Information   #
#########################

# local domain name (defined automatically)
Dminterlink.or.jp

# local host name without domain (defined automatically)
Dwtms

# my official SMTP hostname (defined automatically)
Dj$m

# my internet aliases
#Fw/etc/sendmail.cw
#Cw myaliasnames
Cw localhost local


# users who require host.domain
CS root daemon news usenet postmaster MAILER-DAEMON


# default from-address (can be $j, $m or another generic address)
DS$m


# default relay host
DRsmtp:po.interlink.or.jp

# operators that cannot be in local usernames (i.e., network indicators)
C@ @ % !

# dequoting map
Kdequote dequote

#############################
###   Setup Information   ###
#############################

######################
#   General Macros   #
######################


# need trailing dot for MX lookup
DX.

###############
#   Classes   #
###############

# Internal ("fake") domains that we use in rewriting
CX UUCP
# and special terminators
CX ] .

######################
#   Version Number   #
######################

DZ3.5Wpl7

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

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

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

# strip message body to 7 bits on input?
O7False
# location of alias file
OA/etc/aliases
# wait (in minutes) for alias file rebuild
Oa10
# substitution for space (blank) characters
OB.
# minimum number of free blocks on filesystem
Ob4
# checkpoint queue runs after every N successful deliveries
OC10
# avoid connecting to "expensive" mailers on initial submission?
OcFalse
# automatically rebuild the alias database?
ODFalse
# default delivery mode
Odqueue
# error message header/file
#OE/etc/sendmail.oE
# error mode
#Oep
# temporary file mode
OF0600
# save Unix-style "From_" lines at top of header?
OfFalse
# match recipients against GCOS field?
OGFalse
# default GID
Og1
# location of help file
OH/usr/share/misc/sendmail.hf
# maximum hop count
Oh20
# Insist that the BIND name server be running to resolve names
OI
# ignore dots as terminators in incoming messages?
OiFalse
# Forward file search path
#OJ/var/forward/$u:$z/.forward.$w:$z/.forward
# deliver MIME-encapsulated error messages?
OjTrue
# open connection cache timeout
OK5m
# open connection cache size
Ok2
# log level
OL9
# use Errors-To: header?
OlFalse
# send to me too, even in an alias expansion?
OmTrue
# verify RHS in newaliases?
OnTrue
# SMTP daemon options
#OOPort=esmtp
# default messages to old style headers if no special punctuation?
OoTrue
# who (if anyone) should get extra copies of error messages
#OPpostmaster
# privacy flags
Opauthwarnings
# queue directory
OQ/var/spool/mqueue
# slope of queue-only function
#Oq600000
# do not strip route address of error receiver
#ORFalse
# read timeout -- now OK per RFC 1123 section 5.3.2
#Ordatablock=10m
# status file
OS/var/log/sendmail.st
# queue up everything before forking?
OsTrue
# default message timeout interval
OT7d
# time zone handling:
#  if undefined, use system default
#  if defined but null, use TZ envariable passed in
#  if defined and non-null, use that info
Ot+0900
# list of locations of user database file (null means no lookup)
OU
# default UID
Ou1
# fallback MX host
#OVfall.back.host.net
# if we are the best MX host for a site, try it directly instead of config err
OwFalse
# load average at which we refuse connections
OX12
# load average at which we just queue messages
Ox8
# deliver each queued job in a separate process?
OYFalse
# work recipient factor
#Oy30000
# work time factor
#OZ90000
# work class factor
#Oz1800


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

Pfirst-class=0
Pspecial-delivery=100
Plist=-30
Pbulk=-60
Pjunk=-100

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

Troot daemon uucp

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

#H?P?Return-Path: $g
#HReceived: $?sfrom $s $.$?_($?s$|from $.$_) $.by $j ($v/$Z)$?r with $r$. id $i$?u for $u$.; $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:
# HPosted-Date: $a
# H?l?Received-Date: $b
H?M?Resent-Message-Id: <$t.$i@$j>
H?M?Message-Id: <$t.$i@$j>


######################################################################
######################################################################
#####
#####			REWRITING RULES
#####
######################################################################
######################################################################

################################################
###  Rulset 1 -- Sender Field Pre-rewriting  ###
################################################
S1

###################################################
###  Rulset 2 -- Recipient Field Pre-rewriting  ###
###################################################
S2

###########################################
###  Rulset 3 -- Name Canonicalization  ###
###########################################
S3

# handle null input and list syntax (translate to <@> special case)
R$@			$@<@>

# strip group: syntax (not inside angle brackets!) and trailing semicolon
R$*			$:$1<@>				mark addresses
R$*<$*>$*<@>		$:$1<$2>$3			unmark <addr>
R:include:$*<@>		$::include:$1			unmark :include:
R$*[$*:$*]<@>		$:$1[$2:$3]			unmark IPv6 addrs
R$*::$*<@>		$:$1::$2			unmark host::addr
R$*:;<@>		$:$1:;				unmark list:;
R$*:<@>			$:$1:				unmark something: (bad)
R$*:$*;<@>		$:$2				strip group:; if marked
R@$*:$*<@>		$:@$1:$2			unmark @route:addr
R$*:$*<@>		$:$2				strip group: if marked
R$*;<@>			$:$1				strip semi if marked
R$*<@>			$:$1				unmark

# basic textual canonicalization -- note RFC733 heuristic here
R$*<$*>$*<$*>$*		$2$3<$4>$5			strip multiple <> <>
R$*<$*<$*<$+>$*>$*>$*	$4				3-level <> nesting
R$*<$*<$+>$*>$*		$3				2-level <> nesting
R$*<>$*			$@<@>				MAIL FROM: <> case
R$*<$+>$*		$2				basic RFC821/822 parsing


# make sure <@a,@b,@c:user@d> syntax is easy to parse -- undone later
R@$+,$+			@$1:$2				change all "," to ":"

# localize and dispose of route-based addresses
R@$+:$+			$@$>96 <@$1>:$2			handle <route-addr>

# find focus for list syntax
R$+:$*;@$+		$@$1:$2;<@$3>			list syntax
R$+:$*;			$@$1:$2;<@>			list syntax

# find focus for @ syntax addresses
R$+@$+			$:$1<@$2>			focus on domain
R$+<$+@$+>		$1$2<@$3>			move gaze right
R$+<@$+>		$@$>96 $1<@$2>			already canonical

# convert old-style addresses to a domain-based address
R$-!$+			$@$>96 $2<@$1.UUCP>		resolve uucp names
R$+.$-!$+		$@$>96 $3<@$1.$2>		domain uucps
R$+.!$+			$@$>96 $2<@$1>			extended domain uucps
R$*!$*			$@$>96 $2<@$1.UUCP>		uucp subdomains

# if we have % signs, take the rightmost one
R$+%$+			$1@$2				First make them all @s.
R$+@$+@$+		$1%$2@$3			Undo all but the last.
R$+@$+			$@$>96 $1<@$2>			Insert < > and finish

# trap invalid address
R@$*			$@<@$1>

################################################
###  Ruleset 96 -- bottom half of ruleset 3  ###
################################################

#  At this point, everything should be in a "local_part<@domain>extra" format.
S96

# strip trailing dot off
R$*<@$+.>$*		$1<@$2>$3

# resolve numeric addresses to name if possible
R$*<@[$+]>$*		$:$1<@$[[$2]$]>$3
R$*<@$+.>$*		$1<@$2>$3			strip trailing dot off

R$*<@$=w.UUCP>$*	$:$1<@$j>$3
R$*<@$=w.$m>$*		$:$1<@$j>$3
R$*<@$=w>$*		$:$1<@$j>$3

# exit immidiately, if fake domains or numeric address spec
R$*<@$*.$=X>$*		$@$1<@$2.$3>$4

# official name is OK
R$*<@$j>$*		$@$1<@$j>$2
# more than one token is OK
R$*<@$-.$+>$*		$@$1<@$2.$3>$4
# canonicalize with nameserver lookup
R$*<@$*>$*		$:$1<@$[$2$]>$3
# strip trailing dot off possibly canonical name
R$*<@$+.>$*		$1<@$2>$3

##################################################
###  Ruleset 4 -- Final Output Post-rewriting  ###
##################################################
S4

R<>			$@<>				handle <> for uucp
R<@>			$@<>				catch invalid address
R$*<@>			$@$1				handle <> and list:;

# strip trailing dot off possibly canonical name
R$*<@$+.>$*		$1<@$2>$3

# externalize local domain info
R$*<$+>$*		$1$2$3				defocus
R@$+:@$+:$+		@$1,@$2:$3			<route-addr> canonical
R@$*			$@@$1				... and exit

# UUCP must always be presented in old form
R$+@$+.UUCP		$2!$1				u@h.UUCP => h!u

# delete duplicate local names
R$+%$=w@$j		$1@$j				u%host@host => u@host

############################################################
###  Ruleset 97 -- recanonicalize and call ruleset zero  ###
###		   (used for recursive calls)		 ###
############################################################

S97

R$*<$-.$+>$*		$:$1$2.$3$4			defocus
R$*			$:$>3 $1			canonicalize
R$*			$:$>0 $1			and try again


####################################
###  Ruleset 0 -- Parse Address  ###
####################################

S0

R$*:;<@>		$#error$@USAGE$: 554 List:; syntax illegal for recipient addresses
R$*<@>			$#local$:<@>			special case error msgs
R<@$+>			$#error$@USAGE$: 554 User address required
R$*<$*:$*>$*		$#error$@USAGE$: 554 Colon illegal in host name part
R$*<@.$*>$*		$#error$@USAGE$: 554 Illegal address spec
R$*<@$*[$*>$*		$:<[]>$1<@$2[$3>$4		mark if with [
R<[]>$*<@$*[$*]$*>$*	$:$1<@$2[$3]$4>$5		unmark if with [ ]
R$*<@$*]$*>$*		$:<[]>$1<@$2]$3>$4		mark if with ]
R<[]>$*<@$*[$*]$*>$*	$:$1<@$2[$3]$4>$5		unmark if with [ ]
R<[]>$*<@$*>$*		$#error$@USAGE$: 554 Unballanced [ ]


# handle numeric address spec
R$*<@[$+]>$*		$:$>88 <smtp:[$2]>.$1<@[$2]>$3	numeric internet spec

# now delete the local info
R$*<@>$*		$@$>97 $1			user@ => user

R<@$j>:$*		$@$>97 $1			@here:... -> ...
R$*<@$j>		$@$>97 $1			...@here -> ...

# send SMTP traffic to relay host
R$*<@$*>$*		$:$>88 <$R>.$1<@$2>$3

# if this is quoted, strip the quotes and try again
R$+			$:$(dequote $1 $)		strip quotes
R$+$=@$+		$@$>97 $1$2$3			try again

# remaining names must be local
R$*			$#local$:$1			regular names

#########################################################################
###  Ruleset 5 -- special rewriting after aliases have been expanded  ###
#########################################################################

S5


##############################################
###  Ruleset 88 -- dispatching to mailers  ###
##############################################

S88

R<>.$*			$@$1				strip off null relay
R<$-:>.$*		$@$2				strip off null relay
R<error:deliver>.$*<@$*>$*	$#error$@UNAVAILABLE$: 554 can not deliver to $2
R<error:lower>.$*<@$-.$*>$*	$#error$@NOHOST$: 554 never heard of $2 in domain $3
R<error:$*>.$*			$#error$@UNAVAILABLE$: 554 $1
R<local>.<@$*>:$*	$@$>97 $2			local address, retry
R<local>.$*<@$*>	$@$>97 $1			local address, retry
R<local:$+>.$*		$@$>97 $1			special case local
R<$=w>.$*<$*>$*		$@$>97 $2$3$4			delete local host
R<$-:$=w>.$*<$*>$*	$@$>97 $3$4$5			delete local host
R<smtp-ignmx>.$*<@$*>$*	$:<smtp:[$2]>.$1<@$2>$3		deliver w/o MX lookup
R<smtp-ignmx:$*>.$*	$:<smtp:[$1]>.$2		deliver w/o MX lookup
R<smtp-mx>.$*<@$*>$*	$:<smtp:$2>.$1<@$2>$3		deliver with MX lookup
R<smtp-mx:$*>.$*<@$*>$*	$:<smtp:$3$X:$1>.$2<@$3>$4	deliver with MX, static
R<$-:$+@$+>.$*		$:<$1:$3>.$2<@$3>		special case deliver
R<relay:$*$~X>.$*	$#relay$@$1$2$X$:$3		send to relay
R<smtp:$*$~X>.$*	$#smtp$@$1$2$X$:$3		send to destination
R<esmtp:$*$~X>.$*	$#esmtp$@$1$2$X$:$3		send to destination
R<$-:$+>.$*		$#$1$@$2$:$3			with specific mailer
R<$*$~X>.$*		$#smtp$@$1$2$X$:$3		multi-token: smtp
R<$+>.$*		$#smtp$@$1$:$2			multi-token: smtp


######################################################################
######################################################################
#####
#####			MAILER DEFINITIONS
#####
######################################################################
######################################################################


Mlocal,   P=/usr/libexec/mail.local,	F=lsDFMmrn,	S=10, R=20/21, A=mail -d $u
Mprog,    P=/bin/sh,	F=lsDFMeuP,	S=10, R=20/21, A=sh -c $u, D=$z:/

Msmtp,    P=[IPC],	F=mDFMuX,	S=11, R=21, A=IPC $h, E=\r\n, L=990
Mesmtp,   P=[IPC],	F=mDFMuXa,	S=11, R=21, A=IPC $h, E=\r\n, L=990
Mrelay,   P=[IPC],	F=mDFMuX,	S=11, R=29, A=IPC $h, E=\r\n, L=2040



##############################
#   Sender field rewriting   #
##############################

S10
R<@>			$n				errors to mailer-daemon

# append local address
R$*			$:$>11 $1

S11
R$*<@$*>$*		$@$1<@$2>$3			already qualified

# output local host as user@host.domain
R$=S			$@$1<@$j>			show exposed names
R$+			$@$1<@$S>			user w/o host



##################################
#   Receipient field rewriting   #
##################################

S20
R$+<@$*>		$:$1				strip host part

S21

R$+<@$+.UUCP>		$@$2!$1				user@host.UUCP
R$*<@$*>$*		$@$1<@$2>$3			already qualified

# output local host as user@host.domain
R$=S			$@$1<@$j>			show exposed names
R$+			$@$1<@$S>			user w/o host


----Next_Part(Thu_Oct__2_10:20:16_1997)----

----------
        Masanori Kiriake   $B@ZL@@/7{(B
        E-Mail : seiken@interlink.or.jp

        Powered by FreeBSD 2.2.2-RELEASE
----------
