home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.uv.es
/
2014.11.ftp.uv.es.tar
/
ftp.uv.es
/
pub
/
unix
/
sendmail_aix_conf.cf
< prev
next >
Wrap
Text File
|
1991-12-26
|
47KB
|
1,263 lines
# aix_sccsid[] = "com/cmd/send,3.1.1,9041311a AIX 10/5/90 17:57:00"
#
# COMPONENT_NAME: CMDSEND sendmail.cf
#
# FUNCTIONS:
#
# ORIGINS: 10 26 27
#
# (C) COPYRIGHT International Business Machines Corp. 1985, 1989
# All Rights Reserved
# Licensed Materials - Property of IBM
#
# US Government Users Restricted Rights - Use, duplication or
# disclosure restricted by GSA ADP Schedule Contract with IBM Corp.
#
############################################################
#
# Sendmail
# Copyright (c) 1983 Eric P. Allman
# Berkeley, California
#
# Copyright (c) 1983 Regents of the University of California.
# All rights reserved. The Berkeley software License Agreement
# specifies the terms and conditions for redistribution.
#
###########################################################
#
# Sendmail.cf for full domains.
#
############################################################
#################################################################
#
# If you want to rebuild the configuration file while the sendmail
# daemon is running, you may issue a command "kill -1" to the
# current process id (pid) of the sendmail daemon. The current
# pid is saved in /etc/sendmail.pid.
#
#################################################################
#################################################################
# #
# WARNING: DON'T REMOVE LINES OF THE FORM #XY (like #OL below) #
# OR THE EDCONFIG EDITOR WON'T WORK FOR THOSE LINES!!! #
# #
#################################################################
###########################################
# Important Program Control Functions #
###########################################
# log level - turn it on early.
#OL
OL9
# queue directory - specify directory containing log file
#OQ
OQ/usr/spool/mqueue
###########################################
#
# Host name definition
#
# Define macro for your hostname for all return addresses.
# Define class to recognize all aliases of your host name.
# The hostname should not include your local domain (defined
# below). For example, if your fully qualified hostname
# is 'airmail.aus.ibm.com' this line would be set to 'Dwairmail'.
#
# By default, hostname is set to the value returned by the 'hostname'
# command less any domain extensions. For example, if 'hostname' returns
# 'airmail.aus.ibm.com', the default hostname would be 'airmail', and the
# default domain name would be 'aus.ibm.com'. Define these macros if you
# wish to override these defaults.
#
# The default aliases are those defined in /etc/hosts for the local
# hostname.
#
#DwYourHostName
#CwYourHostName YourHostAliases
Dwpower
###########################################
###########################################
#
# Local domain name. (DEFINE THIS IF DOMAINS ARE USED)
# **WARNING**
# When domain names are used, SMTP transactions utilize the
# full domain (official) name of the host. All host names with
# no domains (abbreviated) are expanded with the local domain
# by the mail service. This is consistent with Internet text standards.
# All hosts sending or RECEIVING mail must recognize their official
# host names. When using domains enter the official host name in
# /etc/hosts and be certain that all network name servers recognize
# official host names.
#
# Define the D macro to be the whole domain for the local host.
# This configuration file supports four part domains. It can be expanded
# to support n part domains. For example, if your fully qualified
# hostname is 'airmail.aus.ibm.com` this line would be set to
# 'DDaus.ibm.com'.
#
#DDgrandchild.child.parent.top
DDci.vu.es
############################################
#############################################
#
# Domain parts. These MUST be defined if DD (above) is defined.
# Input names for all parts of the domain (up to 4 parts).
# ALWAYS START WITH E. E will be the lowest level of the domain name (i.
# e. 'grandchild' in the four part example). For example, the domain
# "aus.ibm.com" would be entered as follows:
# 1) DDaus.ibm.com
# 2) DEaus
# 3) DFibm
# 4) DGcom
# DH would not be used when entering a three part domain.
#
#DElowestLevel
#DFnextLevel
#DGnextLevel
#DHnextLevel
DEci
DFuv
DGes
###########################################
#
# Automatically define classes that equal the macros.
#
CE$E
CF$F
CG$G
CH$H
###################################################################
#
# Host name for RSCS relay (YOU MAY OPTIONALLY DEFINE THIS)
#
# Optionally defined macro specifying name of the host for relaying
# all RSCS traffic. This would be a VM host on the network with
# VM TCP/IP (Program number 5798-FAL) installed.
#
# Defining this macro eliminates the requirement for you to explicitly
# reference the relaying host in your RSCS route addresses. For
# instance, if the VM host with VM TCP/IP is called "vme" and the
# final RSCS destination is "vmz" then you would normally specify the
# address as "@vme:uid@vmz" or "uid%vmz@vme". If you define the
# macro "DVvme" then you only need specify "uid@vmz.RSCS". Note that
# the full domain name of the host (vme.dom1.dom2.dom3) is not entered.
# Sendmail does the appropriate canonicalization. Class "V"
# defines all domain synonyms for RSCS. This line MUST be uncommented
# when defining this macro.
#
#DVRelayHostName
CVRSCS BITNET NETNORTH EARN EARNET VNET
DVvm
###################################################################
###################################################################
#
# Host name for UUCP relay (YOU MAY OPTIONALLY DEFINE THIS)
#
# Optionally defined macro specifying name of host to which you want
# to relay all UUCP traffic. This would be a host on the network
# with modems. You do not have to define this to use UUCP.
#
# Defining this macro eliminates the requirement for you to explicitly
# reference the relaying host in your UUCP route addresses. For
# instance, if the host with modems is called "cat", you normally would
# have to specify a UUCP address as "cat!route_path". If you define
# macro "DUcat", then you only need specify "route_path".
#
#DURelayHostName
#
DUvm
###################################################################
###################################################################
#
# Host name for Ki Research kiNET's DECnet relay
# (YOU MAY OPTIONALLY DEFINE THIS)
#
# Optionally defined macro specifying name of host to which you want
# to relay all DECnet mail traffic via kiNET's dnamail facility.
# This would be a host on the network with tcp/ip, sendmail server and
# Ki Research kiNET's DECnet software installed.
#
# If this macro is not defined, it implies that the Ki Research kiNET's
# DECnet software runs locally or is not installed.
#
#DSRelayHostName
#
###################################################################
###################################################################
#
# Host name for X400 relay (YOU MAY OPTIONALLY DEFINE THIS)
#
# Optionally defined macro specifying name of host to which you want
# to relay all X400 mail traffic. This would be a host on the network
# with tcp/ip, sendmail server and RFC987 gateway software installed.
#
# If this macro is not defined, it implies that the RFC987 gateway
# software runs locally or is not installed.
#
#DXRelayHostName
#
###################################################################
# my official hostname
Dj$w$?D.$D$.
#####################################################
# Version Number (YOU MAY CHANGE THIS AS NEEDED)#
#####################################################
#DZ
DZ4.03
######################
# Special macros #
######################
# my name
DnMAILER-DAEMON
# UNIX header format
DlFrom $g $d
# delimiter (operator) characters
Do.:%@!^=/[]
# format of a total name
Dq$g$?x ($x)$.
# SMTP login message
De$j Sendmail $v/$Z ready at $b
###################
### Options ###
###################
# location of alias file
#OA
OA/usr/lib/aliases
# substitution for space (blank) characters
#OB
OB.
# (don't) connect to "expensive" mailers
#Oc
# default delivery mode
#Od
Odbackground
# default GID
#Og
Og1
# If the I option is set, sendmail treats "connection refused" and "timed out"
# errors from the name server as non-fatal, leaving the message in the queue
# for future delivery attempts.
OI
# location of sendmail.nl file
#Ol
#Ol/usr/lib/sendmail.nl
# treat incoming 8-bit characters as ISO 8859/1 characters
#Ow
# no NL encoding of outgoing mail (just like version prior to AIX3.0).
Ok
# Normally, the LHS/RHS separator for rewrite rules is TAB. When the rewrite
# rules are loaded into sendmail, the LHS and RHS are separated by a string
# of one or more tabs. Spaces are just like any other character data, and are
# not recognized as separating the LHS and RHS of a rewrite rule.
#
# However, if the Ined editor is used to edit the config file rewrite rules,
# tabs will be replaced with spaces on any line changed. This makes it
# impossible for the original rule loading algorithm to properly separate
# the LHS and RHS of the affected rules.
#
# To sidestep this problem, the "OJx" option is provided. If this option is
# enabled, the space character will always be recognized as a separator between
# the LHS and RHS of rewrite rules. The rules which contain embedded spaces
# as data, must have those spaces replaced by an alternative character which
# does not conflict with any other usage. Then, when the rules are loaded,
# and after the LHS and RHS are separated, that alternative character is re-
# placed with space everywhere it occurs.
#
# In the "OJx" option, "x" is the alternative character. "_" will be used
# as the default if no character is specified. A character should be used
# which is not used in any other way in rewrite rules, since all instances
# of it will be replaced by spaces.
#
# The following macro specifies the replacement space character for use in
# rewrite rule definitions. It must be defined as space if OJ is not defined.
# Else, It must be defined as the alternative space char.
#DJ" "
DJ"_"
# The following configuration option enables space to be used as LHS/RHS
# delimiter in rewrite rules. The character following J is the alternative
# space character.
#OJ
OJ_
# Define whether and how to use a name server for resolving recipients.
#
# Possible values are:
# MR use Mail Rename records to resolve recipient users
# MB use Mail Box records to resolve recipient users
# MG use Mail Group records to resolve recipient users
# MX use Mail Exchanger records to resolve recipient hosts
# ANY use the T_ANY query when getting CNAME records for the
# recipient host; this causes all associated A and MX
# records to be cached locally
# ALL use all of the above
#
# You may use any combination of these, although it is recommended that
# you specify MB if MR is specified. For example, "OK MG MX" would enable
# the use of Mail Group and Mail Exchanger resource records.
#
# The default is not to use a name server for resolving recipients.
#
#OK ALL
# default messages to old style
#Oo
Oo
# Slope of q function
#Oq
# read timeout -- violates protocols
#Or
Or5m
# status file
#OS
OS/usr/lib/sendmail.st
# queue up everything before starting transmission
#Os
Os
# default timeout interval
#OT
OT3d
# default UID
#Ou
Ou1
# load average at which we just queue messages
#Ox
# load average at which we refuse connections
#OX
# work recipient factor
#Oy
# work msg class factor
#Oz
# work time factor
#OZ
###########################
# Message precedences #
###########################
Pfirst-class=0
Pspecial-delivery=100
Pbulk=-60
Pjunk=-100
#####################
# Trusted users #
#####################
Troot
Tdaemon
Tuucp
Tkinet
#########################
# Format of headers #
#########################
H?P?Return-Path: <$g>
HReceived: $?sfrom $s $.by $j ($v/$Z)
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:
# 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 #
# #
################################################################################
################################################################################
# #
# The Complete Specification of Canonical Syntax is: #
# #
# <ahost> ::= /* ARPA type host name */ #
# <uhost> ::= /* UUCP type host name */ #
# <dhost> ::= /* DECnet type host name */ #
# <xhost> ::= /* X400 type host name */ #
# <user> ::= /* target user name */ #
# #
# <route_node> ::= @<ahost>: | <uhost>! | <dhost> :: | /C=...<xhost> #
# <route_path> ::= <NULL> | <route_node> | <route_path><route_node> #
# <target> ::= <user> | <user>@<ahost> | <uhost>!<user> | #
# <dhost>::<user> | /C=...<xhost>.../DD=<user> #
# <address> ::= <route_path><target> #
# #
# This is what we handle, but actually we only look at the minimum required #
# to pass the mail on. Intermediaries with other syntax/semantics may be #
# used, provided the addressing is compatible with them when the mail arrives #
# there. #
# #
################################################################################
################################################################################
# #
# THE DYNAMIC MACROS $f AND $g #
# #
# Macro $f is defined by the sender address as known the current host, via #
# the ruleset sequence: 3, 1, 4. #
# #
# Macro $g is defined at delivery time for each separate mailer via the #
# ruleset sequence: 3, 1, mailer-S, 4. #
# #
# The SMTP "MAIL FROM" address will be $g. #
# #
# $g is included in many headers and will be expanded if the header is #
# newly created by sendmail. #
# #
################################################################################
################################################################################
# #
# THE SMTP INTERFACE #
# #
# The SMTP "MAIL FROM" address will be $g. #
# #
# The SMTP "RCPT TO" addresses will be computed from the recipient addresses #
# in sendmail by applying the same ruleset sequence as for "to" headers: #
# namely, rulesets 3, 2, mailer-R, 4. #
# #
################################################################################
################################################################################
# #
# S1: Sender Field Pre-rewriting #
# #
# This ruleset is used when defining the $f macro. In this case it is #
# applied after S3 and before S4. #
# #
# This ruleset is applied to all sender type headers after S3 and before #
# the mailer specific sender (S) rewrite rules. #
# This ruleset is also applied to $f to create $g. #
# #
################################################################################
S1
################################################################################
# #
# S2: Recipient Field Pre-rewriting #
# #
# This ruleset is applied to the user part of the 3-tuple output from S0. #
# It is followed by application of the mailer specific recipient (R) rewrite #
# rules. #
# #
# This ruleset is applied to all recipient type headers after S3 and #
# before the mailer specific recipient (R) rewrite rules. #
# This ruleset is likewise used to reform the "to" address for SMTP. #
# #
################################################################################
S2
################################################################################
# #
# S4: Final Output Post-rewriting (Return to standard form) #
# #
# This ruleset is applied to the user part of the 3-tuple produced from #
# ruleset 0. It is applied after the mailer specific recipient (R) rules. #
# #
# This ruleset is applied after S1 when defining the $f macro. #
# This ruleset is applied last when creating the $g macro from $f. #
# #
# This ruleset is applied to all headers after the mailer specific #
# rewrite rules (whether recipient or sender) have been applied. #
# This ruleset is applied last when computing the RCPT TO address for SMTP. #
# #
################################################################################
S4
#
# Change LOCAL or LOCAL.D to the real name.
#
R$*<@LOCAL>$* $:$1<@$w>$2
R$*<@LOCAL.D>$* $:$1<@$w$?D.$D$.>$2
R$*<@$-.LOCAL>$* $:$1<@$2$?D.$D$.>$3
R$*<LOCAL>$* $:$1<$w>$2
R$*<LOCAL.D>$* $:$1<$w$?D.$D$.>$2
R$*<$-.LOCAL>$* $:$1<$2$?D.$D$.>$3
#
# Remove focus brackets.
#
R$*<$+>$* $1$2$3
R$+:/C=$+ $:/C=$2
R$+!/C=$+ $:/C=$2
################################################################################
# #
# S3: Address Canonicalization (Internal rewriting form) #
# #
# This ruleset turns an address in external format into a format which #
# simplifies internal rewriting. The inverse ruleset is S4. #
# This ruleset is applied first to any external address before other re- #
# writing is done. #
# #
# This concept of canonicalization is to be distinguished from usage of the #
# nameserver in the $[/$] construct inside the RHS of rewrite rules. This is #
# also sometimes called "canonicalization", but has to do not with the syntax #
# of the address but with obtaining the correct domain name for the address. #
# #
# No stripping of local domains is done for route addresses: Rulesets which #
# require this must do it themselves by iteratively stripping LOCAL or #
# LOCAL.D and recalling this ruleset to canonicalize the next host.item. #
# #
# The term "localization" refers to determining whether the next host item #
# is really a reference to the current host. Localization assumes that local #
# UUCP host names are in class w. This is not strictly a necessary restric- #
# tion, but it simplifies the network concept and also makes for simpler #
# rewrite rules. This ruleset replaces explicit instances of local host #
# with the internally recognized tag "LOCAL" or "LOCAL.D". #
# #
# Addresses which do not specify a host name for routing or domain will NOT #
# have any reference to the local host appended in any way. #
# #
################################################################################
S3
#
# Basic textual canonicalization -- note RFC733 heuristic here.
# This strips off everything but the innermost list between <>'s.
# Some addresses are of the format: Full Name <address>
#
R$*<$*<$*<$+>$*>$*>$* $4 3-level <> nesting
R$*<$*<$+>$*>$* $3 2-level <> nesting
R$*<$+>$* $2 basic RFC821/822 parsing
#
# Turn an "at" token into "@".
#
# The J macro specifies space or some equivalent char defined by the OJ
# config option above.
#
R$+$Jat$J$+ $:$1@$2 "at" -> "@" for RFC 822
# Change a%b to a@b. This implies that we support a%b%c... as a route
# based address from right to left.
# This form of addressing should go away as full domains are supported.
#
R$+%$- $1@$2
# ====> NOTE <====
# This configuration file always evaluates mix mode addresses from
# left to right. No precedence between @,!,:: or /C= is assumed. The
# address a!b@c will resolve to the uucp mailer for the remote host
# 'a'. This permits the resolution of very complex route based
# addresses such as; @a:@b:c!d!e::user, a!@b:c!user, a!@b.uucp:user@c.
# Return addresses on mail to/from uucp or DECnet machines are also correct.
# X400 addresses are detected by a leading "/C=" and are passed intact to
# the X400 mailer. The address /C=US/ADMD=ptt/PRMD=pco/DD=b!user resolves
# to the X400 mailer. The recipient sendmail sees b!user and routes to
# the uucp mailer. The address @a:/C=US/ADMD=ptt/PRMD=pco/DD=user
# resolves to the tcp mailer for the remote host 'a'. This is how the
# X400 relay is implemented.
# If you wish the address a!b@c to resolve to the TCP
# mailer for the remote host 'c' then uncomment the following rewrite
# rule. This approach is compatible with older versions of sendmail.
# Change a!b@c to @c:a!b
#R$-!$-@$+ @$3:$1!$2
#
# Change commas to colons for route addresses.
#
R$+,$+ $1:$2
#
# Pick out route addresses. Focus and call localizer.
#
R/C=$* $?X$:@$X:/C=$1$|$:/C=$1
R@$+:$+ $@$>9<@$1>:$2 handle <route-addr>
R$-!$+ $@$>8<$1>!$2 UUCP route
R$-::$+ $@$>17<$1>::$2 DECnet addr
# Detect X400. Focus and localize.
R/C=$+@LOCAL $@$>18$1
R/C=$+ $@</C=$1> X400 route addr
# Detect domain!user. Internally convert to user@domain (RFC976).
# Rule set 8 will detect local addresses and strip any trailing
# periods.
R$-.$*!$+ $@$>8<$1.$2>!$3
# Detect domain::user.
R$-.$*::$+ $@$>17<$1.$2>::$3 DECnet addr
#
# Detect local domain for nonroute addresses. Focus and localize.
#
R$+@$+ $:$1<@$2>
R$+<@$=w$?E.$=E$.$?F.$=F$.$?G.$=G$.$?H.$=H$.> $@$1<@LOCAL.D>
R$+<@$=w> $@$1<@LOCAL>
R$+<@$=w.UUCP> $@$1<@LOCAL>
#
# Anything else is left as-is! This includes simple names.
# They will NOT have an appended domain.
# This is so the $f macro definition will be the sender address
# as known locally.
#
################################################################################
#
# S9: Localize ARPA type route path. Depend on classes/macros E,F,G,H being
# defined in order as used. They need not all be used.
#
# This is used only by S3.
#
################################################################################
S9
R<@$=w.$=E.$=F.$=G.$=H>:$* $@<@LOCAL.D>:$6
R$?H$|<@$=w.$=E.$=F.$=G>:$*$. $@<@LOCAL.D>:$5 if $H isn't defined
R$?G$|<@$=w.$=E.$=F>:$*$. $@<@LOCAL.D>:$4 if $G isn't defined
R$?F$|<@$=w.$=E>:$*$. $@<@LOCAL.D>:$3 if $F isn't defined
R<@$=w>:$* $@<@LOCAL>:$2
R<@$=w.UUCP>:$* $@<@LOCAL>:$2
################################################################################
#
# S8: Localize UUCP route path. This is used only by S3.
#
################################################################################
S8
R<$=w.$=E.$=F.$=G.$=H>!$+ $@<LOCAL.D>!$6
R$?H$|<$=w.$=E.$=F.$=G>!$+$. $@<LOCAL.D>!$5 if $H isn't defined
R$?G$|<$=w.$=E.$=F>!$+$. $@<LOCAL.D>!$4 if $G isn't defined
R$?F$|<$=w.$=E>!$+$. $@<LOCAL.D>!$3 if $F isn't defined
R<$=w>!$+ $@<LOCAL>!$2
R<$+.>!$+ <$1>!$2
# We have a non-local domain. If you want these changed to
# user@domain for resolution uncomment the following lines.
# R<$-.$+>!$+ $@<@$1.$2>:$3
# R<$+.>!$+ $@<@$1>:$2
R<$+.>!$+ <$1>!$2
################################################################################
#
# S17: Localize Ki Research's kiNET route path. This is used only by S3.
#
################################################################################
S17
R<$=w.$=E.$=F.$=G.$=H>::$+ $@<LOCAL.D>::$6
R$?H$|<$=w.$=E.$=F.$=G>::$+$. $@<LOCAL.D>::$5 if $H isn't defined
R$?G$|<$=w.$=E.$=F>::$+$. $@<LOCAL.D>::$4 if $G isn't defined
R$?F$|<$=w.$=E>::$+$. $@<LOCAL.D>::$3 if $F isn't defined
R<$=w>::$+ $@<LOCAL>::$2
# We have a non-local domain. If you want these changed to
# user@domain for resolution uncomment the following lines.
# R<$-.$+>::$+ $@<@$1.$2>:$3
# R<$+>::$+ <$1>::$2
################################################################################
#
# S18: Localize X400 path. This is used only by S3.
#
################################################################################
S18
R$+ $:/C=$1
R$+/S=$-$* $2<@LOCAL.D>
################################################################################
# #
# MAILERS #
# #
################################################################################
################################################################################
# #
# Local and Program Mailer specification #
# #
################################################################################
#
Mlocal, P=/bin/bellmail, F=ulsDFMmn, S=10, R=20, A=mail $u
Mprog, P=/bin/sh, F=lsDFM, S=10, R=20, A=sh -c $u
################################################################################
#
# S10: Local/Prog Mailers Sender rules
#
################################################################################
S10
################################################################################
#
# S20: Local/Prog Mailers Recipient rules
#
################################################################################
S20
################################################################################
# #
# UUCP Mailer Specification #
# #
################################################################################
Muucp, P=/usr/bin/uux, F=DFMhuU, S=13, R=23, M=100000,
A=uux - -r -n -a$f -gC $h!rmail ($u)
################################################################################
# #
# Ki Research kiNET #
# #
################################################################################
Mkinet, P=/usr/etc/dna/bin/dnamail, F=MNsf, S=16, R=26,
A=dnamail -f $f -n $h $u
################################################################################
#
# S16: kinet Sender rules
#
################################################################################
S16
################################################################################
#
# S26: kinet Recipient rules
#
################################################################################
S26
################################################################################
#
# S13: UUCP Mailer Sender Rules
#
# This ruleset is applied in the following circumstances:
#
# 1) To process sender type headers. These have header names:
#
# "resent-sender"
# "resent-from"
# "resent-reply-to"
# "sender"
# "from"
# "reply-to"
# "return-receipt-to"
# "errors-to"
#
# 2) To define the $g macro from the $f macro. The definition of $g must
# contain a bang character if UGLY UUCP From lines are to be gen'd.
#
# In either case, it is applied after ruleset 1, and is followed by ruleset 4.
#
# Watch out if one of those headers is newly created and includes the expanded
# $g macro! This ruleset will have been used to create $g, and will then be
# applied to the result of the expansion of $g. This ruleset must handle
# this!
#
# The $g macro is used in many places.
#
################################################################################
S13
#
# We have just canonicalized a From: address or the $f macro. Remove any
# instances of local host from route addresses. This also works to take
# care of the instance of a newly expanded $g in a new From: line.
#
R<$*LOCAL$*>$-$+ $>3$4
#
# Remove any local domain.
#
R$+<@LOCAL$*> $1
#
# Fully qualify any domain which remains.
#
R$+<@$-> $1<@$2.LOCAL>
#
# Prefix sender address with UUCP target host name. This creates or adds
# to the route. Note that definition of $g will cause prefix of $w. Then
# processing a new From: line containing expanded $g will add another $w prefix
# unless it is stripped above.
#
R$+ $:$w!$1 add it back
################################################################################
#
# S23: UUCP Mailer Recipient rules
#
# This ruleset is applied in the following cases:
#
# 1) To process recipient type headers being sent out through this mailer.
# These headers are the ones with header names:
#
# "to"
# "resent-to"
# "cc"
# "resent-cc"
# "bcc"
# "resent-bcc"
#
# 2) To process the user part of the 3-tuple from S0 which resolves
# to this mailer. What is processed will be the path remaining after
# the next host is stripped. This is enclosed in focus braces to
# distinguish it from a recipient header line address.
#
# In either case, this ruleset is applied after ruleset 2, and is followed by
# ruleset 4.
#
# Remember that this ruleset applies to all "to" type headers in the mail
# transmitted via this mailer. This does not inclue "Apparently-to:" headers.
# Not all "To:" headers point to the current mail target! For instance, if
# the mail originated on this host and some targets were local, there may be
# local "To:" headers that must be processed by this ruleset!
# The idea here is to make sure that the headers will be properly understood
# in the context of the next host to which the mail will go.
#
# A subtlety to be kept in mind is that when this is applied to the user part
# of the 3-tuple output from S0, that that user part is not preprocessed
# by S3 before treatment by this ruleset. However, when a header is being
# processed, S3 will have been used. The difference arises from the fact
# that S3 generates the LOCAL tag, whereas the user part of a UUCP address
# may contain the current host name as the first target. This would be typical
# of a test scenario to UUCP to a remote, and have that remote UUCP back
# to us.
#
################################################################################
S23
#
# Items that come in from S0 get left alone.
#
R<$+> $@$1
#
# Leave route based addresses alone. They are already completely intelligible
# in any context.
#
R<$+>$+ $@<$1>$2
#
# Fully qualify our hostname with full domain.
#
R$+<@LOCAL> $@$1<@LOCAL.D>
#
# Add full domain to other host names in local domain.
#
R$+<@$-> $@$1<@$2.LOCAL>
#
# Leave all other typical domain addresses alone.
#
R$+<$+> $@$1<$2>
#
# Append full local domain where none exists at all. This handles the case
# of local targets whose (missing) host would cause misunderstanding in the
# next host.
#
R$+ $@$1<@LOCAL.D>
################################################################################
# #
# TCP Mailer Specification #
# #
################################################################################
Mtcp, P=[IPC], F=mDFMueXLN, S=14, R=24, A=IPC $h, E=\r\n
################################################################################
#
# S14: TCP Mailer Sender Rules
#
# This ruleset is applied in the following circumstances:
#
# 1) To process sender type headers. These have header names:
#
# "resent-sender"
# "resent-from"
# "resent-reply-to"
# "sender"
# "from"
# "reply-to"
# "return-receipt-to"
# "errors-to"
#
# 2) To define the $g macro from the $f macro.
#
# In either case, it is applied after ruleset 1, and is followed by ruleset 4.
#
# Watch out if one of those headers is newly created and includes the expanded
# $g macro! This ruleset will have been used to create $g, and will then be
# applied to the result of the expansion of $g. This ruleset must handle
# this!
#
# The $g macro is used in many places.
#
################################################################################
S14
#
#
# We have just canonicalized a From: address or the $f macro. Remove any
# instances of local host from route addresses. This also works to take
# care of the instance of a newly expanded $g in a new From: line.
#
R</C=$+> $@<@LOCAL.D>:/C=$1
R<$*LOCAL$*>$-$+ $>3$4
#
# Prepend our domain to route based paths that come through.
#
R<$+>$+ $@<@LOCAL.D>:$1$2
#
# Fully qualify our domain.
#
R$+<@LOCAL> $@$1<@LOCAL.D>
#
# Fully qualify other hosts in our local domain.
#
R$+<@$-> $@$1<@$2.LOCAL>
#
# Leave all other typical domain addresses alone.
#
R$+<$+> $@$1<$2>
#
# Append full local domain where none exists at all.
#
R$+ $@$1<@LOCAL.D>
################################################################################
#
# S24: TCP Mailer Recipient rules
#
# This ruleset is applied in the following cases:
#
# 1) To process recipient type headers being sent out through this mailer.
# These headers are the ones with header names:
#
# "to"
# "resent-to"
# "cc"
# "resent-cc"
# "bcc"
# "resent-bcc"
#
# but NOT:
#
# "Apparently-to"
#
# 2) To process the user part of the 3-tuple from S0 which resolves
# to this mailer. This is the complete "to" address for ordinary
# tcp usage, or is the original UUCP path if we are relaying using DU.
#
# 3) To process the "to" address to form the SMTP RCPT TO address.
#
# In all cases, this ruleset is applied after ruleset 2, and is followed by
# ruleset 4.
#
# Remember that this ruleset applies to all "to" type headers in the mail
# transmitted via this mailer. This does not inclue "Apparently-to:" headers.
# Not all "To:" headers point to the current mail target! For instance, if
# the mail originated on this host and some targets were local, there may be
# local "To:" headers that must be processed by this ruleset!
# The idea here is to make sure that the headers will be properly understood
# in the context of the next host to which the mail will go.
#
################################################################################
S24
R</C=$+> $@</C=$1>
#
# Leave route based addresses alone. They are already completely intelligible
# in any context.
#
R<$+>$+ $@<$1>$2
#
# Fully qualify our hostname with full domain.
#
R$+<@LOCAL> $@$1<@LOCAL.D>
#
# Fully qualify nonlocal host names in our local domain.
#
R$+<@$-> $@$1<@$2.LOCAL>
#
# Leave all other typical domain addresses alone.
#
R$+<$+> $@$1<$2>
#
# Append full local domain where none exists at all. This handles the case
# of local targets whose (missing) host would cause misunderstanding in the
# next host.
#
R$+ $@$1<@LOCAL.D>
# The following two mailers and their Rulesets are newly defined.
################################################################################
# #
# Forwarding to RFC987 gateway mailer specification
# #
################################################################################
Mto987gateway, P=[IPC], F=mDFMueX, S=15, R=25, A=IPC $h
################################################################################
# #
# The RFC987 gateway mailer specification #
# #
# The RFC987 gateway simulation program and its path can be renamed to any #
# name and path by modifying the following Mailer definition below. #
# #
################################################################################
M987gateway, P=/usr/lpp/osimf/etc/x400mailer, F=sBFMhulmSC, S=15, R=25,
A=gateway -f /etc/x400gw.cfg $f $u
################################################################################
#
# S15: RFC987 gateway Mailer Sender Rules
#
# This ruleset is applied in the following circumstances:
#
# 1) To process sender type headers. These have header names:
#
# "resent-sender"
# "resent-from"
# "resent-reply-to"
# "sender"
# "from"
# "reply-to"
# "return-receipt-to"
# "errors-to"
#
# 2) To define the $g macro from the $f macro.
#
# In either case, it is applied after ruleset 1, and is followed by ruleset 4.
#
# Watch out if one of those headers is newly created and includes the expanded
# $g macro! This ruleset will have been used to create $g, and will then be
# applied to the result of the expansion of $g. This ruleset must handle
# this!
#
# The $g macro is used in many places.
#
################################################################################
S15
#
# Fully qualify our hostname with full domain.
#
R$+<@LOCAL> $@$1<@LOCAL.D>
#
# Fully qualify nonlocal host names in our local domain.
#
R$+<@$-> $@$1<@$2.LOCAL>
#
# Leave all other typical domain addresses alone.
#
R$+<$+> $@$1<$2>
################################################################################
#
# S25: RFC987 gateway Mailer Recipient rules
#
#
S25
R$+ $:<$1>
################################################################################
# #
# S7: Address stripping for comparison against sendmail.nl lists #
# #
# This ruleset is applied to an address before checking to see if the #
# address exists in one of the lists in the sendmail.nl file. #
# Its function is to strip off information which is irrelevant to #
# determining the final destination system. This normally means all #
# information to the left of the last "@" for domain addresses and #
# the user name which is to the right of the last "!" in a bang #
# path address. This ruleset should only be modified if there are #
# addressing schemes which must be accomodated. #
# #
################################################################################
S7
#Domain addresssing (up to 6 level)
R$+@$-.$-.$-.$-.$-.$- @$2.$3.$4.$5.$6.$7
R$+@$-.$-.$-.$-.$- @$2.$3.$4.$5.$6
R$+@$-.$-.$-.$- @$2.$3.$4.$5
R$+@$-.$-.$- @$2.$3.$4
R$+@$-.$- @$2.$3
R$+@$- @$2
#Bang addressing
R$+!$- $1!
################################################################################
# #
# S6: Parsing addresses for nameserver queries #
# #
# This ruleset is applied to an address before querying the nameserver #
# for any MB, MR, or MG records that match the address. It will only #
# parse an address of the form "user@domain"; it returns the result in #
# the form "user.domain", which is suitable for the nameserver query, #
# and it prepends a "$#" token to indicate success. #
# #
################################################################################
S6
#
# Pass only addresses consisting of exactly one token, an '@', and one
# or more tokens.
#
R$-@$+ $#$1.$2
################################################################################
# #
# Rule Zero #
# #
# Resolve sender or recipient address to mailer/host/user 3-tuple. #
# This may require iteration in use of S3 to strip leading route items #
# which pertain to the current host. #
# #
# Sendmail will pass the user portion of the 3-tuple through ruleset 2 + #
# the mailer specific recipient ruleset + ruleset 4. #
# #
################################################################################
S0
#
# Handle route addresses that begin with LOCAL or LOCAL.D
#
R<$*LOCAL$*>$-$+ $>3$4
# Change a%b<$*> to <$*>:a@b.
# This form of addressing should go away as full domains are supported.
#
R$+%$-<$*> <$3>:$1@$2
#
# Handle explicit local delivery.
#
# The entire prefix is treated as local user.
R$+<@LOCAL$*> $#local$:$1
#
# Resolve X.400 addresses to the RFC987 gateway mailer.
#
R</C=$*> $#987gateway$:/C=$1
#
# Resolve UUCP to local uucp mailer or remote one via tcp.
# For tcp relay, user is full uucp route. For uucp mailer, user is
# the uucp route as seen from the next host.
# UUCP hostnames are not passed through the nameserver canonicalizer.
#
R$+<@$-.UUCP> $?U$#tcp$@$U$:$1<@$2.UUCP>$|$#uucp$@$2$:<$1>$.
R<@$+.UUCP>:$+ $?U$#tcp$@$U$:<@$1.UUCP>:$2$|$#uucp$@$1$:<$2>$.
R<$+>!$+ $?U$#tcp$@$U$:<$1>!$2$|$#uucp$@$1$:<$2>$.
#
# Resolve DECnet to local Ki Research kiNET's DECnet mailer or remote one via
# tcp. For tcp relay, user is full DECnet route. For Ki Research kiNET's
# DECnet mailer, user is the DECnet route as seen from the next host.
# DECnet hostnames are not passed through the nameserver canonicalizer.
#
R<$+>::$+ $?S$#tcp$@$S$:<$1>::$2$|$#kinet$@$1$:<$2>$.
# Resolve any RSCS relays. Note that relay is canonicalized.
#
R$+<@$-.$=V> $?V$#tcp$@$[$V$]$:$1<@$2.$3>
R<@$+.$=V>:$+ $?V$#tcp$@$[$V$]$:<@$1.$2>:$3
#
# Canonicalize anything else which has an @focus. This excludes simple names,
# which are local.
#
R$*<@$+>$* $:$1<@$[$2$]>$3
#
# Send domain address to tcp. This includes domain literals [IP quads].
# User is full focused path.
#
R$*<@$+>$* $#tcp$@$2$:$1<@$2>$3
#
# Remaining names must be local.
# User is whatever is left.
#
R$+ $#local$:$1