
# See smail(5) for a complete description of the contents of this
# file.

# local - deliver mail to local users
#
# Tell smail to append directly to user mailbox files in the /usr/mail
# directory.
local:	driver = appendfile,		# append message to a file
	-return_path,			# include a Return-Path: field
	local,				# use local forms for delivery
	from,				# supply a From_ envelope line
	unix_from_hack;			# insert > before From in body

	file = /usr/spool/mail/${lc:user},	# use this location for Linux
						# Note, mail spool must be 1777
#	file = ~/mailfile,		# use this location for better security
	group = mail,			# group to own file for System V
#	mode = 0660,			# under System V, group mail can access
	suffix = "\n",			# append an extra newline
	append_as_user,
#
#------------------------------------------------------------------------------
# This is an example of how to modify your local transport to use procmail for
# local mail delivery.  This would allow each user to have a ~/.procmailrc
# file to control filtering of mail and saving mail from mail lists in
# separate mailboxes if they wish.  Note: you must obtain and install
# procmail before enabling this!
#
#local:	+inet,
#	-uucp,
#	driver = pipe,			# append message to a file
#	return_path,			# include a Return-Path: field
#	local,				# use local forms for delivery
#	from,				# supply a From_ envelope line
#	unix_from_hack;			# insert > before From in body
#
#	cmd = "/usr/local/bin/procmail", # use procmail for local delivery
#	parent_env,			# environment info from parent addr
#	pipe_as_user,			# use user-id associated with address
#	umask = 0022,			# umask for child process
#	-ignore_status,			# exit status should be believed
#	-ignore_write_errors,		# retry on broken pipes
#------------------------------------------------------------------------------

# 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, local, from, unix_from_hack;

	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
	umask = 0022,			# umask for child process
	-log_output,			# do not log stdout/stderr
	ignore_status,			# exit status may be bogus, ignore it
	ignore_write_errors,		# ignore broken pipes

# 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, local, from, unix_from_hack;

	file = $user,			# file is taken from address
	append_as_user,			# use user-id associated with address
	expand_user,			# expand ~ and $ within address
	check_path,
	suffix = "\n",
	mode = 0644

# uux - deliver to the rmail program on a remote UUCP site
#
# As many as five recipient addresses will be delivered to the remote
# host in one UUCP transaction.
uux:	driver = pipe,
	-uucp,
	inet,
#	uucp,				# use UUCP-style addressing forms
	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 -g$grade $host!rmail $((${strip:user})$)",
#        cmd="/usr/bin/uux - $host!rmail $(($user)$)",
	ignore_write_errors,		# ignore broken pipes
	umask = 0022,
#	pipe_as_sender,


# uux_one_addr - deliver mail over UUCP to a remote host that can take
#		 one address at a time.
#
# This is often necessary when delivering to a site running an unmodified
# version of 4.1BSD.
uux_one_addr:
	driver = pipe,
	uucp,				# use UUCP-style addressing forms
	from;				# supply a From_ envelope line

	# the -r flag prevents immediate delivery
	cmd = "/usr/bin/uux - -r -g$grade $host!rmail (${strip:user})",
	umask = 0022,
	pipe_as_sender

queueonly:
        driver = pipe;                  # send the message to a pipe
        cmd = "/usr/lib/sendmail -Q -f $sender -bm $user",
                                        # use getmail for local delivery
        user=root,                      # execute getmail as "root"
        group=mail,                     # execute getmail as "mail"
        parent_env,                     # environment info from parent addr
        -pipe_as_user,                  # use user-id associated with address
        umask = 0007,                   # umask for child process
 
# 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,                           # if UUCP_ZONE is not defined
        #uucp,                          # if UUCP_ZONE is defined
        -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
