要检查 sendmail 规则集的输入和返回,请按照以下说明操作。
# /usr/lib/sendmail -bt
在最后一个提示符 (>) 下提供以下数字和地址。
> 3,0 mail-sraddress
使用要测试的邮件地址。
按 Ctrl-D 组合键。
以下是地址测试模式的输出示例。
% /usr/lib/sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 3,0 sandy@phoenix
canonify input: sandy @ phoenix
Canonify2 input: sandy < @ phoenix >
Canonify2 returns: sandy < @ phoenix . example . com . >
canonify returns: sandy < @ phoenix . example . com . >
parse input: sandy < @ phoenix . example . com . >
Parse0 input: sandy < @ phoenix . example . com . >
Parse0 returns: sandy < @ phoenix . example . com . >
ParseLocal input: sandy < @ phoenix . example . com . >
ParseLocal returns: sandy < @ phoenix . example . com . >
Parse1 input: sandy < @ phoenix . example . com . >
MailerToTriple input: < mailhost . phoenix . example . com >
sandy < @ phoenix . example . com . >
MailerToTriple returns: $# relay $@ mailhost . phoenix . example . com
$: sandy < @ phoenix . example . com . >
Parse1 returns: $# relay $@ mailhost . phoenix . example . com
$: sandy < @ phoenix . example . com . >
parse returns: $# relay $@ mailhost . phoenix . example . com
$: sandy < @ phoenix . example . com . >