If your login/AD domain is "corp.domainname.com" then that's the domain that users need to specify when logging in, since it's where the credentials are stored.
It will also be the domain Exchange sets itself up to work with by default, unless you specify otherwise during initial setup.
If you want to also use just "domainname.com" for email addresses, then you'll need to put in an additional MX record into your public DNS for that domain, and setup Exchange to (also) work with that domain.
Check out this MS TechNet section to get started: Accepted Domains