Switching from sendmail to postfix on CentOS is pretty simple. You just need to remember a couple of simple steps.
1. Install the applications you’ll need
# yum install postfix
# yum install system-switch-mail

2. Configure postfix
3. Tell the system to switch from sendmail to postfix
# system-switch-mail
Removing sendmail will also tell the system to switch to postfix, but I recommend using system-switch-mail command. That way if you run into problems, you can switch back to sendmail without much trouble.