home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Spezial
/
SPEZIAL2_97.zip
/
SPEZIAL2_97.iso
/
ANWEND
/
ONLINE
/
APOP3D12
/
APOP3D
/
SENDMAIL.CF
< prev
next >
Wrap
Text File
|
1997-02-01
|
15KB
|
486 lines
#########################################################################
# #
# 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 created specifically for sendmail on the #
# IBM OS/2 Operating System. Please avoid making changes to this file #
# because any changes will change the operation of sendmail. #
# #
# Created by: William Chung for IBM Ultimedia Mail/2 "Lite" #
# and IBM NR/2 #
# IBM T.J. Watson Research Center, Hawthorne, NY #
# #
# March 21, 1995 #
# #
# Change activity: #
# 2/96 TAB Added F=F to mLocal, changed version number #
# 3/96 TAB Added Prog definition. #
# Note from IAA: #
# This file was spoiled by several bugs, possibly after #
# uncoordinated configuration editing activity of #
# several IBM developers. I wonder how it managed to work #
# previously. I have corrected some of the most obvious #
# things, but I beleive it was only a top of an icberg... #
# 24/8/96 IAA #
#########################################################################
#
# This configuration file routes outgoing mail as follows:
#
# 1. If mail is destined for a directly connected domain and
# an internal gateway is defined, then deliver to the gateway.
#
# 2. If mail is destined for a directly connected domain and
# no internal gateway is defined, then deliver directly.
#
# 3. If mail is destined for a domain which is not directly
# connected, then deliver to an external gateway.
#
# 4. If mail is destined for a domain which is not directly
# connected and an external gateway is not defined,
# then deliver directly.
#
# 5. In all cases, rewrite the sender address to look like
# it came from a mail hub if a mail hub is defined.
#
# 6. In all cases, deliver addresses destined for the local host
# directly with no routing through gateways.
#
#
# Macro Definitions
#
# Note: The values of the V and H macros are merely placeholders.
# Actual values will get substituted later at send time when
# sendmail is invoked with the -oM command line flag to override
# these configuration file values.
#
# The V and H macros should normally not be changed here.
#
# Could not understand the above passage. This is definitely not
# about this .cf file version. You _should_ define both V and H
# to get mail relay and mail hub features to work. See below. (IAA)
# TCP/IP Configuration notebook insists on placing fully qualified
# hostnames in both Dw & Cw (with domains). This dengerous practice
# should be avoided. (IAA)
Dwstargate
Cwstargate
# The fully qualified (with domain) name of the internal gateway
#
# All mail destined for the domains defined in macros D through G
# will be sent to this gateway machine
#
# If this macro is not defined, then all mail destined for the domains
# defined in macros D through G will be delivered directly
#
# TCP/IP Configuration notebook erroneously sets it as _external_
# mail relay address. You should correct this by hand later. (IAA)
# DRYour.Internal.Gateway
# The fully qualified (with domain) name of the external gateway
#
# All mail destined for domains _not_ defined in macros D through G
# will be sent to this gateway machine
#
# If this macro is not defined, then all mail destined for domains
# _not_ defined in macros D through G will be delivered directly
#
# Note: this is a macro for _real_ external gateway. Set it by hand
# to make mail relay mode work. TCP/IP Conf. Not. will never do it. (IAA)
# DVYour.External.Gateway
DVnoc.rz.offenburg.de
# The fully qualified (with domain) name of the external mail hub
#
# All sender addresses for external destination addresses will be
# rewritten to look like they came from this mail hub
# DHYour.External.Mail.Hub
# The fully qualified (with domain) name of the internal mail hub
#
# All sender addresses for internal destination addresses will be
# rewritten to look like they came from this mail hub
#
# Since $I is used for UNIX From line below, I used $J for Int.Hub
# macro here and later. It works now. (IAA)
# DJYour.Internal.Mail.Hub
DJ$w
# External user id
#
# The user id used for sending mail through the external gateway
#
# All sender addresses for external destination addresses will be
# rewritten to look like they came from this user id
# DPYourExternalUserID
# The local domain
#
# The domains defined in macros D through G are considered internal and
# directly connected. Mail destined for these domains will be delivered
# to an internal gateway defined in macro R
# DDYour.Domain
DDrz.offenburg.de
# Internal, directly connected domains
#
# The domains defined in macros D through G are considered internal and
# directly connected. Mail destined for these domains will be delivered
# to an internal gateway defined in macro R
#
# If macro R is undefined, then mail for internal destinations will be
# delivered directly
# Version # of this file
DZ2.13i
# Official canonical hostname.
#
# Do not bother setting macro $w (hostname) since sendmail will set
# it for us
#
# Note: We assume $w contains the fully qualified name of the local host
#
# Wrong assumption. Corrected to conform to the well-established format. (IAA)
Dj$w$?D.$D$.
#
# Standard macros
#
# SMTP initial login message
De$j Sendmail $v/$Z ready at $b
# Name used for error messages
DnMailer-Daemon
# UNIX header format
DlFrom $g $d
# Delimiter (operator) characters
Do.:%@!^=/[]
# Format of a total name
Dq$?x$x <$g>$|$g$.
#
# Options
#
# Process messages in the background.
Odbackground
# Accept oldstyle addresses
Oo
# SMTP read timeout
Or15m
# Queue directory - this must be changed if TCP/IP is moved!
OQc:\mptn\etc\mqueue
# Always queue for safety
Os
# Time to live in the queue
OT5d/60m
# maximum number of simultanous sendmail sessions
OX4
# connection cache size (default=1; don't set higher than 4!)
Ok1
# inactivity timeout for SMTP connections (default=5 minutes)
OK5
# log level
# 0 No logging
# 1 Log only serious system failures and security problems
# 2 Log communication failures, such as lost connections
# 3 Log malformed addresses
# 4 Log malformed queue file names and similar minor errors
# 5 Log a record of each message received
# 6 Log SMTP VRFY attempts and messages returned to the original sender
# 7 Log delivery failures, except mail deferred due to a temporary lack of resources
# 8 Log successful deliveries
# 9 Log mail deferred due to a temporary lack of resources
# The default is 1. Sendmail uses the \ETC\SYSLOG.SML file for logging.
OL1
#
# Message precedences
# Note: use equal weight so we can let relay decide what to do
#
Pfirst-class=0
Pspecial-delivery=0
Pjunk=0
#
# Required headers
#
HReceived: $?sfrom $s $.by $j ($v/$Z) id $i; $b
H?D?Date: $a
H?F?From: $q
H?M?Message-Id: <$t.$i@$j>
H?D?Resent-Date: $a
H?F?Resent-From: $q
H?M?Resent-Message-Id: <$t.$i@$j>
H?x?Full-Name: $x
#
# Rewriting Rules
#
#
# Ruleset 3 -- Name Canonicalization
#
S3
# handle null input (translate to <@> special case)
R$@ $@ <@>
# basic textual canonicalization -- note RFC733 heuristic here
R$*<$*>$*<$*>$* $2$3<$4>$5 strip multiple <> <>
R$*<$*<$+>$*>$* <$3>$5 2-level <> nesting
R$*<>$* $@ <@> MAIL FROM:<> case
R$*<$+>$* $2 basic RFC821/822 parsing
# handle list:; syntax as special case
R$*:;$* $@ $1 :; <@>
# 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 $+ : $* ; @ $+ $@ $>96 $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
# do some sanity checking
R$* < @ $* : $* > $* $1 < @ $2 $3 > $4 nix colons in addrs
# 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
# else we must be a local name
#
# Ruleset 96 -- bottom half of ruleset 3
#
# At this point, everything should be in a "local_part<@domain>extra" format.
S96
# handle special cases for local names
R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [a.b.c.d]
R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
# pass to name server to make hostname canonical
R$* < @ $* $~P > $* $: $1 < @ $[ $2 $3 $] > $4
# local host aliases and pseudo-domains are always canonical
R$* < @ $=w > $* $: $1 < @ $2 . > $3
R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
R$* < @ $* . . > $* $1 < @ $2 . > $3
# if this is the local hostname, make sure we treat is as canonical
R$* < @ $j > $* $: $1 < @ $j . > $2
#
# Ruleset 4 -- Final Output Post-rewriting
#
S4
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
# delete duplicate local names
R$+ % $=w @ $=w $1 @ $j u%host@host => u@host
#
# Ruleset 97 -- recanonicalize and call ruleset zero
# (used for recursive calls)
#
S97
R$* $: $>3 $1
R$* $@ $>0 $1
#
# Ruleset 0 -- Parse Address
#
S0
R<@> $#local $: <> special case error msgs
R$* : $* ; $#error $@ USAGE $: "list:; syntax illegal for recipient addresses"
R<@ $+> $#error $@ USAGE $: "user address required"
R<$* : $* > $#error $@ USAGE $: "colon illegal in host name part"
# handle numeric address spec
R$* < @ [ $+ ] > $* $#smtp $@ [$2] $: $1 < @ [$2] > $3 numeric internet spec: send
# now delete the local info -- note $=O to find characters that cause forwarding
R$* < @ > $* $@ $>97 $1 user@ => user
R< @ $=w . > : $* $@ $>97 $2 @here:... -> ...
R$* $=O $* < @ $=w . > $@ $>97 $1 $2 $3 ...@here -> ...
# short circuit local delivery so email to ourself will work
R$+ < @ $w $* > $#local $: $1 deliver local address directly
R$+ < @ $=w $* > $#local $: $1 deliver local address directly
# figure out what can be delivered through our local network
R$* $: < $D > $1
R< $+ > $* < @ $* $D > $* $@ $>5 $2 < @ $3 $D > $4
R< $* > $* $2
R$* $: < $E > $1
R< $+ > $* < @ $* $E > $* $@ $>5 $2 < @ $3 $E > $4
R< $* > $* $2
R$* $: < $F > $1
R< $+ > $* < @ $* $F > $* $@ $>5 $2 < @ $3 $F > $4
R< $* > $* $2
R$* $: < $G > $1
R< $+ > $* < @ $* $G > $* $@ $>5 $2 < @ $3 $G > $4
R< $* > $* $2
# pass names that still have a host to an external gateway if defined
R$* < @ $* > $* $@ $>98 < $V > $1 < @ $2 > glue on gateway
# deal with other remote names
R$* < @$* > $* $#smtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
# if this is quoted, strip the quotes and try again
R$+ $: $1 strip quotes
R$+ $=O $+ $@ $>97 $1 $2 $3 try again
# handle locally delivered names
R$=L $#local $: @ $1 special local names
R$+ $#local $: $1 regular local names
#
# Ruleset 5 -- handle rewriting for internal gateway
#
S5
# see if we have a gateway
R$+ $: < $R > $1 try relay
R< > $+ < @ $+ $* > $#smtp $@ $2 $3 $: $1 < @ $2 $3 > try directly
R< $- : $+ > $+ $: $>95 < $1 : $2 > $3 < @ $2 >
R< $+ > $+ $@ $>95 < $1 > $2 < @ $1 >
#
# Ruleset 95 -- determine mailer for internal gateway
#
S95
R< > $+ < @ $+ > $#smtp $@ $2 $: $1 < @ $2 > try directly
R< $- : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
R< $=w > $* $@ $2 delete local host
R< $+ > $+ < @ $+ > < @ $* > < $1 > $2 @ < $3 > strip off extra gateway
R< $+ > $* $#internal $@ $1 $: $2 try gateway
#
# Ruleset 98 -- determine mailer for external gateway
#
S98
R< > $+ < @ $+ > $#smtp $@ $2 $: $1 < @ $2 > try directly
R< $=w > $* $@ $2 delete local host
R< $+ > $* $#external $@ $1 $: $2 try external gateway
#
# Mailer Definitions
#
#
# SMTP, Local and Program Mailer specifications
# Added F=F to Mlocal TAB
Msmtp, P=[IPC], F=mDFMuX8, S=10, R=0, A=IPC $h
Mlocal, P=c:\aPOP3d\amail.exe, F=lnsDFMP, S=10, R=0, A=amail $u $f
Mprog, P=c:\os2\cmd.exe, F=lsDFM, A= /C $u
S10
R<@> $n errors to mailer-daemon
R$+ $: $>11 $1 perform internal rewrite
R$+ $: $>12 $1 perform external rewrite
#
# Relay Mailer specifications
#
Minternal, P=[IPC], F=mDFMuX8, S=11, R=0, A=IPC $h
Mexternal, P=[IPC], F=mDFMuX8, S=12, R=0, A=IPC $h
S11
R<@> $n errors to mailer-daemon
R$+ $: $>40 < $J > $1
S12
R<@> $n errors to mailer-daemon
R$+ $: $>40 < $H > $1
R$+ $: $>41 $1
# Rewrite addresses so they look like they are from a hub
S40
R< > $- $@ $1 < @ $w > no hub defined, user => user@thishost
R< > $+ $@ $1 no hub defined
R< $+ > $- $@ $2 < @ $1 > user => user@hub
R< $+ > $+ < @ $w $* > $@ $2 < @ $1 > user@thishost => user@hub
R< $+ > $+ < @ $=w $* > $@ $2 < @ $1 > user@othernames => user@hub
R< $+ > $+ < @ $=w.$D > $@ $2 < @ $1 > user@thishostonly => user@hub
R< $+ > $+ $@ $2 hub defined but no rewrite
# Rewrite addresses so they look like they are from a specific user id
S41
R$* $: < $P > $1 expand with user id macro
R< > $+ $@ $1 no user id macro defined
R< $+ > $+ < @ $H > $@ $P < @ $H > user@host => newuser@host
R< $+ > $+ $@ $2 user id macro defined but no rewrite
# Sendmail configuration file *must* end with a newline - do not remove below newline
OHc:\mptn\etc\sendmail.hf
OAc:\mptn\etc\aliases
OSc:\mptn\etc\sendmail.st
OEc:\mptn\etc\message