Тестирование правил преобразования адресов
В приведенном ниже примере тестирование адресов производится с максимальной опцией отладки, когда указываются не только номера наборов правил, но и сами тестируемые правила:
%sendmail - bt - d21.12
>
3 paul@polyn.kiae .su
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter
<ruleset>
<address>
>
rewrite: ruleset 3 input: paul @ polyn .kiae .su
-
-
-
-
-
trying rule: $@
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
-
-
-
-
-
rule matches: $: $1
< @ >
rewritten as: paul @ polyn .kiae .su
< @ >
-
-
-
-
-
trying rule: $
*
<$*>
$
*
< @ >
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
:: $
*
< @ >
-
-
-
rule fails
-
-
-
-
-
trying rule:: include: $
*
< § >
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
: $
*
<. @ >
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
< @ >
-
-
-
-
-
rule matches: $: $1
rewritten as: paul @ polyn .kiae .su
-
-
-
-
-
trying rule: $
*
;
-
-
-
rule fails
-
-
-
-
trying rule: $@
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
-
-
-
-
-
rule matches: $:
< $1 >
rewritten as:
< paul @ polyn .kiae .su >
-
-
-
-
-
-
trying rule: $
+
<$*>
-
-
-
-
rule fails
-
-
-
-
-
-
trying rule:
<$*>
$
+
-
-
-
-
rule fails
-
-
-
-
trying rule:
< >
-
-
rule fails
-
-
-
-
-
trying rule:
< $+ >
-
-
-
-
-
rule matches: $: $1
rewritten as: paul @ polyn .kiae .su
-
-
-
-
-
trying rule: @ $
+
, $
+
-
-
-
rule fails
-
-
-
-
-
trying rule: @ $
+
: $
+
-
-
-
rule fails
-
-
-
-
-
trying rule: $
+
:$
*
; @ $
+
-
-
-
rule fails
-
-
-
-
-
trying rule: $
+
:$
*
;
-
-
-
rule fails
-
-
-
-
-
trying rule: $
+
@ $
+
-
-
-
-
-
rule matches: $: $1
< @ $2 >
rewritten as: paul
< @ polyn .kiae .su >
-
-
-
-
-
trying rule: $
+
< $+ @ $+ >
-
-
-
rule fails
-
-
-
-
-
trying rule: $
+
<§$+>
-
-
-
-
-
rule matches: $@ $
>
96 $1
< @ $2 >
-
-
-
-
-
callsubr 96
rewrite: ruleset 96 input: paul
< @ polyn .kiae .su >
-
-
-
-
-
trying rule: $
*
< @ localhost >
$
*
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
< @ localhost .net .kiae .su >
$
*
-
-
-
rule fails
-
-
-
-
-
-
trying rule: $
*
< @ localhost. UUCP >
$
*
-
-
-
-
rule fails
-
-
-
-
-
-
trying rule: $
*
< @ [$+]>
$
*
-
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
< @ @ $=w >
$
*
-
-
-
rule fails
-
-
trying rule: $
*
< @ @ $+ >
$
*
-
-
-
rule fails
-
-
trying rule: $
*
< @ $+. UUCP >
$
*
-
-
-
rule fails
-
-
trying rule: $
*
< @ $* $~P >
$
*
-
-
rule matches: $: $1
< @ $[ $2 $3 $] >
$4 rewritten as: paul
< @ polyn .kiae .su. >
-
-
-
-
-
trying rule: $
*
< @ $=w >
$
*
-
-
-
rule fails
-
-
trying rule: $
*
< @ $* $=P >
$
*
-
-
rule matches: $: $1
< @ $2 $3. >
$4 rewritten as: paul
< @ polyn .kiae .su.. >
-
-
-
-
-
trying rule: $
*
< @ $*.. >
$
*
-
-
rule matches: $1
< @ $2. >
$3 rewritten as: paul
< @ polyn t .kiae .su. >
-
-
trying rule: $
*
< @ $*..>
$
*
-
-
-
rule fails
-
-
trying rule: $
*
< @ quest .net .kiae .su >
$
*
-
-
-
rule fails
rewrite: ruleset 96 returns: paul
< @ polyn .kiae .su. >
rewritten as: paul
< @ polyn .kiae .su. >
rewrite: ruleset 3 returns: paul
< @ polyn .kiae .su. >
>
96 paul@polyn.kiae.su
>
rewrite: ruleset 96 input: paul @ polyn .kiae .su
-
-
trying rule: $
*
< @ localhost >
$
*
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
< @ localhost .net .kiae .su >
$
*
-
-
-
rule fails
-
-
trying rule: $
*
< @ localhost. UUCP >
$
*
-
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
<§[$+]>
$
*
-
-
-
rule fails
-
trying rule: $
*
< @ @ $=w >
$
*
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
< @ @ $+ >
$
*
-
-
-
rule fails
-
trying rule: $
*
<§$+. UUCP >
$
*
-
-
-
rule fails
-
-
trying rule: $
*
< @ $* $"P >
$
*
-
-
-
rule fails
-
-
trying rule: $
*
< @ $=w >
$
*
-
-
-
rule fails
-
-
-
trying rule: $
*
< @ $* $=P >
$
*
-
-
-
rule fails
-
-
-
trying rule: $
*
< @ $*..>
$
*
-
-
-
rule fails
-
-
-
-
-
trying rule: $
*
< @ quest .net .kiae .su >
$
*
-
-
-
rule fails
rewrite: ruleset 96 returns: paul @ polyn .kiae .su
>
Правила в данном случае указываются по их левой части и для правильного понимания необходимо иметь и тот фрагмент файла конфигурации sendmail, который тестируется.