home *** CD-ROM | disk | FTP | other *** search
- Subject: v08i071: Smail, release 2.3, Part05/05
- Newsgroups: mod.sources
- Approved: mirror!rs
-
- Submitted by: Larry Auton <lda@clyde.att.com>
- Mod.sources: Volume 8, Issue 71
- Archive-name: smail2/Part05
-
- [ Anyone for writing the .cf file into EASE? --r$ ]
-
- #! /bin/sh
- # This is a shell archive. Remove anything before this line,
- # then unpack it by saving it in a file and typing "sh file".
- # If all goes well, you will see the message "End of shell archive."
- # Contents: src/template.cf
- # Wrapped by rs@mirror on Mon Feb 9 17:10:13 1987
- PATH=/bin:/usr/bin:/usr/ucb; export PATH
- echo shar: extracting "'src/template.cf'" '(8397 characters)'
- if test -f 'src/template.cf' ; then
- echo shar: will not over-write existing file "'src/template.cf'"
- else
- sed 's/^X//' >src/template.cf <<'@//E*O*F src/template.cf//'
- X############################################################
- X#
- X# SENDMAIL CONFIGURATION FILE
- X#
- X# supports internet style addressing
- X# over UUCP and ethernet links.
- X#
- X# A product of the UUCP Project.
- X#
- X############################################################
- X
- X
- X############################################################
- X#
- X# Local configuration options - HINTS
- X#
- X# Host name and domain name macros.
- X#
- X# Dw sets $w
- X# DD sets $D
- X# CD sets $=D
- X#
- X# $D and $=D list all domains in which this host sits.
- X# $D goes into outbound addresses, i.e. "user@$w.$D".
- X# $A is another domain for which this host is 'authoritative'
- X# it will will be turned into $D.
- X
- XCF_HOST
- XCF_DOMAIN
- XCF_AUTHORITY
- XCF_DCLASS
- X
- X# Preemptive ether connections. We prefer these connections
- X# over both designated transport mechanisms and the general depository.
- X# You can add more classes (here and in S0).
- X
- X# /etc/hosts.smtp might be a link to /etc/hosts
- X#
- XCF_SMTP
- X
- X# Mock top-level domain names. These name designate a transport mechanism
- X# and appear internally only, set in S3, used in S0, and removed in S4 and
- X# (possibly) the ruleset for the particular mailer.
- X
- XCTETHER UUX
- X
- X# Relay host. Used at the end of S0 as the general depository for
- X# addresses which didn't resolve locally.
- X
- XDRrelay
- X
- X#
- X# End Local configuration options
- X#
- X############################################################
- X
- X############################################################
- X#
- X# General configuration information
- X#
- X############################################################
- X
- XDVsmail2.2/CF_DATE
- X
- X##########################
- X# Special macros #
- X##########################
- X
- X# official hostname
- XDj$w.$D
- X# my name
- XDnMAILER-DAEMON
- X# UNIX header format
- XDlFrom $g $d
- X# delimiter (operator) characters
- XDo.:%@!^=/[]
- X# format of a total name
- XDq$g$?x ($x)$.
- X# SMTP login message
- XDe$j Sendmail $v/$V ready at $b
- X
- X
- X###################
- X# Options #
- X###################
- X
- X# location of alias file
- XOA/usr/lib/aliases
- X# default delivery mode (deliver in background)
- XOdbackground
- X# (don't) connect to "expensive" mailers
- X#Oc
- X# temporary file mode
- XOF0644
- X# default GID
- XOg1
- X# location of help file
- XOH/usr/lib/sendmail.hf
- X# log level
- XOL9
- X# default messages to old style
- XOo
- X# queue directory
- XOQ/usr/spool/mqueue
- X# read timeout -- violates protocols
- XOr2h
- X# status file
- XOS/usr/lib/sendmail.st
- X# queue up everything before starting transmission
- XOs
- X# default timeout interval
- XOT3d
- X# time zone names (V6 only)
- XOtPST,PDT
- X# default UID
- XOu1
- X# wizard's password
- XOWvoidpasswords
- X
- X###############################
- X# Message precedences #
- X###############################
- X
- XPfirst-class=0
- XPspecial-delivery=100
- XPjunk=-100
- X
- X#########################
- X# Trusted users #
- X#########################
- X
- XTroot
- XTdaemon
- XTuucp
- XTnetwork
- X
- X#############################
- X# Format of headers #
- X#############################
- X
- X#H?P?Return-Path: <$g>
- XHReceived: $?sfrom $s
- X $.by $j ($v/$V)
- X id $i; $b
- XH?D?Resent-Date: $a
- XH?D?Date: $a
- XH?F?Resent-From: $q
- XH?F?From: $q
- XH?x?Full-Name: $x
- XHSubject:
- X# HPosted-Date: $a
- X# H?l?Received-Date: $b
- XH?M?Resent-Message-Id: <$t.$i@$j>
- XH?M?Message-Id: <$t.$i@$j>
- X
- X############################################################
- X#
- X# REWRITING RULES
- X#
- X
- X
- X###########################
- X# #
- X# Name Canonicalization #
- X# #
- X###########################
- XS3
- X
- X# basic textual canonicalization
- XR<> $@@ turn into magic token
- XR$*<$+>$* $2 basic RFC821/822 parsing
- XR$+ at $+ $1@$2 "at" -> "@" for RFC 822
- XR$*<$*>$* $1$2$3 in case recursive
- X
- X# handle route-addr <@a,@b,@c:user@d>
- XR@$+,$+ @$1:$2 change all "," to ":"
- XR@$+:$+ $@<@$1>:$2 handle <route-addr>
- XR$+:$*;@$+ $@$1:$2;@$3 list syntax
- X
- X# Rewrite address into a domain-based address. Any special mock domain names
- X# (like UUX) should be defined on the CT line and removed (if necessary)
- X# in S4. You can use them in S0 for designated transport mechanisms.
- X
- X# Delimiters with precedence over @. Add yours here.
- X
- X# The @ delimiter. Leave this alone.
- XR$+@$+ $:$1<@$2> focus on domain
- XR$+<$+@$+> $1$2<@$3> move gaze right
- XR$+<@$+> $@$1<@$2> already canonical
- X
- X# Delimiters with precedence below @. Add yours here.
- XR$+^$+ $1!$2 convert ^ to !
- XR$-!$+ $@$2<@$1.UUX> resolve uucp names
- XR$+.!$+ $@$2<@$1> domain.!host
- XR$+!$+ $@$2<@$1> domain!host
- X
- X# % is a low precedence @.
- XR$*%$* $@$>3$1@$2 %->@ and retry
- X
- X############################################################
- X#
- X# RULESET ZERO PREAMBLE
- X#
- X############################################################
- X
- XS0
- X
- X# first make canonical
- XR$*<$*>$* $1$2$3 defocus
- XR$+ $:$>3$1 make canonical
- X
- X# handle special cases.....
- XR@ $#local$:MAILER-DAEMON handle <> form
- XR$*<@[$+]>$* $#ether$@[$2]$:$1@[$2]$3 numeric internet spec
- X
- X# strip local stuff
- XR$*<@$-.$w.$D>$* $1<@$2>$3 thishost.mydom
- XCF_GATEWAYR$*<@$-.$D>$* $1<@$2>$3 mydom
- XR$*<@$-.$w.$=D>$* $1<@$2>$4 thishost.anydom
- XR$*<@$-.$w.$A>$* $1<@$2>$3 thishost.anotherdom
- XR$*<@$-.$A>$* $1<@$2>$3 anotherdom
- XR$*<@$-.$w.$=T>$* $1<@$2>$4 thishost.mockdom
- XCF_GATEWAYR$*<$*$w>$* $1<$2>$3 thishost
- XR$*<$*.>$* $1<$2>$3 drop trailing dot
- XR<@>:$+ $@$>0$1 strip null route, retry
- XR$+<@> $@$>0$1 strip null addr, retry
- X
- X
- X###############################################
- X# Machine dependent part of ruleset zero #
- X###############################################
- X
- X# Preemption: for a host on a known link turn the domain spec into a
- X# mock domain indicating the link. One set of these rules for each of
- X# the F classes listed in the local configuration options.
- X
- XR$*<$*$=E.$D>$* $:$1<$2$3.ETHER>$4 etherhost.mydomain
- XR$*<$*$=E.$=D>$* $:$1<$2$3.ETHER>$5 etherhost.anydomain
- XR$*<$*$=E.$A>$* $:$1<$2$3.ETHER>$4 etherhost.anotherdomain
- XR$*<$*$=E.$=T>$* $:$1<$2$3.ETHER>$5 etherhost.mock-domain
- XR$*<$*$=E>$* $:$1<$2$3.ETHER>$4 etherhost
- X
- X# Designated delivery: use the indicated transport mechanism. One of
- X# these rules for each of the mock domains defined in $=T. You can
- X# remove these if you just want general disposition. HINTS.
- X
- X# Designated delivery:
- XR$*<@$=U.UUX>$* $#uux$@$2$:$1$3 known uucphost
- XR$*<@$=E$+.ETHER>$* $#ether$@$2$:$1@$2$4 known etherhost
- XR$*<@$+.ETHER>$* $#ether$@$2$:$1@$2$3 etherhost
- X
- X# throw out mock domain name now
- XR$*<$*.$=T>$* $1<$2>$4
- X
- X# General disposition of remote mail (comment out all but one). You
- X# might add to this list, if you have other "smarter" mailers. HINTS.
- X
- XR$*<@$->:$+ $#uux$@$2$:$1$3 forward to $2
- XR$*<@$*>$* $#uux$@$2$:$1$3 hand to uucp
- X#R$*<@$*>$* $#uux$@$R$:$1@$2$3 hand to uucp relay
- X#R$*<@$*>$* $#ether$@$R$:$1@$2$3 hand to ether relay
- X#R$*<$*>$* $#error$:unknown address $1$2$3 don't hand anywhere
- X
- X# local delivery
- XR$+ $#local$:$1 user
- X
- X############################################################
- X#
- X# Local and Program Mailer specification
- X#
- X############################################################
- X
- XCF_SVMAILMlocal, P=CF_LOCALMAIL, F=lsDFMhumSU, S=10, R=20, A=rmail $u
- XCF_BSMAILMlocal, P=CF_LOCALMAIL, F=rlsDFMmn, S=10, R=20, A=mail -d $u
- XMprog, P=/bin/sh, F=lsDFMe, S=10, R=20, A=sh -c $u
- X
- XS10
- XR@ MAILER-DAEMON errors to mailer-daemon
- XCF_HIDDENHOSTSR$+<@$+.$j>$* $1<@$j>$3 hide anydom.$j under $j
- X
- XS20
- X
- X############################################################
- X#
- X# UUCP Mailer specification
- X#
- X############################################################
- X
- XMuux, P=/bin/smail, F=sDFMhum, S=14, R=24, M=100000,
- X A=smail -vH$j $h!$u
- X
- XS14
- XR$+<@$=E> $1 user@etherhost -> user
- XR$*<@$+>$* $@$1<@$2>$3 already ok
- XCF_HIDDENHOSTSR$+<@$+.$j>$* $1<@$j>$3 hide anydom.$j under $j
- XR$+ $@$1<@$j> add our full address
- X
- XS24
- X
- X############################################################
- X#
- X# SMTP ethernet mailer
- X#
- X############################################################
- X
- XMether, P=[IPC], F=msDFMuCXP, S=11, R=21, A=IPC $h
- X
- XS11
- XR$*<@$+>$* $@$1<@$2>$3 already ok
- XR$+ $@$1<@$w> add our hostname
- X
- XS21
- X
- X#################################
- X# Final Output Post-rewriting #
- X#################################
- X
- X# This rewrites the internal $=T mock domains into their external form.
- X# The default is to replace the mock domain name with $D.
- X# The last two lines are stock.
- X
- XS4
- XR@ $@ handle <> error addr
- XR$+<@$-.UUX> $2!$1 u@host.UUX => host!u
- XR$*<$*$=T>$* $:$1<$2$D>$4 change local info
- XR$*<$+>$* $1$2$3 defocus
- XR@$+:$+:$+ $@@$1,$2:$3 <route-addr> canonical
- @//E*O*F src/template.cf//
- if test 8397 -ne "`wc -c <'src/template.cf'`"; then
- echo shar: error transmitting "'src/template.cf'" '(should have been 8397 characters)'
- fi
- fi # end of overwriting check
- echo shar: "End of shell archive."
- exit 0
-