# local - deliver mail to local users
#
# By default, smail will append directly to user mailbox files.
#
# IMPORTANT FOR SYSTEM V AND SCO USERS
#
# comment out the mode=0600 line below, and uncomment the mode=0660
# line, to get the correct mailbox file permissions for your system.
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.
# SVR4 mailbox format: uncomment the below 3 lines
#	remove_header="Content-Length",
#	append_header="${if !header:Content-Type :Content-Type: text}",
#	append_header="Content-Length: $body_size",
	local;				# use local forms for delivery

	file=/usr/spool/mail/${lc:user}, # location of mailbox files
#	file=/usr/mail/${lc:user},	# use this location for System V
#	group=mail,			# group to own file for System V
	mode=0600,			# For BSD: only the user can
					# read and write file
#	mode=0660,			# under System V, group mail can access
					# use this for SCO UNIX, as well
#	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
	suffix="\1\1\1\1\n",		# MMDF mailbox format
	prefix="\1\1\1\1\n",		# MMDF mailbox format

# local - an alternate local transport that calls on /bin/lmail
#
# Some systems have special local conventions for mail delivery that
# smail does not understand.  Such conventions may include adding
# special headers, or may include particular locking conventions.  For
# such systems, smail can use a system-provided program for delivery
# to user mailbox files.  On most systems, the /bin/mail program will
# perform mail delivery according to local conventions.  However,
# smail will often require that /bin/mail be replaced with a program
# that calls out to smail to perform delivery.  By convention, the
# original /bin/mail program should be saved to /bin/lmail.
#
# It may be necessary to modify this entry to operate within your
# local conventions.
#
# NOTE: If you wish to use this alternate local entry, you must
# comment out the regular local transport entry, and uncomment the
# entry below.
#local:	driver=pipe,			# call out to a program
#	return_path,			# include a Return-Path: field
#	local,				# use local forms for delivery
#	from,				# supply a From_ envelope line
#	-max_addrs;			# give multiple addresses to command
#
#	cmd="/bin/lmail $($user$)"

# 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.
# SVR4 mailbox format: uncomment the below 3 lines
#	remove_header="Content-Length",
#	append_header="${if !header:Content-Type :Content-Type: text}",
#	append_header="Content-Length: $body_size",
	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.
# SVR4 mailbox format: uncomment the below 3 lines
#	remove_header="Content-Length",
#	append_header="${if !header:Content-Type :Content-Type: text}",
#	append_header="Content-Length: $body_size",
	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
	suffix="\1\1\1\1\n",		# MMDF mailbox format
	prefix="\1\1\1\1\n",		# MMDF mailbox format

# uux - deliver to the rmail program on a remote UUCP site
#
# HDB UUCP users should comment out the first cmd= line below, and
# uncomment the second.
uux:	driver=pipe,
	uucp,				# use UUCP-style addressing forms
	from,				# supply a From_ envelope line
	max_addrs=5,			# at most 5 addresses per invocation
#	max_addrs=1,			# use this if some of your neighbors
#					# can't handle multiple addresses
#					# given to their rmail.  You might,
#					# alternately, want to configure
#					# a uux_one_addr transport that
#					# does this.
	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

# demand - deliver to a remote rmail program, polling immediately
#
# HDB UUCP users should comment out the first cmd= line below, and
# uncomment the second.
demand:	driver=pipe,
	uucp,				# use UUCP-style addressing forms
	from,				# supply a From_ envelope line
	max_addrs=5,			# at most 5 addresses per invocation
#	max_addrs=1,			# use this if some of your neighbors
#					# can't handle multiple addresses
#					# given to their rmail.  You might,
#					# alternately, want to configure
#					# a demand_one_addr transport that
#					# does this.
	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

# 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
