我熟悉 exim 以及 exim -bt 在指示如何路由消息方面的行为。我正在尝试设置一个简单的 sendmail 配置,以将本地系统上的根邮件路由到我的公司电子邮件地址。
# tail /etc/aliases
# Person who should get root's mail
root: [email protected]
运行后newaliases
,目前正常工作但我不明白如何使用 -bt 在本地进行验证。
# sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> /try smtp root
Trying envelope recipient address root for mailer smtp
canonify input: root
Canonify2 input: root
Canonify2 returns: root
canonify returns: root
2 input: root
2 returns: root
EnvToSMTP input: root
PseudoToReal input: root
PseudoToReal returns: root
MasqSMTP input: root
MasqSMTP returns: root < @ *LOCAL* >
EnvToSMTP returns: root < @ olympus . domain . >
final input: root < @ olympus . domain . >
final returns: root @ olympus . domain
Rcode = 0, addr = [email protected]
> 3 root
canonify input: root
Canonify2 input: root
Canonify2 returns: root
canonify returns: root
> /try local root
Trying envelope recipient address root for mailer local
canonify input: root
Canonify2 input: root
Canonify2 returns: root
canonify returns: root
2 input: root
2 returns: root
EnvToL input: root
EnvToL returns: root
final input: root
final returns: root
Rcode = 0, addr = root
>
我应该输入以 开头root
并输出的什么[email protected]
?
答案1
尝试一下sendmail -bv root
。
它应该显示 sendmail 如何将消息传递给给定的收件人。
man sendmail
:
-bv Verify names only - do not try to collect or deliver a message. Verify mode is normally used for validating users or mailing lists.
如果您还想查看内部规则集的处理,请将-d21.12
调试开关添加到-bv
。