Monday, 6 June 2005

Change your Mail Transport Agent (MTA) from Sendmail to Postfix and vice versa

Linux distributions like RedHat and Fedora ship with two Mail Transport Agents (MTAs) - sendmail and postfix . But at a time, you can use only one of the two - ie either sendmail or postfix. You can switch between the two very easily by using the 'alternatives' command.

With alternatives, an executable with a generic name on the filesystem is used to access a particular service. This executable is really a symbolic link to another symlink in the /etc/alternatives/ directory. For example, the '/usr/bin/sendmail' is actually a symbolic link to /etc/alternatives/mta . In order to select between sendmail or postfix, we just change the symlink for the /etc/alternatives/mta . This is normally done with the alternatives command. Here are some examples:

To display which MTA alternative is in use:
# alternatives --display mta
To choose from the available MTA alternatives from the command line :
# alternatives --config mta
To setup Postfix as the default mail system:
# alternatives --set mta
GUI Option
RedHat/Fedora has got a GUI for switching between the MTA's which is redhat-switch-mail.

No comments:

Post a Comment