在 Oracle® Solaris 11.2 中管理 sendmail 服务

退出打印视图

更新时间: 2014 年 7 月
 
 

如何测试 sendmail 规则集

要检查 sendmail 规则集的输入和返回,请按照以下说明操作。

  1. 更改为地址测试模式。
    # /usr/lib/sendmail -bt
  2. 测试邮件地址。

    在最后一个提示符 (>) 下提供以下数字和地址。

    > 3,0 mail-sraddress
    mail-address

    使用要测试的邮件地址。

  3. 结束会话。

    按 Ctrl-D 组合键。

示例 2-3  地址测试模式输出

以下是地址测试模式的输出示例。

% /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 . >