开发者

Postfix mail server and thousands of users?

开发者 https://www.devze.com 2023-02-07 01:16 出处:网络
greetings all I have a postfix mail server that contains many domains and each domain contains many users (each user has a mailBox)

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 coul开发者_开发技巧d be done ?


If the users have a 'real' system account, you can put a .forward into their home directory that looks like

 "|/path/to/your/mail/handling/program"

which 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.


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号