#
#	Copyright (c) 1982, 1986, 1988
#	The Regents of the University of California
#	All Rights Reserved.
#	Portions of this document are derived from
#	software developed by the University of
#	California, Berkeley, and its contributors.
#

#ident	"@(#)ucb:common/ucbcmd/sendmail/cf/mailsurr	1.4"
#ident	"$Header: $"


#		PROPRIETARY NOTICE (Combined)
#
#This source code is unpublished proprietary information
#constituting, or derived under license from AT&T's UNIX(r) System V.
#In addition, portions of such source code were derived from Berkeley
#4.3 BSD under license from the Regents of the University of
#California.
#
#
#
#		Copyright Notice 
#
#Notice of copyright on this source code product does not indicate 
#publication.
#
#	(c) 1986,1987,1988,1989  Sun Microsystems, Inc
#	(c) 1983,1984,1985,1986,1987,1988,1989  AT&T.
#	          All rights reserved.


# /etc/mail/mailsurr must exist to do anything useful with mail(1)
# Entries are of the form:
# 'Originator RE' 'Recipient RE' 'Command Field'
# See mailsurr(4) for details.
##################################################################
#
# To use sendmail to deliver remote mail, copy this file to /etc/mail/mailsurr
#
# To make sendmail handle incoming smtp requests, modify 
# /etc/init.d/smtpinit to call '/usr/ucblib/sendmail -bd -q1h' instead of
# /usr/lib/mail/surrcmd/smtpd
#
##################################################################
# Send everything that doesn't look local to sendmail.
#
#  Since 'mail(1)' calls sendmail for remote delivery and
#  sendmail calls 'mail(1)' for local delivery, if we don't
#  let the local stuff through, we'll get an infinite recursion
#  of sendmail calling mail calling sendmail.....

'.+'	'(.*[@,:!%].*)'	'< B=4096; /usr/ucblib/sendmail' '\\1'
