nightmaremail

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

REMOVE.sendmail.md (1289B)


      1 Here's how to remove sendmail from your system.
      2 
      3 1. Find sendmail in your boot scripts. It's usually in either /etc/rc or
      4    /etc/init.d/sendmail. It looks like
      5 
      6    `sendmail -bd -q15m`
      7 
      8    -q15m means that it should run the queue every 15 minutes; you may
      9    see a different number. Comment out this line.
     10 
     11 2. Kill the sendmail daemon. You should first kill -STOP the daemon; if
     12    any children are running, you should kill -CONT, wait, kill -STOP
     13    again, and repeat ad nauseam. If there aren't any children, kill
     14    -TERM and then kill -CONT.
     15 
     16 3. Check whether you have any messages in the sendmail queue,
     17    /var/spool/mqueue. If you do, you will have to try flushing them with
     18    sendmail.bak -q. If necessary, wait a while and run sendmail.bak -q
     19    again. Repeat until the queue is empty. This may take several days.
     20 
     21 4. Remove the setuid bit on the sendmail binary, to prevent local users
     22    from gaining extra privileges through sendmail's security holes. The
     23    binary may be at several different locations:
     24 
     25    ```
     26    # chmod 0 /usr/lib/sendmail
     27    # chmod 0 /usr/sbin/sendmail
     28    # chmod 0 /usr/lib/sendmail.mx
     29    ```
     30 
     31 5. Move the sendmail binary out of the way:
     32 
     33    ```
     34    # mv /usr/lib/sendmail /usr/lib/sendmail.bak
     35    # mv /usr/sbin/sendmail /usr/sbin/sendmail.bak
     36    ```