Postfix 邮件服务器和数千个用户?
问候大家 我有一个包含许多域的 postfix 邮件服务器 每个域包含许多用户(每个用户都有一个邮箱)
,我想处理当电子邮件到达所有域中任何用户的任何邮箱时执行一些java代码。
有什么想法可以做到这一点吗?
greetings all
I have a postfix mail server that contains many domains
and each domain contains many users (each user has a mailBox)
and I want to handle that when an email comes to any mailBox of any user in all domains do some java code.
any ideas how this could be done ?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果用户有一个“真实”的系统帐户,您可以将
.forward
放入他们的主目录中,该目录看起来会在收到电子邮件时自动将电子邮件传送到您的程序。否则,您可以调整当地的送货代理来为您做这件事。
If the users have a 'real' system account, you can put a
.forward
into their home directory that looks likewhich would automatically pipe the email to your program when it's received. Otherwise you could tweak the local delivery agent to do it for you.
我找到了一种解决方案,使用 postfix 和 mysql db 将所有传入电子邮件转发到一个邮箱,并添加了一个每 5 秒运行一次的线程,以使用 javamail 检查新的未读电子邮件到该单个邮箱
I got to a solution to forward all the incoming emails to one single mailbox, using postfix with mysql db, and added a thread that runs every 5 seconds to check for new unread emails to that single one mailbox using javamail