|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# Copyright (c) 1998-2004 Sendmail, Inc. and its suppliers.
|
|
Ryan Haggerty |
e50d1d |
# All rights reserved.
|
|
Ryan Haggerty |
e50d1d |
# Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved.
|
|
Ryan Haggerty |
e50d1d |
# Copyright (c) 1988, 1993
|
|
Ryan Haggerty |
e50d1d |
# The Regents of the University of California. All rights reserved.
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# By using this file, you agree to the terms and conditions set
|
|
Ryan Haggerty |
e50d1d |
# forth in the LICENSE file which can be found at the top level of
|
|
Ryan Haggerty |
e50d1d |
# the sendmail distribution.
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
##### SENDMAIL CONFIGURATION FILE
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
##### built by bhcompile@porky.build.redhat.com on Mon Sep 19 07:13:43 EDT 2005
|
|
Ryan Haggerty |
e50d1d |
##### in /usr/src/build/614338-i386/BUILD/sendmail-8.13.5/cf/cf
|
|
Ryan Haggerty |
e50d1d |
##### using ../ as configuration include directory
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
##### DO NOT EDIT THIS FILE! Only edit the source .mc file.
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##### $Id: cfhead.m4,v 8.116 2004/01/28 22:02:22 ca Exp $ #####
|
|
Ryan Haggerty |
e50d1d |
##### $Id: cf.m4,v 8.32 1999/02/07 07:26:14 gshapiro Exp $ #####
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##### linux setup for Red Hat Linux #####
|
|
Ryan Haggerty |
e50d1d |
##### $Id: use_ct_file.m4,v 8.11 2001/08/26 20:58:57 gshapiro Exp $ #####
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##### $Id: msp.m4,v 1.33 2004/02/09 22:32:38 ca Exp $ #####
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##### $Id: no_default_msa.m4,v 8.2 2001/02/14 05:03:22 gshapiro Exp $ #####
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##### $Id: proto.m4,v 8.718 2005/08/24 18:07:23 ca Exp $ #####
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# level 10 config file format
|
|
Ryan Haggerty |
e50d1d |
V10/Berkeley
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# override file safeties - setting this option compromises system security,
|
|
Ryan Haggerty |
e50d1d |
# addressing the actual file configuration problem is preferred
|
|
Ryan Haggerty |
e50d1d |
# need to set this before any file actions are encountered in the cf file
|
|
Ryan Haggerty |
e50d1d |
#O DontBlameSendmail=safe
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# default LDAP map specification
|
|
Ryan Haggerty |
e50d1d |
# need to set this now before any LDAP maps are defined
|
|
Ryan Haggerty |
e50d1d |
#O LDAPDefaultSpec=-h localhost
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##################
|
|
Ryan Haggerty |
e50d1d |
# local info #
|
|
Ryan Haggerty |
e50d1d |
##################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# my LDAP cluster
|
|
Ryan Haggerty |
e50d1d |
# need to set this before any LDAP lookups are done (including classes)
|
|
Ryan Haggerty |
e50d1d |
#D{sendmailMTACluster}$m
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
Cwlocalhost
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# my official domain name
|
|
Ryan Haggerty |
e50d1d |
# ... define this only if sendmail cannot automatically determine your domain
|
|
Ryan Haggerty |
e50d1d |
#Dj$w.Foo.COM
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# host/domain names ending with a token in class P are canonical
|
|
Ryan Haggerty |
e50d1d |
CP.
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# "Smart" relay host (may be null)
|
|
Ryan Haggerty |
e50d1d |
DS
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# operators that cannot be in local usernames (i.e., network indicators)
|
|
Ryan Haggerty |
e50d1d |
CO @ % !
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# a class with just dot (for identifying canonical names)
|
|
Ryan Haggerty |
e50d1d |
C..
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# a class with just a left bracket (for identifying domain literals)
|
|
Ryan Haggerty |
e50d1d |
C[[
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Resolve map (to check if a host exists in check_mail)
|
|
Ryan Haggerty |
e50d1d |
Kresolve host -a<OKR> -T<TEMP>
|
|
Ryan Haggerty |
e50d1d |
C{ResOk}OKR
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Hosts for which relaying is permitted ($=R)
|
|
Ryan Haggerty |
e50d1d |
FR-o /etc/mail/relay-domains
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# arithmetic map
|
|
Ryan Haggerty |
e50d1d |
Karith arith
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# dequoting map
|
|
Ryan Haggerty |
e50d1d |
Kdequote dequote
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# class E: names that should be exposed as from this host, even if we masquerade
|
|
Ryan Haggerty |
e50d1d |
# class L: names that should be delivered locally, even if we have a relay
|
|
Ryan Haggerty |
e50d1d |
# class M: domains that should be converted to $M
|
|
Ryan Haggerty |
e50d1d |
# class N: domains that should not be converted to $M
|
|
Ryan Haggerty |
e50d1d |
#CL root
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# my name for error messages
|
|
Ryan Haggerty |
e50d1d |
DnMAILER-DAEMON
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
D{MTAHost}[127.0.0.1]
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Configuration version number
|
|
Ryan Haggerty |
e50d1d |
DZ8.13.5/Submit
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
###############
|
|
Ryan Haggerty |
e50d1d |
# Options #
|
|
Ryan Haggerty |
e50d1d |
###############
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# strip message body to 7 bits on input?
|
|
Ryan Haggerty |
e50d1d |
O SevenBitInput=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# 8-bit data handling
|
|
Ryan Haggerty |
e50d1d |
#O EightBitMode=pass8
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# wait for alias file rebuild (default units: minutes)
|
|
Ryan Haggerty |
e50d1d |
O AliasWait=10
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# location of alias file
|
|
Ryan Haggerty |
e50d1d |
#O AliasFile=/etc/mail/aliases
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# minimum number of free blocks on filesystem
|
|
Ryan Haggerty |
e50d1d |
O MinFreeBlocks=100
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# maximum message size
|
|
Ryan Haggerty |
e50d1d |
#O MaxMessageSize=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# substitution for space (blank) characters
|
|
Ryan Haggerty |
e50d1d |
O BlankSub=.
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# avoid connecting to "expensive" mailers on initial submission?
|
|
Ryan Haggerty |
e50d1d |
O HoldExpensive=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# checkpoint queue runs after every N successful deliveries
|
|
Ryan Haggerty |
e50d1d |
#O CheckpointInterval=10
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# default delivery mode
|
|
Ryan Haggerty |
e50d1d |
O DeliveryMode=i
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# error message header/file
|
|
Ryan Haggerty |
e50d1d |
#O ErrorHeader=/etc/mail/error-header
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# error mode
|
|
Ryan Haggerty |
e50d1d |
#O ErrorMode=print
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# save Unix-style "From_" lines at top of header?
|
|
Ryan Haggerty |
e50d1d |
#O SaveFromLine=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# queue file mode (qf files)
|
|
Ryan Haggerty |
e50d1d |
O QueueFileMode=0660
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# temporary file mode
|
|
Ryan Haggerty |
e50d1d |
O TempFileMode=0600
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# match recipients against GECOS field?
|
|
Ryan Haggerty |
e50d1d |
#O MatchGECOS=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# maximum hop count
|
|
Ryan Haggerty |
e50d1d |
#O MaxHopCount=25
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# location of help file
|
|
Ryan Haggerty |
e50d1d |
O HelpFile=/etc/mail/helpfile
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# ignore dots as terminators in incoming messages?
|
|
Ryan Haggerty |
e50d1d |
#O IgnoreDots=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# name resolver options
|
|
Ryan Haggerty |
e50d1d |
#O ResolverOptions=+AAONLY
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# deliver MIME-encapsulated error messages?
|
|
Ryan Haggerty |
e50d1d |
O SendMimeErrors=True
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Forward file search path
|
|
Ryan Haggerty |
e50d1d |
O ForwardPath
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# open connection cache size
|
|
Ryan Haggerty |
e50d1d |
O ConnectionCacheSize=2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# open connection cache timeout
|
|
Ryan Haggerty |
e50d1d |
O ConnectionCacheTimeout=5m
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# persistent host status directory
|
|
Ryan Haggerty |
e50d1d |
#O HostStatusDirectory=.hoststat
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# single thread deliveries (requires HostStatusDirectory)?
|
|
Ryan Haggerty |
e50d1d |
#O SingleThreadDelivery=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# use Errors-To: header?
|
|
Ryan Haggerty |
e50d1d |
O UseErrorsTo=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# log level
|
|
Ryan Haggerty |
e50d1d |
O LogLevel=9
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# send to me too, even in an alias expansion?
|
|
Ryan Haggerty |
e50d1d |
#O MeToo=True
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# verify RHS in newaliases?
|
|
Ryan Haggerty |
e50d1d |
O CheckAliases=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# default messages to old style headers if no special punctuation?
|
|
Ryan Haggerty |
e50d1d |
O OldStyleHeaders=True
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# SMTP daemon options
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
O DaemonPortOptions=Name=NoMTA, Addr=127.0.0.1, M=E
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# SMTP client options
|
|
Ryan Haggerty |
e50d1d |
#O ClientPortOptions=Family=inet, Address=0.0.0.0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Modifiers to define {daemon_flags} for direct submissions
|
|
Ryan Haggerty |
e50d1d |
#O DirectSubmissionModifiers
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Use as mail submission program? See sendmail/SECURITY
|
|
Ryan Haggerty |
e50d1d |
O UseMSP=True
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# privacy flags
|
|
Ryan Haggerty |
e50d1d |
O PrivacyOptions=goaway,noetrn,restrictqrun
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# who (if anyone) should get extra copies of error messages
|
|
Ryan Haggerty |
e50d1d |
#O PostmasterCopy=Postmaster
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# slope of queue-only function
|
|
Ryan Haggerty |
e50d1d |
#O QueueFactor=600000
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# limit on number of concurrent queue runners
|
|
Ryan Haggerty |
e50d1d |
#O MaxQueueChildren
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# maximum number of queue-runners per queue-grouping with multiple queues
|
|
Ryan Haggerty |
e50d1d |
#O MaxRunnersPerQueue=1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# priority of queue runners (nice(3))
|
|
Ryan Haggerty |
e50d1d |
#O NiceQueueRun
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# shall we sort the queue by hostname first?
|
|
Ryan Haggerty |
e50d1d |
#O QueueSortOrder=priority
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# minimum time in queue before retry
|
|
Ryan Haggerty |
e50d1d |
#O MinQueueAge=30m
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# how many jobs can you process in the queue?
|
|
Ryan Haggerty |
e50d1d |
#O MaxQueueRunSize=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# perform initial split of envelope without checking MX records
|
|
Ryan Haggerty |
e50d1d |
#O FastSplit=1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# queue directory
|
|
Ryan Haggerty |
e50d1d |
O QueueDirectory=/var/spool/clientmqueue
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# key for shared memory; 0 to turn off
|
|
Ryan Haggerty |
e50d1d |
#O SharedMemoryKey=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# timeouts (many of these)
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.initial=5m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.connect=5m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.aconnect=0s
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.iconnect=5m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.helo=5m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.mail=10m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.rcpt=1h
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.datainit=5m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.datablock=1h
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.datafinal=1h
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.rset=5m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.quit=2m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.misc=2m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.command=1h
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.ident=5s
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.fileopen=60s
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.control=2m
|
|
Ryan Haggerty |
e50d1d |
O Timeout.queuereturn=5d
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.queuereturn.normal=5d
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.queuereturn.urgent=2d
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.queuereturn.non-urgent=7d
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.queuereturn.dsn=5d
|
|
Ryan Haggerty |
e50d1d |
O Timeout.queuewarn=4h
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.queuewarn.normal=4h
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.queuewarn.urgent=1h
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.queuewarn.non-urgent=12h
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.queuewarn.dsn=4h
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.hoststatus=30m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.resolver.retrans=5s
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.resolver.retrans.first=5s
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.resolver.retrans.normal=5s
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.resolver.retry=4
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.resolver.retry.first=4
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.resolver.retry.normal=4
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.lhlo=2m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.auth=10m
|
|
Ryan Haggerty |
e50d1d |
#O Timeout.starttls=1h
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# time for DeliverBy; extension disabled if less than 0
|
|
Ryan Haggerty |
e50d1d |
#O DeliverByMin=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# should we not prune routes in route-addr syntax addresses?
|
|
Ryan Haggerty |
e50d1d |
#O DontPruneRoutes=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# queue up everything before forking?
|
|
Ryan Haggerty |
e50d1d |
O SuperSafe=True
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# status file
|
|
Ryan Haggerty |
e50d1d |
O StatusFile=/var/spool/clientmqueue/sm-client.st
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# time zone handling:
|
|
Ryan Haggerty |
e50d1d |
# if undefined, use system default
|
|
Ryan Haggerty |
e50d1d |
# if defined but null, use TZ envariable passed in
|
|
Ryan Haggerty |
e50d1d |
# if defined and non-null, use that info
|
|
Ryan Haggerty |
e50d1d |
O TimeZoneSpec=
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# default UID (can be username or userid:groupid)
|
|
Ryan Haggerty |
e50d1d |
#O DefaultUser=mailnull
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# list of locations of user database file (null means no lookup)
|
|
Ryan Haggerty |
e50d1d |
#O UserDatabaseSpec=/etc/mail/userdb
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# fallback MX host
|
|
Ryan Haggerty |
e50d1d |
#O FallbackMXhost=fall.back.host.net
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# fallback smart host
|
|
Ryan Haggerty |
e50d1d |
#O FallbackSmartHost=fall.back.host.net
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# if we are the best MX host for a site, try it directly instead of config err
|
|
Ryan Haggerty |
e50d1d |
#O TryNullMXList=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# load average at which we just queue messages
|
|
Ryan Haggerty |
e50d1d |
#O QueueLA=8
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# load average at which we refuse connections
|
|
Ryan Haggerty |
e50d1d |
#O RefuseLA=12
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# log interval when refusing connections for this long
|
|
Ryan Haggerty |
e50d1d |
#O RejectLogInterval=3h
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# load average at which we delay connections; 0 means no limit
|
|
Ryan Haggerty |
e50d1d |
#O DelayLA=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# maximum number of children we allow at one time
|
|
Ryan Haggerty |
e50d1d |
#O MaxDaemonChildren=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# maximum number of new connections per second
|
|
Ryan Haggerty |
e50d1d |
#O ConnectionRateThrottle=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Width of the window
|
|
Ryan Haggerty |
e50d1d |
#O ConnectionRateWindowSize=60s
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# work recipient factor
|
|
Ryan Haggerty |
e50d1d |
#O RecipientFactor=30000
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# deliver each queued job in a separate process?
|
|
Ryan Haggerty |
e50d1d |
#O ForkEachJob=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# work class factor
|
|
Ryan Haggerty |
e50d1d |
#O ClassFactor=1800
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# work time factor
|
|
Ryan Haggerty |
e50d1d |
#O RetryFactor=90000
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# default character set
|
|
Ryan Haggerty |
e50d1d |
#O DefaultCharSet=unknown-8bit
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# service switch file (name hardwired on Solaris, Ultrix, OSF/1, others)
|
|
Ryan Haggerty |
e50d1d |
#O ServiceSwitchFile=/etc/mail/service.switch
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# hosts file (normally /etc/hosts)
|
|
Ryan Haggerty |
e50d1d |
#O HostsFile=/etc/hosts
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# dialup line delay on connection failure
|
|
Ryan Haggerty |
e50d1d |
#O DialDelay=0s
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# action to take if there are no recipients in the message
|
|
Ryan Haggerty |
e50d1d |
#O NoRecipientAction=none
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# chrooted environment for writing to files
|
|
Ryan Haggerty |
e50d1d |
#O SafeFileEnvironment
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# are colons OK in addresses?
|
|
Ryan Haggerty |
e50d1d |
#O ColonOkInAddr=True
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# shall I avoid expanding CNAMEs (violates protocols)?
|
|
Ryan Haggerty |
e50d1d |
#O DontExpandCnames=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# SMTP initial login message (old $e macro)
|
|
Ryan Haggerty |
e50d1d |
O SmtpGreetingMessage=$j Sendmail $v/$Z; $b
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# UNIX initial From header format (old $l macro)
|
|
Ryan Haggerty |
e50d1d |
O UnixFromLine=From $g $d
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# From: lines that have embedded newlines are unwrapped onto one line
|
|
Ryan Haggerty |
e50d1d |
#O SingleLineFromHeader=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Allow HELO SMTP command that does not include a host name
|
|
Ryan Haggerty |
e50d1d |
#O AllowBogusHELO=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Characters to be quoted in a full name phrase (@,;:\()[] are automatic)
|
|
Ryan Haggerty |
e50d1d |
#O MustQuoteChars=.
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# delimiter (operator) characters (old $o macro)
|
|
Ryan Haggerty |
e50d1d |
O OperatorChars=.:%@!^/[]+
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# shall I avoid calling initgroups(3) because of high NIS costs?
|
|
Ryan Haggerty |
e50d1d |
O DontInitGroups=True
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# are group-writable :include: and .forward files (un)trustworthy?
|
|
Ryan Haggerty |
e50d1d |
# True (the default) means they are not trustworthy.
|
|
Ryan Haggerty |
e50d1d |
#O UnsafeGroupWrites=True
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# where do errors that occur when sending errors get sent?
|
|
Ryan Haggerty |
e50d1d |
#O DoubleBounceAddress=postmaster
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# where to save bounces if all else fails
|
|
Ryan Haggerty |
e50d1d |
#O DeadLetterDrop=/var/tmp/dead.letter
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# what user id do we assume for the majority of the processing?
|
|
Ryan Haggerty |
e50d1d |
O RunAsUser=smmsp
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# maximum number of recipients per SMTP envelope
|
|
Ryan Haggerty |
e50d1d |
#O MaxRecipientsPerMessage=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# limit the rate recipients per SMTP envelope are accepted
|
|
Ryan Haggerty |
e50d1d |
# once the threshold number of recipients have been rejected
|
|
Ryan Haggerty |
e50d1d |
#O BadRcptThrottle=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# shall we get local names from our installed interfaces?
|
|
Ryan Haggerty |
e50d1d |
O DontProbeInterfaces=True
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Return-Receipt-To: header implies DSN request
|
|
Ryan Haggerty |
e50d1d |
#O RrtImpliesDsn=False
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# override connection address (for testing)
|
|
Ryan Haggerty |
e50d1d |
#O ConnectOnlyTo=0.0.0.0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Trusted user for file ownership and starting the daemon
|
|
Ryan Haggerty |
e50d1d |
O TrustedUser=smmsp
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Control socket for daemon management
|
|
Ryan Haggerty |
e50d1d |
#O ControlSocketName=/var/spool/mqueue/.control
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Maximum MIME header length to protect MUAs
|
|
Ryan Haggerty |
e50d1d |
#O MaxMimeHeaderLength=0/0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Maximum length of the sum of all headers
|
|
Ryan Haggerty |
e50d1d |
#O MaxHeadersLength=32768
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Maximum depth of alias recursion
|
|
Ryan Haggerty |
e50d1d |
#O MaxAliasRecursion=10
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# location of pid file
|
|
Ryan Haggerty |
e50d1d |
O PidFile=/var/run/sm-client.pid
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Prefix string for the process title shown on 'ps' listings
|
|
Ryan Haggerty |
e50d1d |
#O ProcessTitlePrefix=prefix
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Data file (df) memory-buffer file maximum size
|
|
Ryan Haggerty |
e50d1d |
#O DataFileBufferSize=4096
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Transcript file (xf) memory-buffer file maximum size
|
|
Ryan Haggerty |
e50d1d |
#O XscriptFileBufferSize=4096
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# lookup type to find information about local mailboxes
|
|
Ryan Haggerty |
e50d1d |
#O MailboxDatabase=pw
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# override compile time flag REQUIRES_DIR_FSYNC
|
|
Ryan Haggerty |
e50d1d |
#O RequiresDirfsync=true
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# list of authentication mechanisms
|
|
Ryan Haggerty |
e50d1d |
#O AuthMechanisms=EXTERNAL GSSAPI KERBEROS_V4 DIGEST-MD5 CRAM-MD5
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Authentication realm
|
|
Ryan Haggerty |
e50d1d |
#O AuthRealm
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# default authentication information for outgoing connections
|
|
Ryan Haggerty |
e50d1d |
#O DefaultAuthInfo=/etc/mail/default-auth-info
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# SMTP AUTH flags
|
|
Ryan Haggerty |
e50d1d |
#O AuthOptions
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# SMTP AUTH maximum encryption strength
|
|
Ryan Haggerty |
e50d1d |
#O AuthMaxBits
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# SMTP STARTTLS server options
|
|
Ryan Haggerty |
e50d1d |
#O TLSSrvOptions
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# Input mail filters
|
|
Ryan Haggerty |
e50d1d |
#O InputMailFilters
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# CA directory
|
|
Ryan Haggerty |
e50d1d |
#O CACertPath
|
|
Ryan Haggerty |
e50d1d |
# CA file
|
|
Ryan Haggerty |
e50d1d |
#O CACertFile
|
|
Ryan Haggerty |
e50d1d |
# Server Cert
|
|
Ryan Haggerty |
e50d1d |
#O ServerCertFile
|
|
Ryan Haggerty |
e50d1d |
# Server private key
|
|
Ryan Haggerty |
e50d1d |
#O ServerKeyFile
|
|
Ryan Haggerty |
e50d1d |
# Client Cert
|
|
Ryan Haggerty |
e50d1d |
#O ClientCertFile
|
|
Ryan Haggerty |
e50d1d |
# Client private key
|
|
Ryan Haggerty |
e50d1d |
#O ClientKeyFile
|
|
Ryan Haggerty |
e50d1d |
# File containing certificate revocation lists
|
|
Ryan Haggerty |
e50d1d |
#O CRLFile
|
|
Ryan Haggerty |
e50d1d |
# DHParameters (only required if DSA/DH is used)
|
|
Ryan Haggerty |
e50d1d |
#O DHParameters
|
|
Ryan Haggerty |
e50d1d |
# Random data source (required for systems without /dev/urandom under OpenSSL)
|
|
Ryan Haggerty |
e50d1d |
#O RandFile
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
############################
|
|
Ryan Haggerty |
e50d1d |
# QUEUE GROUP DEFINITIONS #
|
|
Ryan Haggerty |
e50d1d |
############################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
###########################
|
|
Ryan Haggerty |
e50d1d |
# Message precedences #
|
|
Ryan Haggerty |
e50d1d |
###########################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
Pfirst-class=0
|
|
Ryan Haggerty |
e50d1d |
Pspecial-delivery=100
|
|
Ryan Haggerty |
e50d1d |
Plist=-30
|
|
Ryan Haggerty |
e50d1d |
Pbulk=-60
|
|
Ryan Haggerty |
e50d1d |
Pjunk=-100
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#####################
|
|
Ryan Haggerty |
e50d1d |
# Trusted users #
|
|
Ryan Haggerty |
e50d1d |
#####################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# this is equivalent to setting class "t"
|
|
Ryan Haggerty |
e50d1d |
Ft/etc/mail/trusted-users
|
|
Ryan Haggerty |
e50d1d |
Troot
|
|
Ryan Haggerty |
e50d1d |
Tdaemon
|
|
Ryan Haggerty |
e50d1d |
Tuucp
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#########################
|
|
Ryan Haggerty |
e50d1d |
# Format of headers #
|
|
Ryan Haggerty |
e50d1d |
#########################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
H?P?Return-Path: <$g>
|
|
Ryan Haggerty |
e50d1d |
HReceived: $?sfrom $s $.$?_($?s$|from $.$_)
|
|
Ryan Haggerty |
e50d1d |
$.$?{auth_type}(authenticated$?{auth_ssf} bits=${auth_ssf}$.)
|
|
Ryan Haggerty |
e50d1d |
$.by $j ($v/$Z)$?r with $r$. id $i$?{tls_version}
|
|
Ryan Haggerty |
e50d1d |
(version=${tls_version} cipher=${cipher} bits=${cipher_bits} verify=${verify})$.$?u
|
|
Ryan Haggerty |
e50d1d |
for $u; $|;
|
|
Ryan Haggerty |
e50d1d |
$.$b
|
|
Ryan Haggerty |
e50d1d |
H?D?Resent-Date: $a
|
|
Ryan Haggerty |
e50d1d |
H?D?Date: $a
|
|
Ryan Haggerty |
e50d1d |
H?F?Resent-From: $?x$x <$g>$|$g$.
|
|
Ryan Haggerty |
e50d1d |
H?F?From: $?x$x <$g>$|$g$.
|
|
Ryan Haggerty |
e50d1d |
H?x?Full-Name: $x
|
|
Ryan Haggerty |
e50d1d |
# HPosted-Date: $a
|
|
Ryan Haggerty |
e50d1d |
# H?l?Received-Date: $b
|
|
Ryan Haggerty |
e50d1d |
H?M?Resent-Message-Id: <$t.$i@$j>
|
|
Ryan Haggerty |
e50d1d |
H?M?Message-Id: <$t.$i@$j>
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
##### REWRITING RULES
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
############################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 3 -- Name Canonicalization ###
|
|
Ryan Haggerty |
e50d1d |
############################################
|
|
Ryan Haggerty |
e50d1d |
Scanonify=3
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# handle null input (translate to <@> special case)
|
|
Ryan Haggerty |
e50d1d |
R$@ $@ <@>
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# strip group: syntax (not inside angle brackets!) and trailing semicolon
|
|
Ryan Haggerty |
e50d1d |
R$* $: $1 <@> mark addresses
|
|
Ryan Haggerty |
e50d1d |
R$* < $* > $* <@> $: $1 < $2 > $3 unmark <addr>
|
|
Ryan Haggerty |
e50d1d |
R@ $* <@> $: @ $1 unmark @host:...
|
|
Ryan Haggerty |
e50d1d |
R$* [ IPv6 : $+ ] <@> $: $1 [ IPv6 : $2 ] unmark IPv6 addr
|
|
Ryan Haggerty |
e50d1d |
R$* :: $* <@> $: $1 :: $2 unmark node::addr
|
|
Ryan Haggerty |
e50d1d |
R:include: $* <@> $: :include: $1 unmark :include:...
|
|
Ryan Haggerty |
e50d1d |
R$* : $* [ $* ] $: $1 : $2 [ $3 ] <@> remark if leading colon
|
|
Ryan Haggerty |
e50d1d |
R$* : $* <@> $: $2 strip colon if marked
|
|
Ryan Haggerty |
e50d1d |
R$* <@> $: $1 unmark
|
|
Ryan Haggerty |
e50d1d |
R$* ; $1 strip trailing semi
|
|
Ryan Haggerty |
e50d1d |
R$* < $+ :; > $* $@ $2 :; <@> catch <list:;>
|
|
Ryan Haggerty |
e50d1d |
R$* < $* ; > $1 < $2 > bogus bracketed semi
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# null input now results from list:; syntax
|
|
Ryan Haggerty |
e50d1d |
R$@ $@ :; <@>
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# strip angle brackets -- note RFC733 heuristic to get innermost item
|
|
Ryan Haggerty |
e50d1d |
R$* $: < $1 > housekeeping <>
|
|
Ryan Haggerty |
e50d1d |
R$+ < $* > < $2 > strip excess on left
|
|
Ryan Haggerty |
e50d1d |
R< $* > $+ < $1 > strip excess on right
|
|
Ryan Haggerty |
e50d1d |
R<> $@ < @ > MAIL FROM:<> case
|
|
Ryan Haggerty |
e50d1d |
R< $+ > $: $1 remove housekeeping <>
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# strip route address <@a,@b,@c:user@d> -> <user@d>
|
|
Ryan Haggerty |
e50d1d |
R@ $+ , $+ $2
|
|
Ryan Haggerty |
e50d1d |
R@ [ $* ] : $+ $2
|
|
Ryan Haggerty |
e50d1d |
R@ $+ : $+ $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# find focus for list syntax
|
|
Ryan Haggerty |
e50d1d |
R $+ : $* ; @ $+ $@ $>Canonify2 $1 : $2 ; < @ $3 > list syntax
|
|
Ryan Haggerty |
e50d1d |
R $+ : $* ; $@ $1 : $2; list syntax
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# find focus for @ syntax addresses
|
|
Ryan Haggerty |
e50d1d |
R$+ @ $+ $: $1 < @ $2 > focus on domain
|
|
Ryan Haggerty |
e50d1d |
R$+ < $+ @ $+ > $1 $2 < @ $3 > move gaze right
|
|
Ryan Haggerty |
e50d1d |
R$+ < @ $+ > $@ $>Canonify2 $1 < @ $2 > already canonical
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# convert old-style addresses to a domain-based address
|
|
Ryan Haggerty |
e50d1d |
R$- ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP > resolve uucp names
|
|
Ryan Haggerty |
e50d1d |
R$+ . $- ! $+ $@ $>Canonify2 $3 < @ $1 . $2 > domain uucps
|
|
Ryan Haggerty |
e50d1d |
R$+ ! $+ $@ $>Canonify2 $2 < @ $1 .UUCP > uucp subdomains
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# convert node::user addresses into a domain-based address
|
|
Ryan Haggerty |
e50d1d |
R$- :: $+ $@ $>Canonify2 $2 < @ $1 .DECNET > resolve DECnet names
|
|
Ryan Haggerty |
e50d1d |
R$- . $- :: $+ $@ $>Canonify2 $3 < @ $1.$2 .DECNET > numeric DECnet addr
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# if we have % signs, take the rightmost one
|
|
Ryan Haggerty |
e50d1d |
R$* % $* $1 @ $2 First make them all @s.
|
|
Ryan Haggerty |
e50d1d |
R$* @ $* @ $* $1 % $2 @ $3 Undo all but the last.
|
|
Ryan Haggerty |
e50d1d |
R$* @ $* $@ $>Canonify2 $1 < @ $2 > Insert < > and finish
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# else we must be a local name
|
|
Ryan Haggerty |
e50d1d |
R$* $@ $>Canonify2 $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
################################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 96 -- bottom half of ruleset 3 ###
|
|
Ryan Haggerty |
e50d1d |
################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SCanonify2=96
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# handle special cases for local names
|
|
Ryan Haggerty |
e50d1d |
R$* < @ localhost > $* $: $1 < @ $j . > $2 no domain at all
|
|
Ryan Haggerty |
e50d1d |
R$* < @ localhost . $m > $* $: $1 < @ $j . > $2 local domain
|
|
Ryan Haggerty |
e50d1d |
R$* < @ localhost . UUCP > $* $: $1 < @ $j . > $2 .UUCP domain
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# check for IPv4/IPv6 domain literal
|
|
Ryan Haggerty |
e50d1d |
R$* < @ [ $+ ] > $* $: $1 < @@ [ $2 ] > $3 mark [addr]
|
|
Ryan Haggerty |
e50d1d |
R$* < @@ $=w > $* $: $1 < @ $j . > $3 self-literal
|
|
Ryan Haggerty |
e50d1d |
R$* < @@ $+ > $* $@ $1 < @ $2 > $3 canon IP addr
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# if really UUCP, handle it immediately
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# try UUCP traffic as a local address
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $+ . UUCP > $* $: $1 < @ $[ $2 $] . UUCP . > $3
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $+ . . UUCP . > $* $@ $1 < @ $2 . > $3
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# hostnames ending in class P are always canonical
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $* $=P > $* $: $1 < @ $2 $3 . > $4
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $* $~P > $* $: $&{daemon_flags} $| $1 < @ $2 $3 > $4
|
|
Ryan Haggerty |
e50d1d |
R$* CC $* $| $* < @ $+.$+ > $* $: $3 < @ $4.$5 . > $6
|
|
Ryan Haggerty |
e50d1d |
R$* CC $* $| $* $: $3
|
|
Ryan Haggerty |
e50d1d |
# pass to name server to make hostname canonical
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* < @ $* > $* $: $2 < @ $[ $3 $] > $4
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $: $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# local host aliases and pseudo-domains are always canonical
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $=w > $* $: $1 < @ $2 . > $3
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $=M > $* $: $1 < @ $2 . > $3
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $* . . > $* $1 < @ $2 . > $3
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##################################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 4 -- Final Output Post-rewriting ###
|
|
Ryan Haggerty |
e50d1d |
##################################################
|
|
Ryan Haggerty |
e50d1d |
Sfinal=4
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R$+ :; <@> $@ $1 : handle <list:;>
|
|
Ryan Haggerty |
e50d1d |
R$* <@> $@ handle <> and list:;
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# strip trailing dot off possibly canonical name
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $+ . > $* $1 < @ $2 > $3
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# eliminate internal code
|
|
Ryan Haggerty |
e50d1d |
R$* < @ *LOCAL* > $* $1 < @ $j > $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# externalize local domain info
|
|
Ryan Haggerty |
e50d1d |
R$* < $+ > $* $1 $2 $3 defocus
|
|
Ryan Haggerty |
e50d1d |
R@ $+ : @ $+ : $+ @ $1 , @ $2 : $3 <route-addr> canonical
|
|
Ryan Haggerty |
e50d1d |
R@ $* $@ @ $1 ... and exit
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# UUCP must always be presented in old form
|
|
Ryan Haggerty |
e50d1d |
R$+ @ $- . UUCP $2!$1 u@h.UUCP => h!u
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# put DECnet back in :: form
|
|
Ryan Haggerty |
e50d1d |
R$+ @ $+ . DECNET $2 :: $1 u@h.DECNET => h::u
|
|
Ryan Haggerty |
e50d1d |
# delete duplicate local names
|
|
Ryan Haggerty |
e50d1d |
R$+ % $=w @ $=w $1 @ $2 u%host@host => u@host
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##############################################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 97 -- recanonicalize and call ruleset zero ###
|
|
Ryan Haggerty |
e50d1d |
### (used for recursive calls) ###
|
|
Ryan Haggerty |
e50d1d |
##############################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SRecurse=97
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>canonify $1
|
|
Ryan Haggerty |
e50d1d |
R$* $@ $>parse $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 0 -- Parse Address ###
|
|
Ryan Haggerty |
e50d1d |
######################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
Sparse=0
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>Parse0 $1 initial parsing
|
|
Ryan Haggerty |
e50d1d |
R<@> $#local $: <@> special case error msgs
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>ParseLocal $1 handle local hacks
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>Parse1 $1 final parsing
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# Parse0 -- do initial syntax checking and eliminate local addresses.
|
|
Ryan Haggerty |
e50d1d |
# This should either return with the (possibly modified) input
|
|
Ryan Haggerty |
e50d1d |
# or return with a #error mailer. It should not return with a
|
|
Ryan Haggerty |
e50d1d |
# #mailer other than the #error mailer.
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SParse0
|
|
Ryan Haggerty |
e50d1d |
R<@> $@ <@> special case error msgs
|
|
Ryan Haggerty |
e50d1d |
R$* : $* ; <@> $#error $@ 5.1.3 $: "553 List:; syntax illegal for recipient addresses"
|
|
Ryan Haggerty |
e50d1d |
R@ <@ $* > < @ $1 > catch "@@host" bogosity
|
|
Ryan Haggerty |
e50d1d |
R<@ $+> $#error $@ 5.1.3 $: "553 User address required"
|
|
Ryan Haggerty |
e50d1d |
R$+ <@> $#error $@ 5.1.3 $: "553 Hostname required"
|
|
Ryan Haggerty |
e50d1d |
R$* $: <> $1
|
|
Ryan Haggerty |
e50d1d |
R<> $* < @ [ $* ] : $+ > $* $1 < @ [ $2 ] : $3 > $4
|
|
Ryan Haggerty |
e50d1d |
R<> $* < @ [ $* ] , $+ > $* $1 < @ [ $2 ] , $3 > $4
|
|
Ryan Haggerty |
e50d1d |
R<> $* < @ [ $* ] $+ > $* $#error $@ 5.1.2 $: "553 Invalid address"
|
|
Ryan Haggerty |
e50d1d |
R<> $* < @ [ $+ ] > $* $1 < @ [ $2 ] > $3
|
|
Ryan Haggerty |
e50d1d |
R<> $* <$* : $* > $* $#error $@ 5.1.3 $: "553 Colon illegal in host name part"
|
|
Ryan Haggerty |
e50d1d |
R<> $* $1
|
|
Ryan Haggerty |
e50d1d |
R$* < @ . $* > $* $#error $@ 5.1.2 $: "553 Invalid host name"
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $* .. $* > $* $#error $@ 5.1.2 $: "553 Invalid host name"
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $* @ > $* $#error $@ 5.1.2 $: "553 Invalid route address"
|
|
Ryan Haggerty |
e50d1d |
R$* @ $* < @ $* > $* $#error $@ 5.1.3 $: "553 Invalid route address"
|
|
Ryan Haggerty |
e50d1d |
R$* , $~O $* $#error $@ 5.1.3 $: "553 Invalid route address"
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# now delete the local info -- note $=O to find characters that cause forwarding
|
|
Ryan Haggerty |
e50d1d |
R$* < @ > $* $@ $>Parse0 $>canonify $1 user@ => user
|
|
Ryan Haggerty |
e50d1d |
R< @ $=w . > : $* $@ $>Parse0 $>canonify $2 @here:... -> ...
|
|
Ryan Haggerty |
e50d1d |
R$- < @ $=w . > $: $(dequote $1 $) < @ $2 . > dequote "foo"@here
|
|
Ryan Haggerty |
e50d1d |
R< @ $+ > $#error $@ 5.1.3 $: "553 User address required"
|
|
Ryan Haggerty |
e50d1d |
R$* $=O $* < @ $=w . > $@ $>Parse0 $>canonify $1 $2 $3 ...@here -> ...
|
|
Ryan Haggerty |
e50d1d |
R$- $: $(dequote $1 $) < @ *LOCAL* > dequote "foo"
|
|
Ryan Haggerty |
e50d1d |
R< @ *LOCAL* > $#error $@ 5.1.3 $: "553 User address required"
|
|
Ryan Haggerty |
e50d1d |
R$* $=O $* < @ *LOCAL* >
|
|
Ryan Haggerty |
e50d1d |
$@ $>Parse0 $>canonify $1 $2 $3 ...@*LOCAL* -> ...
|
|
Ryan Haggerty |
e50d1d |
R$* < @ *LOCAL* > $: $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# Parse1 -- the bottom half of ruleset 0.
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SParse1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# handle numeric address spec
|
|
Ryan Haggerty |
e50d1d |
R$* < @ [ $+ ] > $* $: $>ParseLocal $1 < @ [ $2 ] > $3 numeric internet spec
|
|
Ryan Haggerty |
e50d1d |
R$* < @ [ $+ ] > $* $: $1 < @ [ $2 ] : $S > $3 Add smart host to path
|
|
Ryan Haggerty |
e50d1d |
R$* < @ [ $+ ] : > $* $#esmtp $@ [$2] $: $1 < @ [$2] > $3 no smarthost: send
|
|
Ryan Haggerty |
e50d1d |
R$* < @ [ $+ ] : $- : $*> $* $#$3 $@ $4 $: $1 < @ [$2] > $5 smarthost with mailer
|
|
Ryan Haggerty |
e50d1d |
R$* < @ [ $+ ] : $+ > $* $#esmtp $@ $3 $: $1 < @ [$2] > $4 smarthost without mailer
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# short circuit local delivery so forwarded email works
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R$=L < @ $=w . > $#local $: @ $1 special local names
|
|
Ryan Haggerty |
e50d1d |
R$+ < @ $=w . > $#local $: $1 regular local name
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# resolve remotely connected UUCP links (if any)
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# resolve fake top level domains by forwarding to other hosts
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# pass names that still have a host to a smarthost (if defined)
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $* > $* $: $>MailerToTriple < $S > $1 < @ $2 > $3 glue on smarthost name
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# deal with other remote names
|
|
Ryan Haggerty |
e50d1d |
R$* < @$* > $* $#esmtp $@ $2 $: $1 < @ $2 > $3 user@host.domain
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# handle locally delivered names
|
|
Ryan Haggerty |
e50d1d |
R$=L $#local $: @ $1 special local names
|
|
Ryan Haggerty |
e50d1d |
R$+ $#local $: $1 regular local names
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
###########################################################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 5 -- special rewriting after aliases have been expanded ###
|
|
Ryan Haggerty |
e50d1d |
###########################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SLocal_localaddr
|
|
Ryan Haggerty |
e50d1d |
Slocaladdr=5
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $1 $| $>"Local_localaddr" $1
|
|
Ryan Haggerty |
e50d1d |
R$+ $| $#ok $@ $1 no change
|
|
Ryan Haggerty |
e50d1d |
R$+ $| $#$* $#$2
|
|
Ryan Haggerty |
e50d1d |
R$+ $| $* $: $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# deal with plussed users so aliases work nicely
|
|
Ryan Haggerty |
e50d1d |
R$+ + * $#local $@ $&h $: $1
|
|
Ryan Haggerty |
e50d1d |
R$+ + $* $#local $@ + $2 $: $1 + *
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# prepend an empty "forward host" on the front
|
|
Ryan Haggerty |
e50d1d |
R$+ $: <> $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R< > $+ $: < > < $1 <> $&h > nope, restore +detail
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R< > < $+ <> + $* > $: < > < $1 + $2 > check whether +detail
|
|
Ryan Haggerty |
e50d1d |
R< > < $+ <> $* > $: < > < $1 > else discard
|
|
Ryan Haggerty |
e50d1d |
R< > < $+ + $* > $* < > < $1 > + $2 $3 find the user part
|
|
Ryan Haggerty |
e50d1d |
R< > < $+ > + $* $#local $@ $2 $: @ $1 strip the extra +
|
|
Ryan Haggerty |
e50d1d |
R< > < $+ > $@ $1 no +detail
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $1 <> $&h add +detail back in
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R$+ <> + $* $: $1 + $2 check whether +detail
|
|
Ryan Haggerty |
e50d1d |
R$+ <> $* $: $1 else discard
|
|
Ryan Haggerty |
e50d1d |
R< local : $* > $* $: $>MailerToTriple < local : $1 > $2 no host extension
|
|
Ryan Haggerty |
e50d1d |
R< error : $* > $* $: $>MailerToTriple < error : $1 > $2 no host extension
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R< $~[ : $+ > $+ $: $>MailerToTriple < $1 : $2 > $3 < @ $2 >
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R< $+ > $+ $@ $>MailerToTriple < $1 > $2 < @ $1 >
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 95 -- canonify mailer:[user@]host syntax to triple ###
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SMailerToTriple=95
|
|
Ryan Haggerty |
e50d1d |
R< > $* $@ $1 strip off null relay
|
|
Ryan Haggerty |
e50d1d |
R< error : $-.$-.$- : $+ > $* $#error $@ $1.$2.$3 $: $4
|
|
Ryan Haggerty |
e50d1d |
R< error : $- : $+ > $* $#error $@ $(dequote $1 $) $: $2
|
|
Ryan Haggerty |
e50d1d |
R< error : $+ > $* $#error $: $1
|
|
Ryan Haggerty |
e50d1d |
R< local : $* > $* $>CanonLocal < $1 > $2
|
|
Ryan Haggerty |
e50d1d |
R< $~[ : $+ @ $+ > $*<$*>$* $# $1 $@ $3 $: $2<@$3> use literal user
|
|
Ryan Haggerty |
e50d1d |
R< $~[ : $+ > $* $# $1 $@ $2 $: $3 try qualified mailer
|
|
Ryan Haggerty |
e50d1d |
R< $=w > $* $@ $2 delete local host
|
|
Ryan Haggerty |
e50d1d |
R< $+ > $* $#relay $@ $1 $: $2 use unqualified mailer
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset CanonLocal -- canonify local: syntax ###
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SCanonLocal
|
|
Ryan Haggerty |
e50d1d |
# strip local host from routed addresses
|
|
Ryan Haggerty |
e50d1d |
R< $* > < @ $+ > : $+ $@ $>Recurse $3
|
|
Ryan Haggerty |
e50d1d |
R< $* > $+ $=O $+ < @ $+ > $@ $>Recurse $2 $3 $4
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# strip trailing dot from any host name that may appear
|
|
Ryan Haggerty |
e50d1d |
R< $* > $* < @ $* . > $: < $1 > $2 < @ $3 >
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# handle local: syntax -- use old user, either with or without host
|
|
Ryan Haggerty |
e50d1d |
R< > $* < @ $* > $* $#local $@ $1@$2 $: $1
|
|
Ryan Haggerty |
e50d1d |
R< > $+ $#local $@ $1 $: $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# handle local:user@host syntax -- ignore host part
|
|
Ryan Haggerty |
e50d1d |
R< $+ @ $+ > $* < @ $* > $: < $1 > $3 < @ $4 >
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# handle local:user syntax
|
|
Ryan Haggerty |
e50d1d |
R< $+ > $* <@ $* > $* $#local $@ $2@$3 $: $1
|
|
Ryan Haggerty |
e50d1d |
R< $+ > $* $#local $@ $2 $: $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 93 -- convert header names to masqueraded form ###
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SMasqHdr=93
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# do not masquerade anything in class N
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $* $=N . > $@ $1 < @ $2 $3 . >
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R$* < @ *LOCAL* > $@ $1 < @ $j . >
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 94 -- convert envelope names to masqueraded form ###
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SMasqEnv=94
|
|
Ryan Haggerty |
e50d1d |
R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
### Ruleset 98 -- local part of ruleset zero (can be null) ###
|
|
Ryan Haggerty |
e50d1d |
###################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SParseLocal=98
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### CanonAddr -- Convert an address into a standard form for
|
|
Ryan Haggerty |
e50d1d |
### relay checking. Route address syntax is
|
|
Ryan Haggerty |
e50d1d |
### crudely converted into a %-hack address.
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameters:
|
|
Ryan Haggerty |
e50d1d |
### $1 -- full recipient address
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Returns:
|
|
Ryan Haggerty |
e50d1d |
### parsed address, not in source route form
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SCanonAddr
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>Parse0 $>canonify $1 make domain canonical
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### ParseRecipient -- Strip off hosts in $=R as well as possibly
|
|
Ryan Haggerty |
e50d1d |
### $* $=m or the access database.
|
|
Ryan Haggerty |
e50d1d |
### Check user portion for host separators.
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameters:
|
|
Ryan Haggerty |
e50d1d |
### $1 -- full recipient address
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Returns:
|
|
Ryan Haggerty |
e50d1d |
### parsed, non-local-relaying address
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SParseRecipient
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>CanonAddr $1
|
|
Ryan Haggerty |
e50d1d |
R $* < @ $* . > $1 < @ $2 > strip trailing dots
|
|
Ryan Haggerty |
e50d1d |
R $- < @ $* > $: $(dequote $1 $) < @ $2 > dequote local part
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# if no $=O character, no host in the user portion, we are done
|
|
Ryan Haggerty |
e50d1d |
R $* $=O $* < @ $* > $: <NO> $1 $2 $3 < @ $4>
|
|
Ryan Haggerty |
e50d1d |
R $* $@ $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R<NO> $* < @ $* $=R > $: <RELAY> $1 < @ $2 $3 >
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R<RELAY> $* < @ $* > $@ $>ParseRecipient $1
|
|
Ryan Haggerty |
e50d1d |
R<$+> $* $@ $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### check_relay -- check hostname/address on SMTP startup
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SLocal_check_relay
|
|
Ryan Haggerty |
e50d1d |
Scheck_relay
|
|
Ryan Haggerty |
e50d1d |
R$* $: $1 $| $>"Local_check_relay" $1
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $| $#$* $#$3
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $| $* $@ $>"Basic_check_relay" $1 $| $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SBasic_check_relay
|
|
Ryan Haggerty |
e50d1d |
# check for deferred delivery mode
|
|
Ryan Haggerty |
e50d1d |
R$* $: < $&{deliveryMode} > $1
|
|
Ryan Haggerty |
e50d1d |
R< d > $* $@ deferred
|
|
Ryan Haggerty |
e50d1d |
R< $* > $* $: $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### check_mail -- check SMTP `MAIL FROM:' command argument
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SLocal_check_mail
|
|
Ryan Haggerty |
e50d1d |
Scheck_mail
|
|
Ryan Haggerty |
e50d1d |
R$* $: $1 $| $>"Local_check_mail" $1
|
|
Ryan Haggerty |
e50d1d |
R$* $| $#$* $#$2
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $@ $>"Basic_check_mail" $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SBasic_check_mail
|
|
Ryan Haggerty |
e50d1d |
# check for deferred delivery mode
|
|
Ryan Haggerty |
e50d1d |
R$* $: < $&{deliveryMode} > $1
|
|
Ryan Haggerty |
e50d1d |
R< d > $* $@ deferred
|
|
Ryan Haggerty |
e50d1d |
R< $* > $* $: $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# authenticated?
|
|
Ryan Haggerty |
e50d1d |
R$* $: $1 $| $>"tls_client" $&{verify} $| MAIL
|
|
Ryan Haggerty |
e50d1d |
R$* $| $#$+ $#$2
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $: $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R<> $@ <OK> we MUST accept <> (RFC 1123)
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $1
|
|
Ryan Haggerty |
e50d1d |
R<$+> $: <@> <$1>
|
|
Ryan Haggerty |
e50d1d |
R$+ $: <@> <$1>
|
|
Ryan Haggerty |
e50d1d |
R$* $: $&{daemon_flags} $| $1
|
|
Ryan Haggerty |
e50d1d |
R$* f $* $| <@> < $* @ $- > $: < ? $&{client_name} > < $3 @ $4 >
|
|
Ryan Haggerty |
e50d1d |
R$* u $* $| <@> < $* > $: < $3 >
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $: $2
|
|
Ryan Haggerty |
e50d1d |
# handle case of @localhost on address
|
|
Ryan Haggerty |
e50d1d |
R<@> < $* @ localhost > $: < ? $&{client_name} > < $1 @ localhost >
|
|
Ryan Haggerty |
e50d1d |
R<@> < $* @ [127.0.0.1] >
|
|
Ryan Haggerty |
e50d1d |
$: < ? $&{client_name} > < $1 @ [127.0.0.1] >
|
|
Ryan Haggerty |
e50d1d |
R<@> < $* @ localhost.$m >
|
|
Ryan Haggerty |
e50d1d |
$: < ? $&{client_name} > < $1 @ localhost.$m >
|
|
Ryan Haggerty |
e50d1d |
R<@> < $* @ localhost.UUCP >
|
|
Ryan Haggerty |
e50d1d |
$: < ? $&{client_name} > < $1 @ localhost.UUCP >
|
|
Ryan Haggerty |
e50d1d |
R<@> $* $: $1 no localhost as domain
|
|
Ryan Haggerty |
e50d1d |
R $* $: $2 local client: ok
|
|
Ryan Haggerty |
e50d1d |
R <$+> $#error $@ 5.5.4 $: "553 Real domain name required for sender address"
|
|
Ryan Haggerty |
e50d1d |
R $* $: $1
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>CanonAddr $1 canonify sender address and mark it
|
|
Ryan Haggerty |
e50d1d |
R $* < @ $+ . > $1 < @ $2 > strip trailing dots
|
|
Ryan Haggerty |
e50d1d |
# handle non-DNS hostnames (*.bitnet, *.decnet, *.uucp, etc)
|
|
Ryan Haggerty |
e50d1d |
R $* < @ $* $=P > $: <OKR> $1 < @ $2 $3 >
|
|
Ryan Haggerty |
e50d1d |
R $* < @ $j > $: <OKR> $1 < @ $j >
|
|
Ryan Haggerty |
e50d1d |
R $* < @ $+ > $: $) > $1 < @ $2 >
|
|
Ryan Haggerty |
e50d1d |
R> $* < @ $+ >
|
|
Ryan Haggerty |
e50d1d |
$: <$2> $3 < @ $4 >
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# handle case of no @domain on address
|
|
Ryan Haggerty |
e50d1d |
R $* $: $&{daemon_flags} $| $1
|
|
Ryan Haggerty |
e50d1d |
R$* u $* $| $* $: <OKR> $3
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $: $2
|
|
Ryan Haggerty |
e50d1d |
R $* $: < ? $&{client_addr} > $1
|
|
Ryan Haggerty |
e50d1d |
R $* $@ <OKR> ...local unqualed ok
|
|
Ryan Haggerty |
e50d1d |
R $* $#error $@ 5.5.4 $: "553 Domain name required for sender address " $&f
|
|
Ryan Haggerty |
e50d1d |
...remote is not
|
|
Ryan Haggerty |
e50d1d |
# check results
|
|
Ryan Haggerty |
e50d1d |
R $* $: @ $1 mark address: nothing known about it
|
|
Ryan Haggerty |
e50d1d |
R<$={ResOk}> $* $@ <OKR> domain ok: stop
|
|
Ryan Haggerty |
e50d1d |
R<TEMP> $* $#error $@ 4.1.8 $: "451 Domain of sender address " $&f " does not resolve"
|
|
Ryan Haggerty |
e50d1d |
R<PERM> $* $#error $@ 5.1.8 $: "553 Domain of sender address " $&f " does not exist"
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### check_rcpt -- check SMTP `RCPT TO:' command argument
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SLocal_check_rcpt
|
|
Ryan Haggerty |
e50d1d |
Scheck_rcpt
|
|
Ryan Haggerty |
e50d1d |
R$* $: $1 $| $>"Local_check_rcpt" $1
|
|
Ryan Haggerty |
e50d1d |
R$* $| $#$* $#$2
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $@ $>"Basic_check_rcpt" $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SBasic_check_rcpt
|
|
Ryan Haggerty |
e50d1d |
# empty address?
|
|
Ryan Haggerty |
e50d1d |
R<> $#error $@ nouser $: "553 User address required"
|
|
Ryan Haggerty |
e50d1d |
R$@ $#error $@ nouser $: "553 User address required"
|
|
Ryan Haggerty |
e50d1d |
# check for deferred delivery mode
|
|
Ryan Haggerty |
e50d1d |
R$* $: < $&{deliveryMode} > $1
|
|
Ryan Haggerty |
e50d1d |
R< d > $* $@ deferred
|
|
Ryan Haggerty |
e50d1d |
R< $* > $* $: $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
R$* $: $1 $| @ $>"Rcpt_ok" $1
|
|
Ryan Haggerty |
e50d1d |
R$* $| @ $#TEMP $+ $: $1 $| T $2
|
|
Ryan Haggerty |
e50d1d |
R$* $| @ $#$* $#$2
|
|
Ryan Haggerty |
e50d1d |
R$* $| @ RELAY $@ RELAY
|
|
Ryan Haggerty |
e50d1d |
R$* $| @ $* $: O $| $>"Relay_ok" $1
|
|
Ryan Haggerty |
e50d1d |
R$* $| T $+ $: T $2 $| $>"Relay_ok" $1
|
|
Ryan Haggerty |
e50d1d |
R$* $| $#TEMP $+ $#error $2
|
|
Ryan Haggerty |
e50d1d |
R$* $| $#$* $#$2
|
|
Ryan Haggerty |
e50d1d |
R$* $| RELAY $@ RELAY
|
|
Ryan Haggerty |
e50d1d |
R T $+ $| $* $#error $1
|
|
Ryan Haggerty |
e50d1d |
# anything else is bogus
|
|
Ryan Haggerty |
e50d1d |
R$* $#error $@ 5.7.1 $: "550 Relaying denied"
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### Rcpt_ok: is the recipient ok?
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
SRcpt_ok
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>ParseRecipient $1 strip relayable hosts
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# authenticated via TLS?
|
|
Ryan Haggerty |
e50d1d |
R$* $: $1 $| $>RelayTLS client authenticated?
|
|
Ryan Haggerty |
e50d1d |
R$* $| $# $+ $# $2 error/ok?
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $: $1 no
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
R$* $: $1 $| $>"Local_Relay_Auth" $&{auth_type}
|
|
Ryan Haggerty |
e50d1d |
R$* $| $# $* $# $2
|
|
Ryan Haggerty |
e50d1d |
R$* $| NO $: $1
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $: $1 $| $&{auth_type}
|
|
Ryan Haggerty |
e50d1d |
R$* $| $: $1
|
|
Ryan Haggerty |
e50d1d |
R$* $| $={TrustAuthMech} $# RELAY
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $: $1
|
|
Ryan Haggerty |
e50d1d |
# anything terminating locally is ok
|
|
Ryan Haggerty |
e50d1d |
R$+ < @ $=w > $@ RELAY
|
|
Ryan Haggerty |
e50d1d |
R$+ < @ $* $=R > $@ RELAY
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# check for local user (i.e. unqualified address)
|
|
Ryan Haggerty |
e50d1d |
R$* $: $1
|
|
Ryan Haggerty |
e50d1d |
R $* < @ $+ > $: <REMOTE> $1 < @ $2 >
|
|
Ryan Haggerty |
e50d1d |
# local user is ok
|
|
Ryan Haggerty |
e50d1d |
R $+ $@ RELAY
|
|
Ryan Haggerty |
e50d1d |
R<$+> $* $: $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### Relay_ok: is the relay/sender ok?
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
SRelay_ok
|
|
Ryan Haggerty |
e50d1d |
# anything originating locally is ok
|
|
Ryan Haggerty |
e50d1d |
# check IP address
|
|
Ryan Haggerty |
e50d1d |
R$* $: $&{client_addr}
|
|
Ryan Haggerty |
e50d1d |
R$@ $@ RELAY originated locally
|
|
Ryan Haggerty |
e50d1d |
R0 $@ RELAY originated locally
|
|
Ryan Haggerty |
e50d1d |
R127.0.0.1 $@ RELAY originated locally
|
|
Ryan Haggerty |
e50d1d |
RIPv6:::1 $@ RELAY originated locally
|
|
Ryan Haggerty |
e50d1d |
R$=R $* $@ RELAY relayable IP address
|
|
Ryan Haggerty |
e50d1d |
R$* $: [ $1 ] put brackets around it...
|
|
Ryan Haggerty |
e50d1d |
R$=w $@ RELAY ... and see if it is local
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# check client name: first: did it resolve?
|
|
Ryan Haggerty |
e50d1d |
R$* $: < $&{client_resolve} >
|
|
Ryan Haggerty |
e50d1d |
R<TEMP> $#TEMP $@ 4.4.0 $: "450 Relaying temporarily denied. Cannot resolve PTR record for " $&{client_addr}
|
|
Ryan Haggerty |
e50d1d |
R<FORGED> $#error $@ 5.7.1 $: "550 Relaying denied. IP name possibly forged " $&{client_name}
|
|
Ryan Haggerty |
e50d1d |
R<FAIL> $#error $@ 5.7.1 $: "550 Relaying denied. IP name lookup failed " $&{client_name}
|
|
Ryan Haggerty |
e50d1d |
R$* $: <@> $&{client_name}
|
|
Ryan Haggerty |
e50d1d |
# pass to name server to make hostname canonical
|
|
Ryan Haggerty |
e50d1d |
R<@> $* $=P $: $1 $2
|
|
Ryan Haggerty |
e50d1d |
R<@> $+ $: $[ $1 $]
|
|
Ryan Haggerty |
e50d1d |
R$* . $1 strip trailing dots
|
|
Ryan Haggerty |
e50d1d |
R $=w $@ RELAY
|
|
Ryan Haggerty |
e50d1d |
R $* $=R $@ RELAY
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### trust_auth: is user trusted to authenticate as someone else?
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameters:
|
|
Ryan Haggerty |
e50d1d |
### $1: AUTH= parameter from MAIL command
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SLocal_trust_auth
|
|
Ryan Haggerty |
e50d1d |
Strust_auth
|
|
Ryan Haggerty |
e50d1d |
R$* $: $&{auth_type} $| $1
|
|
Ryan Haggerty |
e50d1d |
# required by RFC 2554 section 4.
|
|
Ryan Haggerty |
e50d1d |
R$@ $| $* $#error $@ 5.7.1 $: "550 not authenticated"
|
|
Ryan Haggerty |
e50d1d |
R$* $| $&{auth_authen} $@ identical
|
|
Ryan Haggerty |
e50d1d |
R$* $| <$&{auth_authen}> $@ identical
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $: $1 $| $>"Local_trust_auth" $2
|
|
Ryan Haggerty |
e50d1d |
R$* $| $#$* $#$2
|
|
Ryan Haggerty |
e50d1d |
R$* $#error $@ 5.7.1 $: "550 " $&{auth_authen} " not allowed to act as " $&{auth_author}
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### Relay_Auth: allow relaying based on authentication?
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameters:
|
|
Ryan Haggerty |
e50d1d |
### $1: ${auth_type}
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
SLocal_Relay_Auth
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### srv_features: which features to offer to a client?
|
|
Ryan Haggerty |
e50d1d |
### (done in server)
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
Ssrv_features
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### try_tls: try to use STARTTLS?
|
|
Ryan Haggerty |
e50d1d |
### (done in client)
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
Stry_tls
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### tls_rcpt: is connection with server "good" enough?
|
|
Ryan Haggerty |
e50d1d |
### (done in client, per recipient)
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameters:
|
|
Ryan Haggerty |
e50d1d |
### $1: recipient
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
Stls_rcpt
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### tls_client: is connection with client "good" enough?
|
|
Ryan Haggerty |
e50d1d |
### (done in server)
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameters:
|
|
Ryan Haggerty |
e50d1d |
### ${verify} $| (MAIL|STARTTLS)
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
Stls_client
|
|
Ryan Haggerty |
e50d1d |
R$* $| $* $@ $>"TLS_connection" $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### tls_server: is connection with server "good" enough?
|
|
Ryan Haggerty |
e50d1d |
### (done in client)
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameter:
|
|
Ryan Haggerty |
e50d1d |
### ${verify}
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
Stls_server
|
|
Ryan Haggerty |
e50d1d |
R$* $@ $>"TLS_connection" $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### TLS_connection: is TLS connection "good" enough?
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameters:
|
|
Ryan Haggerty |
e50d1d |
### ${verify}
|
|
Ryan Haggerty |
e50d1d |
### Requirement: RHS from access map, may be ? for none.
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
STLS_connection
|
|
Ryan Haggerty |
e50d1d |
RSOFTWARE $#error $@ 4.7.0 $: "403 TLS handshake."
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### RelayTLS: allow relaying based on TLS authentication
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameters:
|
|
Ryan Haggerty |
e50d1d |
### none
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
SRelayTLS
|
|
Ryan Haggerty |
e50d1d |
# authenticated?
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
### authinfo: lookup authinfo in the access map
|
|
Ryan Haggerty |
e50d1d |
###
|
|
Ryan Haggerty |
e50d1d |
### Parameters:
|
|
Ryan Haggerty |
e50d1d |
### $1: {server_name}
|
|
Ryan Haggerty |
e50d1d |
### $2: {server_addr}
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
Sauthinfo
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
SLocal_localaddr
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>ParseRecipient $1
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $+ > $* $#relay $@ ${MTAHost} $: $1 < @ $2 > $3
|
|
Ryan Haggerty |
e50d1d |
# DECnet
|
|
Ryan Haggerty |
e50d1d |
R$+ :: $+ $#relay $@ ${MTAHost} $: $1 :: $2
|
|
Ryan Haggerty |
e50d1d |
R$* $#relay $@ ${MTAHost} $: $1 < @ $j >
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
##### MAIL FILTER DEFINITIONS
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
##### MAILER DEFINITIONS
|
|
Ryan Haggerty |
e50d1d |
#####
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
######################################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##################################################
|
|
Ryan Haggerty |
e50d1d |
### Local and Program Mailer specification ###
|
|
Ryan Haggerty |
e50d1d |
##################################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##### $Id: local.m4,v 8.59 2004/11/23 00:37:25 ca Exp $ #####
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# Envelope sender rewriting
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SEnvFromL
|
|
Ryan Haggerty |
e50d1d |
R<@> $n errors to mailer-daemon
|
|
Ryan Haggerty |
e50d1d |
R@ <@ $*> $n temporarily bypass Sun bogosity
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>AddDomain $1 add local domain if needed
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>MasqEnv $1 do masquerading
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# Envelope recipient rewriting
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SEnvToL
|
|
Ryan Haggerty |
e50d1d |
R$+ < @ $* > $: $1 strip host part
|
|
Ryan Haggerty |
e50d1d |
R$+ + $* $: < $&{addr_type} > $1 + $2 mark with addr type
|
|
Ryan Haggerty |
e50d1d |
R<e s> $+ + $* $: $1 remove +detail for sender
|
|
Ryan Haggerty |
e50d1d |
R< $* > $+ $: $2 else remove mark
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# Header sender rewriting
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SHdrFromL
|
|
Ryan Haggerty |
e50d1d |
R<@> $n errors to mailer-daemon
|
|
Ryan Haggerty |
e50d1d |
R@ <@ $*> $n temporarily bypass Sun bogosity
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>AddDomain $1 add local domain if needed
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>MasqHdr $1 do masquerading
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# Header recipient rewriting
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SHdrToL
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>AddDomain $1 add local domain if needed
|
|
Ryan Haggerty |
e50d1d |
R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# Common code to add local domain name (only if always-add-domain)
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SAddDomain
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
Mlocal, P=[IPC], F=lmDFMuXkw5, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL,
|
|
Ryan Haggerty |
e50d1d |
T=DNS/RFC822/SMTP,
|
|
Ryan Haggerty |
e50d1d |
A=TCP $h
|
|
Ryan Haggerty |
e50d1d |
Mprog, P=[IPC], F=lmDFMuXk5, S=EnvFromL/HdrFromL, R=EnvToL/HdrToL, D=$z:/,
|
|
Ryan Haggerty |
e50d1d |
T=X-Unix/X-Unix/X-Unix,
|
|
Ryan Haggerty |
e50d1d |
A=TCP $h
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#####################################
|
|
Ryan Haggerty |
e50d1d |
### SMTP Mailer specification ###
|
|
Ryan Haggerty |
e50d1d |
#####################################
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
##### $Id: smtp.m4,v 8.64 2001/04/03 01:52:54 gshapiro Exp $ #####
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# common sender and masquerading recipient rewriting
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SMasqSMTP
|
|
Ryan Haggerty |
e50d1d |
R$* < @ $* > $* $@ $1 < @ $2 > $3 already fully qualified
|
|
Ryan Haggerty |
e50d1d |
R$+ $@ $1 < @ *LOCAL* > add local qualification
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# convert pseudo-domain addresses to real domain addresses
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SPseudoToReal
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# pass <route-addr>s through
|
|
Ryan Haggerty |
e50d1d |
R< @ $+ > $* $@ < @ $1 > $2 resolve <route-addr>
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# output fake domains as user%fake@relay
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# do UUCP heuristics; note that these are shared with UUCP mailers
|
|
Ryan Haggerty |
e50d1d |
R$+ < @ $+ .UUCP. > $: < $2 ! > $1 convert to UUCP form
|
|
Ryan Haggerty |
e50d1d |
R$+ < @ $* > $* $@ $1 < @ $2 > $3 not UUCP form
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# leave these in .UUCP form to avoid further tampering
|
|
Ryan Haggerty |
e50d1d |
R< $&h ! > $- ! $+ $@ $2 < @ $1 .UUCP. >
|
|
Ryan Haggerty |
e50d1d |
R< $&h ! > $-.$+ ! $+ $@ $3 < @ $1.$2 >
|
|
Ryan Haggerty |
e50d1d |
R< $&h ! > $+ $@ $1 < @ $&h .UUCP. >
|
|
Ryan Haggerty |
e50d1d |
R< $+ ! > $+ $: $1 ! $2 < @ $Y > use UUCP_RELAY
|
|
Ryan Haggerty |
e50d1d |
R$+ < @ $~[ $* : $+ > $@ $1 < @ $4 > strip mailer: part
|
|
Ryan Haggerty |
e50d1d |
R$+ < @ > $: $1 < @ *LOCAL* > if no UUCP_RELAY
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# envelope sender rewriting
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SEnvFromSMTP
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>PseudoToReal $1 sender/recipient common
|
|
Ryan Haggerty |
e50d1d |
R$* :; <@> $@ list:; special case
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>MasqSMTP $1 qualify unqual'ed names
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>MasqEnv $1 do masquerading
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# envelope recipient rewriting --
|
|
Ryan Haggerty |
e50d1d |
# also header recipient if not masquerading recipients
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SEnvToSMTP
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>PseudoToReal $1 sender/recipient common
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>MasqSMTP $1 qualify unqual'ed names
|
|
Ryan Haggerty |
e50d1d |
R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# header sender and masquerading header recipient rewriting
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SHdrFromSMTP
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>PseudoToReal $1 sender/recipient common
|
|
Ryan Haggerty |
e50d1d |
R:; <@> $@ list:; special case
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
# do special header rewriting
|
|
Ryan Haggerty |
e50d1d |
R$* <@> $* $@ $1 <@> $2 pass null host through
|
|
Ryan Haggerty |
e50d1d |
R< @ $* > $* $@ < @ $1 > $2 pass route-addr through
|
|
Ryan Haggerty |
e50d1d |
R$* $: $>MasqSMTP $1 qualify unqual'ed names
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>MasqHdr $1 do masquerading
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# relay mailer header masquerading recipient rewriting
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
SMasqRelay
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>MasqSMTP $1
|
|
Ryan Haggerty |
e50d1d |
R$+ $: $>MasqHdr $1
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
Msmtp, P=[IPC], F=mDFMuXk5, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
|
|
Ryan Haggerty |
e50d1d |
T=DNS/RFC822/SMTP,
|
|
Ryan Haggerty |
e50d1d |
A=TCP $h
|
|
Ryan Haggerty |
e50d1d |
Mesmtp, P=[IPC], F=mDFMuXak5, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
|
|
Ryan Haggerty |
e50d1d |
T=DNS/RFC822/SMTP,
|
|
Ryan Haggerty |
e50d1d |
A=TCP $h
|
|
Ryan Haggerty |
e50d1d |
Msmtp8, P=[IPC], F=mDFMuX8k5, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
|
|
Ryan Haggerty |
e50d1d |
T=DNS/RFC822/SMTP,
|
|
Ryan Haggerty |
e50d1d |
A=TCP $h
|
|
Ryan Haggerty |
e50d1d |
Mdsmtp, P=[IPC], F=mDFMuXa%k5, S=EnvFromSMTP/HdrFromSMTP, R=EnvToSMTP, E=\r\n, L=990,
|
|
Ryan Haggerty |
e50d1d |
T=DNS/RFC822/SMTP,
|
|
Ryan Haggerty |
e50d1d |
A=TCP $h
|
|
Ryan Haggerty |
e50d1d |
Mrelay, P=[IPC], F=mDFMuXa8k, S=EnvFromSMTP/HdrFromSMTP, R=MasqSMTP, E=\r\n, L=2040,
|
|
Ryan Haggerty |
e50d1d |
T=DNS/RFC822/SMTP,
|
|
Ryan Haggerty |
e50d1d |
A=TCP $h
|
|
Ryan Haggerty |
e50d1d |
|
|
Ryan Haggerty |
e50d1d |
### submit.mc ###
|
|
Ryan Haggerty |
e50d1d |
# divert(-1)
|
|
Ryan Haggerty |
e50d1d |
# #
|
|
Ryan Haggerty |
e50d1d |
# # Copyright (c) 2001-2003 Sendmail, Inc. and its suppliers.
|
|
Ryan Haggerty |
e50d1d |
# # All rights reserved.
|
|
Ryan Haggerty |
e50d1d |
# #
|
|
Ryan Haggerty |
e50d1d |
# # By using this file, you agree to the terms and conditions set
|
|
Ryan Haggerty |
e50d1d |
# # forth in the LICENSE file which can be found at the top level of
|
|
Ryan Haggerty |
e50d1d |
# # the sendmail distribution.
|
|
Ryan Haggerty |
e50d1d |
# #
|
|
Ryan Haggerty |
e50d1d |
# #
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# #
|
|
Ryan Haggerty |
e50d1d |
# # This is the prototype file for a set-group-ID sm-msp sendmail that
|
|
Ryan Haggerty |
e50d1d |
# # acts as a initial mail submission program.
|
|
Ryan Haggerty |
e50d1d |
# #
|
|
Ryan Haggerty |
e50d1d |
#
|
|
Ryan Haggerty |
e50d1d |
# divert(0)dnl
|
|
Ryan Haggerty |
e50d1d |
# include(`/usr/share/sendmail-cf/m4/cf.m4')
|
|
Ryan Haggerty |
e50d1d |
# VERSIONID(`linux setup for Red Hat Linux')dnl
|
|
Ryan Haggerty |
e50d1d |
# define(`confCF_VERSION', `Submit')dnl
|
|
Ryan Haggerty |
e50d1d |
# define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining
|
|
Ryan Haggerty |
e50d1d |
# define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet
|
|
Ryan Haggerty |
e50d1d |
# define(`confTIME_ZONE', `USE_TZ')dnl
|
|
Ryan Haggerty |
e50d1d |
# define(`confDONT_INIT_GROUPS', `True')dnl
|
|
Ryan Haggerty |
e50d1d |
# define(`confPID_FILE', `/var/run/sm-client.pid')dnl
|
|
Ryan Haggerty |
e50d1d |
# dnl define(`confDIRECT_SUBMISSION_MODIFIERS',`C')
|
|
Ryan Haggerty |
e50d1d |
# FEATURE(`use_ct_file')dnl
|
|
Ryan Haggerty |
e50d1d |
# dnl
|
|
Ryan Haggerty |
e50d1d |
# dnl If you use IPv6 only, change [127.0.0.1] to [IPv6:::1]
|
|
Ryan Haggerty |
e50d1d |
# FEATURE(`msp', `[127.0.0.1]')dnl
|