大网数据广告活动
服务器运维问答

Testing Zimbra email routing

· 52CE 我爱测

I am an experienced Exim user and just recently testing Zimbra Open Source, and I am loving it already. However, I am used to this command whenever I wanted to test email routing in the email server, whether I am testing for the …

问题原文

原帖链接 · James A · CC BY-SA 3.0

I am an experienced Exim user and just recently testing Zimbra Open Source, and I am loving it already.

However, I am used to this command whenever I wanted to test email routing in the email server, whether I am testing for the routing of local users, local email addresses and external email addresses:

root@localhost# exim -bt [email omitted]
[email omitted]
    <-- [email omitted]
  router = localuser, transport = local_delivery

root@localhost# exim -bt [email omitted]
[email omitted]
  router = localuser, transport = local_delivery

root@localhost# exim -bt [email omitted]
  router = lookuphost, transport = remote_smtp
  host mail.remotehost.com [1.2.3.4] MX=0

Got the above cheatsheet years ago from http://bradthemad.org/tech/notes/exim_cheatsheet.php.

How can I do this with Zimbra/Postfix? I am searching everywhere on how to do this, but couldn't found any.

Thanks!

已采纳解答

原帖链接 · masegaloeh · CC BY-SA 3.0

Try this command

/usr/sbin/sendmail -bv address.

sendmail binary from postfix has special options -bv

-bv    Do not collect or deliver a  message.  Instead,  send  an  email
       report  after  verifying each recipient address.  This is useful
       for testing address rewriting and routing configurations.

This command also can be found in postfix documentation:

Excerpt from the page

Postfix version 2.1 and later can produce mail delivery reports for debugging purposes. These reports not only show sender/recipient addresses after address rewriting and alias expansion or forwarding, they also show information about delivery to mailbox, delivery to non-Postfix command, responses from remote SMTP servers, and so on.

Unlike utility from exim which give result in the stdout, postfix will send the report to user who invoke above command. Also zimbra will place sendmail binary in its unusual directory, so you must invoke it by issuing the full path command.

/opt/zimbra/postfix/sbin/sendmail -bv address

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-05-29)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。