# local - deliver mail to local users
#
# By default, smail will append directly to user mailbox files.
#
local:	driver=appendfile,		# append message to a file
	return_path,			# include a Return-Path: field
	from,				# supply a From_ envelope line
	unix_from_hack,			# insert > before From in body
					# comment out the above line for
					# MMDF mailbox format and for
					# use with the Content-Length
					# header fields.
	local;				# use local forms for delivery

	file=/usr/spool/mail/${lc:user}, # location of mailbox files
	mode=0600,			# For BSD: only the user can
					# read and write file
	suffix="\n",			# append an extra newline
					# comment out the above line for
					# MMDF mailbox format and for
					# use with the Content-Length
					# header fields.
	notify_comsat,			# notify comsat daemon of delivery

# pipe - deliver mail to shell commands
#
# This is used implicitly when smail encounters addresses which begin with
# a vertical bar character, such as "|/usr/lib/news/recnews talk.bizarre".
# The vertical bar is removed from the address before being given to the
# transport.
pipe:	driver=pipe,			# pipe message to another program
	return_path,			# include a Return-Path: field
	from,				# supply a From_ envelope line
	unix_from_hack,			# insert > before From in body
					# comment out the above line for
					# use with the Content-Length
					# header fields.
	local;				# use local forms for delivery

	cmd="/bin/sh -c $user",	# send address to the Bourne Shell
	parent_env,			# environment info from parent addr
	pipe_as_user,			# use user-id associated with address
	ignore_status,			# ignore a non-zero exit status
	ignore_write_errors,		# ignore write errors, i.e., broken pipe
	umask=0022,			# umask for child process
	-log_output,			# do not log stdout/stderr

# file - deliver mail to files
#
# This is used implicitly when smail encounters addresses which begin with
# a slash or squiggle character, such as "/usr/info/list_messages" or
# perhaps "~/Mail/inbox".
file:	driver=appendfile,
	return_path,			# include a Return-Path: field
	from,				# supply a From_ envelope line
	unix_from_hack,			# insert > before From in body
					# comment out the above line for
					# MMDF mailbox format and for
					# use with the Content-Length
					# header fields.
	local;				# use local forms for delivery

	file=$user,			# file is taken from address
	append_as_user,			# use user-id associated with address
	expand_user,			# expand ~ and $ within address
	suffix="\n",			# append an extra newline
					# comment out the above line for
					# MMDF mailbox format and for
					# use with the Content-Length
					# header fields.
	mode=0644,			# you may wish to change this
					# mode, depending upon local
					# conventions and preferences

# smtp - deliver using SMTP over TCP/IP
#
# The below four drivers are configured in only if your system supports
# BSD socket networking.
#
# Connect to a remote host using TCP/IP and initiate an SMTP conversation
# to deliver the message.  The smtp transport is included only if BSD
# networking exists.
#
# The uucp attribute can be specified for transfers within the UUCP
# zone.  The inet attribute must be specified for transfers within the
# Internet.
#
# NOTE:	This is hardly optimal, a backend should exist which can handle
#	multiple messages per connection.
#
# ALSO:	It may be necessary to restrict max_addrs to 100, as this is the
#	lower limit SMTP requires an implementation to handle for one
#	message.
smtp:	driver=tcpsmtp,
	inet,			
	return_path,
	remove_header="From",
	append_header="From: oreillym@tartarus.uwa.edu.au",
	-received,
	-max_addrs, -max_chars;		# no limit on number of addresses
	short_timeout=5m,		# timeout for short operations
	long_timeout=2h,		# timeout for longer SMTP operations
	service=smtp,			# connect to this service port
# For internet use: uncomment the below 4 lines
#	use_bind,			# resolve MX and multiple A records
#	defnames,			# use standard domain searching
#	defer_no_connect,		# try again if the nameserver is down
#	-local_mx_okay,			# fail an MX to the local host

uucp_zone_smtp:
	driver=tcpsmtp,
	uucp,				# use !-style addresses for routing
	-max_addrs, -max_chars;		# no limit on number of addresses

	short_timeout=5m,		# timeout for short operations
	long_timeout=2h,		# timeout for longer SMTP operations
	service=smtp,			# connect to this service port
# For internet use: uncomment the below 4 lines
#	use_bind,			# resolve MX and multiple A records
#	defnames,			# use standard domain searching
#	defer_no_connect,		# try again if the nameserver is down
#	-local_mx_okay,			# fail an MX to the local host

inet_zone_smtp:
	driver=tcpsmtp,
	inet,				# use route-addr addresses for routing
	-max_addrs, -max_chars;		# no limit on number of addresses

	short_timeout=5m,		# timeout for short operations
	long_timeout=2h,		# timeout for longer SMTP operations
	service=smtp,			# connect to this service port
