向 Tomcat 上运行的 Java 应用程序发送 postfix 邮件
我有一个 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论