如何在 OS X 上创建 netcat 中继?

发布于 2024-07-26 16:46:49 字数 375 浏览 2 评论 0原文

我正在尝试对我的 postfix 进行故障排除,因此我决定通过 netcat 中继将其流量路由到我的 isp smtp 中继:

nc -l <someport> 0<backpipe | nc <isp-smtp> 26 | tee backpipe

并且我将我的 postfix 配置为连接到 localhost:。 但是为了让 netcat 中继工作,它需要一个用 mknod backpipe p 制作的 FIFO 管道,显然 OS X 不支持这一点。

是否有其他方法可以设置我可以监控的 TCP 中继,或者我可以用其他东西来观看 postfix 和我的 isp smtp 之间的闲聊?

I'm trying to troubleshoot my postfix so I decided to route its traffic to my isp smtp relay trough a netcat relay:

nc -l <someport> 0<backpipe | nc <isp-smtp> 26 | tee backpipe

And I configured my postfix to connect to localhost:. But to get the netcat relay working it needs a FIFO pipe made with mknod backpipe p and apparently this is not supported on OS X.

Is there an alternative way to either set up a TCP relay I can monitor, or something else I can use to watch the chit-chat between postfix and my isp smtp?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

半衾梦 2024-08-02 16:46:49

在 Leopard 下,mkfifo 位于 /usr/bin 中。 不确定之前的情况。

/usr/bin/mkfifo backpipe

我个人建议使用 tcpdump 和/或wireshark,它也可以让您更好地了解流量。

Under Leopard, mkfifo is in /usr/bin. Not sure about prior.

/usr/bin/mkfifo backpipe

personally I'd recommend using tcpdump and/or wireshark, it gives you a nicer view of the traffic too.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文