home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Spezial
/
SPEZIAL2_97.zip
/
SPEZIAL2_97.iso
/
ANWEND
/
ONLINE
/
ELM23-2
/
ELM23-2.ZIP
/
sendmail.cf
< prev
Wrap
Text File
|
1996-07-22
|
48KB
|
941 lines
########################################################################
# File: sendmail.uml Version 3.0 16-Apr-1995 #
# Niel Kempson <kempson@snowyowl.co.uk> #
########################################################################
# #
# CHANGE LOG #
# #
# 1.0 [27-Nov-1994] Niel Kempson <kempson@snowyowl.co.uk> #
# Initial release. #
# #
# 2.0 [05-Feb-1995] Niel Kempson <kempson@snowyowl.co.uk> #
# Clarified use of 'Cw' macro and added support for LAMail. #
# #
# 3.0 [16-Apr-1995] Niel Kempson <snowyowl.co.uk> #
# Further clarifications for some bits that evidently weren't #
# clear enough :-( #
# #
########################################################################
# #
# #
# 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. #
# #
# This configuration file was modified specifically for IBM's #
# SENDMAIL product for the IBM OS/2 Operating System. Please avoid #
# making changes to this file, as it will change the operation of #
# SENDMAIL. #
# #
# Modified by: Ed Overly & Daniel Barton @ IBM #
# Yorktown, NY Research Triangle Park, NC #
# #
#----------------------------------------------------------------------#
# #
# Changes to allow UltiMail/2 Lite to work as an SMTP client rather #
# than the usual POP client. You will need to edit this file and #
# customise it for your setup. #
# #
# 1. Use an editor that preserves TAB characters. Do NOT use the #
# EPM or TEDIT editors that come with OS/2 - they expand TABs #
# into spaces and will cause this file to be useless. The E #
# editor is OK. #
# #
# 2. Search for the string "---EDIT---" in this file and edit the #
# following line(s) in accordance with the notes in the adjacent #
# comment. There are 10 occurrences of "---EDIT---" after this #
# line. PLEASE make sure that you check each of them before #
# firing up sendmail. #
# #
# 3. There are explicit paths specified in this file; the examples #
# presented assume that your IAK installation is in the default #
# location of C:\TCPIP. If this is not the case, please check #
# carefully the paths specified under EDITs 04,05,06,07,10. #
# #
# 4. For the examples predefined in this file: #
# #
# o official host name: snowyowl.demon.co.uk #
# #
# o other aliases: snowyowl.com, snowyowl.co.uk, sos.co.uk #
# #
# o IBM TCP/IP installed in C:\TCPIP #
# #
# o all outgoing mail sent to post.demon.co.uk for onward #
# routing and delivery #
# #
# 5. After configuration, this file should be installed as #
# <ETC-DIR>\sendmail.uml, where <ETC-DIR> is the TCP/IP ETC #
# directory (usually C:\TCPIP\ETC). #
# #
# 6. UltiMail/2 Lite will use this file automatically, but sendmail #
# will need to be told to use it as well. When you start the #
# sendmail daemon, be sure to specify the -C option as shown in #
# this example: #
# #
# sendmail -bd -d1.1 -q5m -Cc:\tcpip\etc\sendmail.uml #
# #
# 7. If you want to use this file with LAMail, ensure that it is #
# called X:\tcpip\etc\sendmail.cf (where X: is your TCP/IP disk).#
# #
########################################################################
########################################################################
# #
# Host name definition (YOU MUST DEFINE THESE) #
# #
# The Dw macro defines the "official" host name that will be reported #
# on any outgoing mail as part of the "From" address. It can contain #
# only one host name, without the domain name appended (i.e. no dots #
# allowed). #
# #
# The Cw class macro defines all of the host names for which we will #
# accept incoming mail as destined for this machine. It can contain #
# a list of host names, separated by whitespace. The host names must #
# not have the domain name appended (i.e. no dots allowed). As a #
# minimum, the Cw class must include the "official" host name as #
# defined in the Dw macro. #
# #
# YOU MUST DEFINE Cw OR SENDMAIL WILL NEVER RECOGNISE INCOMING MAIL AS #
# "LOCAL" AND WILL BOUNCE IT BACK TO THE SENDER. Normally, the Dw and #
# Cw definitions are identical. #
# #
# Complicated Example: #
# #
# The full domain name of the host is 'snowyowl.demon.co.uk', so #
# define the 'w' macro: #
# #
# Dwsnowyowl #
# #
# We also wish to accept mail addressed to 'sos-gate.demon.co.uk', #
# so add 'sos-gate' to the minimum essential definition of the 'w' #
# class ('Cwsnowyowl'): #
# #
# Cwsnowyowl sos-gate #
# #
# Normal Examples: #
# #
# The full domain name of the host is 'company.com', so define: #
# #
# Dwcompany #
# Cwcompany #
# DDcom #
# #
# The full domain name of the host is 'myhost.cts.com', so define: #
# #
# Dwmyhost #
# Cwmyhost #
# DDcts.com #
# #
# (Remember that Cw MUST be defined, normally to the same as Dw.) #
# (DD isn't defined until EDIT--02.) #
# #
#----------------------------------------------------------------------#
# #
# NOTE: If you want to support aliases in another domain #
# (e.g. snowyowl.com), these are defined later under EDITs #
# 08 and 09. #
# #
# NOTE: You MUST define Cw or sendmail will never recognise #
# incoming mail as "local" and will bounce it back to the #
# sender. Normally, the Dw and Cw definitions are identical.#
# #
########################################################################
#---EDIT---01---
Dwhostname
Cwhostname
########################################################################
# #
# 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 nameservers 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. #
# #
# Example: #
# #
# The full domain name of the host is 'snowyowl.demon.co.uk', so #
# define the 'D' macro: #
# #
# DDdemon.co.uk #
# #
########################################################################
#---EDIT---02---
DDfull.domain.name
########################################################################
# #
# MAIL RELAY HOST #
# #
# For dialup lines, it is usually desirable to send all outgoing mail #
# to a 'local' host (usually belonging to the service provider) as #
# quickly as possible and then leave it to worry about delivery to #
# remote (and slow) parts of the net. #
# #
# Define the 'V' macro as the full domain name of the relay host. #
# If you don't have a relay host, comment out the DV line below. #
# #
# Example: #
# #
# All outgoing mail will be sent to 'post.demon.co.uk' for onward #
# delivery, so define the 'V' macro: #
# #
# DVpost.demon.co.uk #
# #
# NOTE: Please don't use post.demon.co.uk unless you are a demon #
# customer. Use the mail host run by your service provider. #
# #
########################################################################
#---EDIT---03---
DVmail.relay.host
# my official host name (includes host name and domain name)
Dj$w$?D.$D$.
#####################################################
# Version Number (YOU MAY CHANGE THIS AS NEEDED)#
#####################################################
DZ3.0ars
######################
# Special macros #
######################
# my name
DnMAILER-DAEMON
# UNIX header format
#DlFrom $g $d
DlFrom $g $d remote from $s
# 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 IMPORTANT FILES #
# #
########################################################################
#=======================================================================
# Location of alias file - use the 'A' option to define the full file
# specification of the sendmail alias file. It's conventionally called
# \tcpip\etc\aliases on the TCP/IP drive. Sendmail doesn't mind if this
# file doesn't exist.
#
# Example: OAc:\tcpip\etc\aliases
#=======================================================================
#---EDIT---04---
OAc:\tcpip\etc\aliases
#=======================================================================
# Location of help file - use the 'H' option to define the full file
# specification of the sendmail help file. It's conventionally called
# \tcpip\etc\sendmail.hf on the TCP/IP drive.
#
# Example: OHc:\tcpip\etc\sendmail.hf
#=======================================================================
#---EDIT---05---
OHc:\tcpip\etc\sendmail.hf
#=======================================================================
# Directory used to hold files in the outgoing mail queue - use the 'Q'
# option to define the queue directory. It's conventionally called
# \tcpip\etc\mqueue on the TCP/IP drive. Sendmail will crash if this
# directory doesn't exist.
#
# Example: OQc:\tcpip\etc\mqueue
#=======================================================================
#---EDIT---06---
OQc:\tcpip\etc\mqueue
#=======================================================================
# Location of status file - use the 'S' option to define the full file
# specification of the sendmail status file. It's conventionally called
# \tcpip\etc\sendmail.st on the TCP/IP drive. OS/2 sendmail doesn't
# make use of this file so don't worry if you can't find it anywhere.
#
# Example: OSc:\tcpip\etc\sendmail.st
#=======================================================================
#---EDIT---07---
OSc:\tcpip\etc\sendmail.st
########################################################################
# #
# OTHER SENDMAIL CONFIGURATION OPTIONS #
# #
########################################################################
# substitution for space (blank) characters
OB.
# (don't) connect to "expensive" mailers
#Oc
# default delivery mode
Odbackground
# default messages to old style
Oo
# queue up everything before starting transmission
Os
#=======================================================================
# Time to live in the queue - '7d' means 7 days.
#=======================================================================
OT7d
# load average at which we refuse connections
#OX
# work recipient factor
#Oy
# work msg class factor
#Oz
# work time factor
#OZ
########################################################################
# Message precedences #
# Note: could use equal weight so we can let relay decide what to do #
########################################################################
Pfirst-class=0
Pspecial-delivery=100
Pbulk=-60
Pjunk=-100
########################################################################
# Trusted users #
########################################################################
# This parameter is not used by OS/2 Sendmail.
Tdaemon
########################################################################
# 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 */ #
# <user> ::= /* target user name */ #
# #
# <route_node> ::= @<ahost>: | <uhost>! #
# <route_path> ::= <NULL> | <route_node> | <route_path><route_node> #
# <target> ::= <user> | <user>@<ahost> #
# #
# <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 full domain name.
#
R$*<@LOCAL>$* $:$1<@$w$?D.$D$.>$2
R$*<@LOCAL.D>$* $:$1<@$w$?D.$D$.>$2
R$*<@$-.LOCAL>$* $:$1<@$2$?D.$D$.>$3
R$*<LOCAL>$* $:$1<$w$?D.$D$.>$2
R$*<LOCAL.D>$* $:$1<$w$?D.$D$.>$2
R$*<$-.LOCAL>$* $:$1<$2$?D.$D$.>$3
#
# Remove focus brackets.
#
R$*<$+>$* $1$2$3
########################################################################
# #
# 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 #
# rewriting 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 restriction, 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 I macro specifies space or some equivalent char defined by the OI
# config option above.
#
R$+ at $+ $:$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 @ and ! 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!user, a!@b:c!user, a!@b.uucp:user@c.
# Return addresses on mail to/from AIX level 4 machines are also
# correct. 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@$+:$+ $@$>9<@$1>:$2 handle <route-addr>
R$-!$+ $@$>8<$1>!$2 UUCP route
# 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 local domain for nonroute addresses. Focus and localize.
#
R$+@$+ $:$1<@$2>
R$+<@$=w.$D> $@$1<@LOCAL.D>
R$+<@$=w> $@$1<@LOCAL>
R$+<@$=w.UUCP> $@$1<@LOCAL>
##############################################################################
#
# Treat other addresses as aliases for the local machine. The rules must
# be presented in the form:
#
# R$+<@site.domain>[TAB]$@$1<@LOCAL>
#
# where [TAB] is a TAB character.
#
# Example:
#
# We recognise mail sent to our aliases of 'snowyowl.com', 'snowyowl.co.uk'
# and 'sos.co.uk' and treat it as local mail by defining three extra
# rules:
#
# R$+<@snowyowl.com> $@$1<@LOCAL>
# R$+<@snowyowl.co.uk> $@$1<@LOCAL>
# R$+<@sos.co.uk> $@$1<@LOCAL>
#
# NOTE: if you don't have a registered domain name for mail that is different
# from your official host name (as defined by EDITs 01 & 02), you
# don't want these extra rewriting rules. If this is the case,
# please leave the three lines under EDIT---08 commented out.
#
##############################################################################
#---EDIT---08---
#R$+<@full.domain.name> $@$1<@LOCAL>
#=============================================================================
# Normal addresses in the form "user<@domain.name>" are left untouched,
# but this rule is present to catch local addresses (i.e. those not containing
# an "@").
#=============================================================================
R$+<@$+> $@$1<@$2>
#
# Anything getting this far is treated as a local name, including simple
# names. They will NOT have an appended domain.
# This is so the $f macro definition will be the sender address
# as known locally.
#
R$+ $:$1<@LOCAL> # just a user name
########################################################################
# #
# S9: Localize ARPA type route path. #
# #
# This is used only by S3. #
# #
########################################################################
S9
R<@$=w.$D>:$* $@<@LOCAL.D>:$2
R<@$=w>:$* $@<@LOCAL>:$2
R<@$=w.UUCP>:$* $@<@LOCAL>:$2
##############################################################################
#
# Strip off any of our aliases from the beginning of a routed mail address.
# Incoming mail can often be addressed in the form:
#
# @snowyowl.demon.co.uk:kempson@snowyowl.com
#
# and its useful to strip off the unnecessary routing hop if the first
# one is actually local.
#
# The rules must be presented in the form:
#
# R<@host.site.domain>:$*[TAB]$@<@LOCAL>:$1
#
# where [TAB] is a TAB character.
#
# Example:
#
# We recognise mail sent to our aliases of 'snowyowl.com', 'snowyowl.co.uk'
# and 'sos.co.uk' and treat it as local mail by defining three extra
# rules:
#
# R<@snowyowl.com>:$* $@<@LOCAL>:$1
# R<@snowyowl.co.uk>:$* $@<@LOCAL>:$1
# R<@sos.co.uk>:$* $@<@LOCAL>:$1
#
# NOTE: if you don't have a registered domain name for mail that is different
# from your official host name (as defined by EDITs 01 & 02), you
# don't want these extra rewriting rules. If this is the case,
# please leave the three lines under EDIT---09 commented out.
#
##############################################################################
#---EDIT---09---
#R<@full.domain.name>:$* $@<@LOCAL>:$1
########################################################################
# #
# MAILERS #
# #
########################################################################
########################################################################
# #
# LOCAL AND PROGRAM MAILER SPECIFICATION #
# #
# Mail for this host is presented to the "local" mailer for delivery. #
# #
# #
# Local delivery to UltiMail/2 #
# ---------------------------- #
# #
# We want to pass incoming mail to the UMAILER program provided with #
# UltiMail/2 Lite - it accepts messages and stores them in #
# UltiMail's In-Basket folder. #
# #
# The 'local' mailer should be defined as: #
# #
# Mlocal, P=c:\tcpip\umail\umailer.exe, F=lsDFPM, S=10, R=20, #
# A=-dest c:\tcpip\umail\server\inbox -to $u #
# #
# #
# Local delivery to LAMail #
# ------------------------ #
# #
# We want to pass such mail to LAMail for delivery to its InBox. #
# There is no explicit .exe program used to perform the delivery - #
# a DLL provided by LAMail is used instead. An 'Mlocal' definition #
# is still needed and it should look like this: #
# #
# Mlocal, P=c:\tcpip\etc\mail.exe, F=lsDFPM, S=10, R=20, #
# A=c:\tcpip\etc\mail $u #
# #
# Warning: there MUST NOT be a real "c:\tcpip\etc\mail.exe" program, #
# or mail will be passed to it instead of the LAMail DLL. #
# #
# NOTE #
# ---- #
# The Mlocal definitions must be on one line only - they have been #
# wrapped in the examples above to make them more easy to read. #
# #
# THE Mlocal DEFINITIONS MUST BE ON ONE LINE ONLY - they have been #
# wrapped in the examples above to make them more easy to read. #
# #
########################################################################
#---EDIT---10---
#
# delivery
#
Mlocal, P=c:\tcpip\bin\rcvmail.exe, F=lsDFPM, S=10, R=20, A=-u c:/tcpip/mail $u
#
# UltiMail/2 delivery
#
#Mlocal, P=c:\tcpip\umail\umailer.exe, F=lsDFPM, S=10, R=20, A=-dest c:\tcpip\umail\server\inbox -to $u
#
#LAMail delivery
#
#Mlocal, P=c:\tcpip\bin\mail.exe, F=lsDFPM, S=10, R=20, A=c:\tcpip\etc\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
########################################################################
# #
# TCP Mailer Specification #
# #
########################################################################
Mtcp, P=[IPC], F=mDFMueXL, S=14, R=24, A=IPC $h
########################################################################
# #
# 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
########################################################################
# #
# 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 include #
# "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
#
# Leave route based addresses alone. They are already completely
# intelligible in any context.
#
R<$+>$+ $@<$1>$2
#
# Fully qualify our host name 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>
########################################################################
# #
# 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
#
# Canonicalize anything else which has an @focus. This excludes simple
# names, which are local.
#
R$*<@$+>$* $:$1<@$[$2$]>$3
#=============================================================================
# Send domain address (including domain literals or IP quads) to the mail
# relay defined by macro 'V' for onward delivery. If macro 'V' hasn't been
# defined, attempt delivery directly.
#=============================================================================
R$*<@$+>$* $#tcp $?V $@$V $:$1<@$2>$3 $| $@$2 $:$1<@$2>$3 $.
#
# Remaining names must be local.
# User is whatever is left.
#
R$+ $#local $:$1