Reading through these 2 technet articles, you get the main idea on how to set this up
and in here
In Windows Server 2008 R2, there are some steps that are different from the technet articles. My environment is as follow:
First is to add the SMTP server feature. Open Server Manager, add features, and select the SMTP Server
once you click on this, it will bring another dialog box, prompting you to add more role services
It seems that it requires the SMTP Server Tools from the Remote Server Administration Role, and also the ODBC Logging.
click Add required button and continue. Now click on the Next button on the features wizard.
On the confirmation screen you can verify these 2 new roles
After the installation, Open IIS 7, and under the Features View, double-click SMTP Email.
Click on Apply.
Now go back to MOSS Central Administration and click on the Incoming e-mail settings task for the Administrator
On the item, task, select the Action: Configure Incoming E-Mail Settings.
After you have configure the incoming email you can now receive emails on our SharePoint document libraries. Now you can follow the instructions on this article to get those emails inside your document library enable/configured email article.