# For internet use: uncomment the below 4 lines
#	use_bind,			# resolve MX and multiple A records
#	defnames,			# use standard domain searching
#	defer_no_connect,		# try again if the nameserver is down
#	-local_mx_okay,			# fail an MX to the local host

local_smtp:
	driver=tcpsmtp,
	local_xform,			# transfer using local formats
	-max_addrs, -max_chars;		# no limit on number of addresses

	short_timeout=5m,		# timeout for short operations
	long_timeout=2h,		# timeout for longer SMTP operations
	service=smtp,			# connect to this service port
# For internet use: uncomment the below 4 lines
#	use_bind,			# resolve MX and multiple A records
#	defnames,			# use standard domain searching
#	defer_no_connect,		# try again if the nameserver is down
#	-local_mx_okay,			# fail an MX to the local host

# local_* - local forms for all of the remote transport entries
#
# Local format transports are useful when transferring mail messsages
# within coordinated networks that all run Smail3.1.  When the local
# attribute is enabled for a transport that delivers messages to a
# remote machine, any local addresses in the header or envelope of the
# message are left as local-format addresses, and the sender is left
# as a local login name.
#
# This convention for message tranfers allows local networks to be
# hidden by the common mail users and by users external to the
# network.  Messages transferred to remote nodes in the network will
# appear as though they originated on the receiving node.  Messages
# that eventually leave the network (and are thus delivered by a
# transport that does not have the local attribute set) will be
# transformed into remote-format messages, with qualified domain names
# for all local-format addresses.
#
# This can be very convenient for networks that have a central mail
# processor that handles all mailing lists and forwarding for the
# network, and where user names are kept coordinated throughout the
# network.
#
# HDB UUCP users should comment out the first cmd= line below, and
# uncomment the second.
local_uux:
	driver=pipe,
	local_xform,			# transfer using local message format
	uucp,				# use uucp-conformant addresses
	from,				# supply a From_ envelope line
	max_addrs=5,			# at most 5 addresses per invocation
	max_chars=200;			# at most 200 chars of addresses

	# the -r flag prevents immediate delivery, parentheses around the
	# $user variable prevent special interpretation by uux.
	cmd="/usr/bin/uux - -r $host!rmail $(($user)$)",
	#cmd="/usr/bin/uux - -r -a$sender -g$grade $host!rmail $(($user)$)",
	pipe_as_sender,			# have uucp logs contain caller
	log_output,			# save error output for bounce messages
#	defer_child_errors,		# retry if uux returns an error

# HDB UUCP users should comment out the first cmd= line below, and
# uncomment the second.
local_demand:
	driver=pipe,
	local_xform,			# transfer using local formats
	uucp,				# use uucp-conformant addresses
	from,				# supply a From_ envelope line
	max_addrs=5,			# at most 5 addresses per invocation
	max_chars=200;			# at most 200 chars of addresses

	# with no -r flag, try to contact remote site immediately
	cmd="/usr/bin/uux - $host!rmail $(($user)$)",
	#cmd="/usr/bin/uux - -a$sender -g$grade $host!rmail $(($user)$)",
	pipe_as_sender,			# have uucp logs contain caller
	log_output,			# save error output for bounce messages
#	defer_child_errors,		# retry if uux returns an error

# HDB UUCP users should comment out the first cmd= line below, and
# uncomment the second.
local_uusmtp:
	driver=pipe,
	local_xform,			# transfer using local formats
	bsmtp,				# send batched SMTP commands
	-max_addrs, -max_chars;		# no limit on number of addresses

	# supply -r to prevent immedate delivery, the recipient addresses
	# are stored in the data sent to the standard input of rsmtp.
	cmd="/usr/bin/uux - -r $host!rsmtp",
	#cmd="/usr/bin/uux - -r -a$sender -g$grade $host!rsmtp",
	pipe_as_sender,			# have uucp logs contain caller
	log_output,			# save error output for bounce messages
#	defer_child_errors,		# retry if uux returns an error

# HDB UUCP users should comment out the first cmd= line below, and
# uncomment the second.
local_demand_uusmtp:
	driver=pipe,
	local_xform,			# transfer using local formats
	bsmtp,				# send batched SMTP commands
	-max_addrs, -max_chars;		# no limit on number of addresses

	# with no -r flag, try to contact remote site immediately
	cmd="/usr/bin/uux - $host!rsmtp",
	#cmd="/usr/bin/uux - -a$sender -g$grade $host!rsmtp",
	pipe_as_sender,			# have uucp logs contain caller
	log_output,			# save error output for bounce messages
#	defer_child_errors,		# retry if uux returns an error
