Your mortgage lender has to provide you with a Good Faith Estimate of all the specifics of closing costs and other fees within three days of your application; this is required by law. If you don't get your estimate, don't hesitate to prod them into provide one.
Many mortgage lenders sell mortgages to other companies, or transfer them for to them for processing. You have a right to know if they're going to do this, and in fact the lender has three days to tell you once you've applied for the loan -- just as they have to give you a Good Faith estimate and make their fee structure transparent.