Postfix mail server and thousands of users?
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
精彩评论