Brief steps to set email gateway and synchronize LDAP

Can anybody point few basic steps to be taken care of while setting up
Email Gateway for RT and also to synchronize LDAP users to login into RT
with their own credentials without need of settinup their own account
throughRT.

I have looked through RT_SiteConfig.pm file. everything looks good.
Except which sendemailpipe is uncommented to be used.
Is there anything else i need to reconfigure.

Thanks for your help