#
# error: some dispatching definition to error mailer
#

REVISION_ID='@(#)error	3.16 (motonori/WIDE) 17 Sep 1996'

#|# use default error messages (yes/no)
#|#USE_DEFAULT_ERROR_MESSAGES=yes

: ${USE_DEFAULT_ERROR_MESSAGES=yes}
if [ "$USE_DEFAULT_ERROR_MESSAGES" != 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)

DSPTERRORRULE='R<error:deliver>.$*<@$*>$*	$#error$: can not deliver to $2\
R<error:lower>.$*<@$-.$*>$*	$#error$: never heard of $2 in domain $3\
R<error:$*>.$*			$#error$: $1'
		;;

	V5)

DSPTERRORRULE='R<error:deliver>.$*<@$*>$*	$#error$@UNAVAILABLE$: 554 can not deliver to $2\
R<error:lower>.$*<@$-.$*>$*	$#error$@NOHOST$: 554 never heard of $2 in domain $3\
R<error:$*>.$*			$#error$@UNAVAILABLE$: 554 $1'
		;;

	*)

DSPTERRORRULE='R<error:deliver>.$*<@$*>$*	$#error$@5.1.1$: can not deliver to $2\
R<error:lower>.$*<@$-.$*>$*	$#error$@5.1.2$: never heard of $2 in domain $3\
R<error:$-.$-.$-:$*>.$*		$#error$@$1.$2.$3$: $4\
R<error:$*>.$*			$#error$@5.1.0$: $1'
		;;

	esac

fi
