#
# nosourceroute: generate rules to reject source routed mails via this host
#

REVISION_ID='@(#)nosourceroute	3.4 (motonori/WIDE) 04 Jan 1997'

#|# generate rules not to relay source routed mails (yes/no)
#|#REJECT_SOURCE_ROUTE_RELAY=no

: ${REJECT_SOURCE_ROUTE_RELAY=no}
if [ "$REJECT_SOURCE_ROUTE_RELAY" != no ]
then

	if [ "$REVISION_ID_LIST" ]
	then
		REVISION_ID_LIST="$REVISION_ID_LIST\\
# $REVISION_ID"
	else
		REVISION_ID_LIST="# $REVISION_ID"
	fi

	case "$CF_FORMAT" in
	V1|NMTC)

REJECTSOURCEROUTERULE='\
# do not relay source routed mails\
R$*<@$+>$*		$#error$: Source Routing Rejected'
		;;

	V5)

REJECTSOURCEROUTERULE='\
# do not relay source routed mails\
R$*<@$+>$*		$#error$@UNAVAILABLE$: "554 Source Routing Rejected"'
		;;
	*)

REJECTSOURCEROUTERULE='\
# do not relay source routed mails\
R$*<@$+>$*		$#error$@5.4.3$: Source Routing Rejected'
		;;

	esac

	case "$CF_FORMAT" in
	V1|NMTC)
		;;
	*)

		R_S0RTR2=87

S87RULE='S87\
\
R$*<$-.$+>$*		$:$1$2.$3$4			defocus\
R$*			$:$>3 $1			canonicalize\
R$*			$:$>0 $1			and try again'
		;;

	esac

fi
