I want anyone who send a email to test@example.com, and the server could get the mail and so I can use some server side scripting language like Ruby to parser the content of the
Install and configure an SMTP server. SMTP servers can usually be configured quite extensively, what to do with mails that should be deliverd locally. One such option would be to deliver the mail locally by invoking a ruby script. Popular SMTP servers are postfix, courier and qmail. The details about how to setup the mail server depends on which one you use.