Files
smmapdfw/smmapdfw/cyruscheck.m4
2004-09-20 19:34:09 +00:00

55 lines
1.3 KiB
Plaintext

VERSIONID(`$Id$')
divert(-1)
define(`_USAGE_', `dnl
errprint(`*** ERROR: missing argument for FEATURE(cyruscheck):
Usage: FEATURE(`cyruscheck', `_dummy_')
_dummy_: active (actually returning errors) or dummy (just log what it would return)
found: $1
')')
ifelse(_ARG_, `dummy', `', `
ifelse(_ARG_, `active', `', `
_USAGE_(`_dummy_: ('_ARG_`)
')
')')
define(`_dummy_', _ARG_)
dnl errprint(`*** _dummy_: '_dummy_`
dnl ')
ifelse(defn(`confCYRUSCHECK_MAP'), `', `
define(`_CYRUSCHECK_MAP_', `inet:8884@127.0.0.1')', `
define(`_CYRUSCHECK_MAP_', confCYRUSCHECK_MAP)')
divert(0)
LOCAL_CONFIG
# Adjust the port
Kcyruscheck socket -T<temp> _CYRUSCHECK_MAP_
Kcht_logger syslog
LOCAL_RULESETS
# This ruleset can be used to test the verifier in -bt mode
Scc
R< $+ > < $+ > $: < $(cyruscheck $1 $2 $:none $) >
Scyruscheck
R< $+ > < $+ > $: < $1 > < $2 > < $(cyruscheck $1 $2 $:none $) >
ifelse(_dummy_, `dummy', `dnl
dnl dummy
R< $+ > < $+ > < $+ > $@ < ok > $(cht_logger $1 -- $2 --- $3 $)', `dnl
dnl active
R< $+ > < $+ > < $+ > $: < $3 >
R< <OK> $* > $@ < ok >
R< <NOK> $* > $#error $@ 5.0.0 $: "500 Depot returns error: " $1
R< <TNOK> $* > $#error $@ 4.0.0 $: "400 Depot returns error: " $1
R$* $#error $@ 4.7.1 $: "451 Local configuration error <cc1>"')