Receiving mails with a servlet is like eating soup with a knife.
To receive mails, you need to have a mail server active; usually running either (or possibly both) SMTP and/or IMAP. This is the software that will end up accepting your mails from outside.
Under Unix systems, you generally the mail server push received mails into a Mail Transfer Agent (MTA) that does something mundane like writing your received mails into your mailbox, which may be either a file or a directory. However, you can configure this process to alternatively pipe (in a shell) the mail into a program of your choice. That program could be a C or Java program which then accesses your Web server doing a POST with the contents of the mail, and then you could process your incoming mail on your Web server.
But it would be much easier to process the mail in a program that is not your Web app server, perhaps an application that simply writes the mail's contents to a database, perhaps after some processing.
If you're alreading doing a lot of stuff with Java, you may find it most convenient to use and maybe modify a, no the Java mail server: It's called James. It may be easier to build mail-lets for James than to bolt some other processing on to a "standard" C mail server. However, I haven't heard much from James lately, so I don't know just how good a mail server it is, how actively it's developed, etc. You'd have to do some exploring on your own (or ask more questions here).