Choosing Software Alternatives


Because several software packages are available for every major service available in Linux (such as mail, printing, and so on), there will be times when people using the system will prefer one service over another. Software packages that have been designed to work with the alternatives system can be configured in Fedora to let an administrator choose which of the alternatives to a particular service he or she wants to use by default.

Selecting mail and printing alternatives

Beginning with Red Hat Linux 7.3, which was the first version to offer the alternatives feature, two major services were configured to use alternatives: mail transport and printing services. The alternatives facility let system administrators choose the following, related to mail transport and printing:

  • Mail Transport Agent (MTA) — If the sendmail, exim and postfix mail transport agents are installed, as an administrator you can choose which of those services is the default for sending and receiving e-mail.

  • Printing — If both LPRng and CUPS printing services are installed, you can choose which service is the default for printing documents.

As an administrator, you still need to configure each alternative service to work. Descriptions for configuring sendmail and postfix mail-transport agents are contained in Chapter 19. Information on setting up the CUPS printing service is in Chapter 17. (LPRng is no longer delivered with Fedora , although it is still available from sites such as rpmfind.net. Likewise, the feature for switching the printing service described below is not included with Fedora, but can still be found in earlier Red Hat Linux systems.)

In terms of setting up the alternatives side of mail services, much of the work of creating links so that the services can be chosen has already been done. Links relating to the default services are set up in the /etc/alternatives directory. Definitions that identify the alternative components of sendmail, exim, and postfix mail servers are contained in the /var/lib/alternatives directory.

Because much of the configuration has been done in advance, the first step in switching between the different mail services installed on your computer is only a couple of clicks away. To switch the default mail services on your computer, do the following:

  1. To switch mail service, type system-switch-mail. The switcher window appears.

  2. Click on the service you want to switch to — Sendmail, Exim or Postfix for mail. (If the one you want is already selected, you can just cancel.) If the switch is successful, a pop-up window tells you to restart the new service.

  3. Click OK to complete the switch and close the pop-up window.

The next time your computer boots, your new mail service takes over that service. All the links are in place and the start-up scripts are changed. However, your system is still running the old service. The start-up scripts for those services are in the /etc/init.d directory. They are as follows:

  • exim for the Exim mail service

  • sendmail for the Sendmail mail service

  • postfix for the Postfix mail service

To stop the old service so that the new one can take over, type the following (replacing service with the name of the service you want to stop):

 # /etc/init.d/service stop 

To start the new service, type the following (replacing service with the name of the service you want to start):

 # /etc/init.d/service start 

Providing that the new service was configured properly, it should now be available to the users of your computer.

Using mail alternatives

The mail-transport services that the alternatives facility allows you to change rely on many of the same command names. For example, both Postfix and Sendmail have a newalias command and mailq commands for updating aliases and checking the mail queue, respectively.

So, to the user, a change in the local mail service should (in theory) be nearly invisible. Users can send mail as they always did and the fact that a different mail transport is being used should make no difference.




Red Hat Fedora Linux 3 Bible
Red Hat Fedora Linux 3 Bible
ISBN: 0764578723
EAN: 2147483647
Year: 2005
Pages: 286

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net