Release
 
Part 10 - Uninstalling Sendmail/Postfix
(Redhat)

Well, the moment you've been waiting for is finally here. We're going to uninstall the current MTA from the server. On some systems, this means removing Sendmail while on many systems it involves removing Postfix (another popular MTA). Either way, we're going to remove the current MTA and replace it with our new qmail installation. However, since Sendmail (or rather the path to Sendmail) is such a commonly used item among tons of server operations and cronjobs, you will see that, after we uninstall Sendmail, we will actually make an artificial Sendmail that is nothing more than a direct injection into Qmail.

Anyway, let's do it...

Since this installation concerns Redhat, I'm going to assume that either have Sendmail or Postfix installed as an RPM. If you have it installed from source instead, we'll cover that as well.

Removing Sendmail

First, you'll want to check and see if your Sendmail installation is an RPM installation or a source installation. A good way to tell, of couse, is to simply ask....

rpm -qa | grep sendmail

If Sendmail is installed as an RPM, you will see an output similar to this:

sendmail-x.x.x.x
sendmail-doc-x.x.x.x
sendmail-devel-x.x.x.x
sendmail-cf-x.x.x.x

If it's installed as an RPM, you can uninstall Sendmail quite easily by running the followinng commands:

/etc/rc.d/init.d/sendmail stop (to stop Sendmail)

rpm -e --nodeps sendmail-x.x.x.x
rpm -e --nodeps sendmail-doc-x.x.x.x
rpm -e --nodeps sendmail-devel-x.x.x.x
rpm -e --nodeps sendmail-cf-x.x.x.x

That's it! Sendmail is gone! Keep in mind that if you had an rpm installation and you ever want to return to Sendmail, you can simple install the RPMs again with no trouble (assuming you remove Qmail).

However, if the RPM query produces no output, you most likely have a source install of Sendmail. In that case...

/etc/rc.d/init.d/sendmail stop (to stop Sendmail)

mv /usr/lib/sendmail /usr/lib/sendmail.old

mv /usr/sbin/sendmail /usr/sbin/sendmail.old

chmod 0 /usr/lib/sendmail.old /usr/sbin/sendmail.old

Removing Postfix

First, let's see if you actually have Postfix installed...

rpm -qa | grep postfix

If it's installed, you'll get an output similar to this:

postfix-x.x-x

So let's remove it...

/etc/rc.d/init.d/postfix stop

rpm -e --nodeps postfix-x.x-x

Establishing an "artificial" Sendmail path

Now we will need to set up an "artificial" Sendmail, which is just a symbolic link to Qmail's Sendmail. This is needed to ensure that the myriad of systemic mail scripts are still able to send mail! Qmail's "Sendmail" is nothing more than a direct injection into Qmail itself...

ln -s /var/qmail/bin/sendmail /usr/lib/sendmail

ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

That's it! If all has gone well, Sendmail or Postfix should be uninstalled and the Qmail Sendmail should be in its place.

Now it's time to give qmail a final test and then crank it up!

Proceed to Part 11


 

Color Coded Qmail Installation Key
 
Regular Black Text 
 Qmail installation notes and summaries by the author. Me talking.
 
Bold Black Text 
 Commands to be run by you, the installer.
 
Bold Maroon Text 
 Special notes for Redhat 9 users.
 
Bold Red Text 
 Vital and/or critical information.
 
Regular/Bold Purple text 
 Denotes helpful tips and hints or hyperlinks.
 
Regular Orange Text 
 Command line output.
Cp

Regular green text 

 Denotes the contents of a file or script.
home | about | the installation | utilities | faq | contact | journal | mailing list | list archive | forum | links | donatemerchandise
modified
This mirror last modified: Thursday, August 9th, 2012 15:58:35 CEST
 
The Rocks Project