向 Tomcat 上运行的 Java 应用程序发送 postfix 邮件

发布于 2024-09-30 13:46:24 字数 349 浏览 1 评论 0原文

我有一个 Postfix 邮件服务器,我想将收到的电子邮件转发到用 Java 编写并在 Tomcat Web 服务器上运行的应用程序。

据我所知,可以将整个电子邮件(头部、正文、所有内容)转发到本地主机上的端口,邮件服务器和我的应用程序都在该端口上运行。

但我不知道如何实现这一目标。我假设像Tomcat这样的http服务器我无法以普通方式发送这些数据(postfix不会将其包装到http包中),所以也许我必须编写另一个守护进程来从postfix接收数据,将其包装到http中,然后发送这对我的应用程序?

我有点困惑,从来都不是协议之类的专家。

请有人解释一下我该如何解决上述问题!

先感谢您, 巴拉兹

I have a Postfix mail server, and I want to forward my received emails to my application written in Java and running on a Tomcat web server.

As far as I know, it is possible to forward the whole email (head, body, everything) to a port on localhost, where both the mail server and my application is running.

But I don't have any idea how to achieve this. I assume to a http server like Tomcat I cannot send this data in plain (postfix does not wrap it into a http package), so maybe I have to write another daemon process to receive the data from postfix, wrap it into http, and send this to my application?

I'm a bit confused, and have never been a specialist of protocols and these kind of things.

Please someone explain how can I solve the problem above!

Thank you in advance,
Balázs

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文