RedHat/Centos (and I think Fedora) uses the "alternatives" system. You can install multiple pieces of software that provide the same resources (eg a mailer) and then use alternatives to pick the one that actually gets used.
eg on my system:
Code:
% alternatives --display mta
mta - status is auto.
link currently points to /usr/sbin/sendmail.postfix
/usr/sbin/sendmail.postfix - priority 30
slave mta-mailq: /usr/bin/mailq.postfix
slave mta-newaliases: /usr/bin/newaliases.postfix
slave mta-pam: /etc/pam.d/smtp.postfix
slave mta-rmail: /usr/bin/rmail.postfix
slave mta-sendmail: /usr/lib/sendmail.postfix
slave mta-mailqman: /usr/share/man/man1/mailq.postfix.1.gz
slave mta-newaliasesman: /usr/share/man/man1/newaliases.postfix.1.gz
slave mta-sendmailman: /usr/share/man/man1/sendmail.postfix.1.gz
slave mta-aliasesman: /usr/share/man/man5/aliases.postfix.5.gz
Current `best' version is /usr/sbin/sendmail.postfix.
I'm not too sure how this handles init scripts. Obviously removing the unnecessary package afterwards fixes it
Looking at the CentOS install/remove scripts, installation adds the rc links, installs the postfix system into alternatives. The remove script deletes the rc links and removes postfix from the alternatives system.
The sendmail scripts do similar.
So to switch from sendmail to postfix you'd install the postfix package, configure postfix as necessary, remove the sendmail package, start postfix.
I'd guess switching from exim to postfix should work the same way.