Cleopatra Sendmail

To run Cleopatra 2525 sendmail, set up sendmail_cleo in the init.d directory and then put in all of the symbolic links in the rcx.d directories. Also, add a symlink from "sendmail_cleo" to "sendmail" in the sendmail binary directory.

/etc/rc.d/init.d/sendmail_cleo:

     #!/bin/sh
     #
     # sendmail_cleo This shell script takes care of starting and stopping
     #               the Cleopatra 2525 version of sendmail.  Other than the
     #               fact that it listens on port 2525 instead of port 25, it
     #               is identical to sendmail and uses all of the same config
     #               files, etc.  It may be run in parallel with a port 25
     #               sendmail.
     #
     # chkconfig: 2345 80 30
     # description: Sendmail is a Mail Transport Agent, which is the program
     #              that moves mail from one machine to another.
     # processname: sendmail
     # config: /etc/sendmail.cf
     # pidfile: /var/run/sendmail_cleo.pid
     # Source function library.
     . /etc/rc.d/init.d/functions
     # Source networking configuration.
     . /etc/sysconfig/network
     # Source sendmail configureation.
     if [ -f /etc/sysconfig/sendmail ] ; then
             . /etc/sysconfig/sendmail
     else
             DAEMON=yes
             QUEUE=1h
     fi
     # Check that networking is up.
     [ ${NETWORKING} = "no" ] && exit 0
     # Check for the Cleopatra version of sendmail.  This is just a symbolic
     # link to sendmail but it lets Cleo run as an easily-distinguished, separate
     # task (so we know which is which and can kill it, etc.).
     [ -f /usr/sbin/sendmail_cleo ] || exit 0
     RETVAL=0
     # See how we were called.
     case "$1" in
       start)
             # Start daemons.
          echo -n "Starting Cleopatra sendmail: "
          /usr/bin/newaliases >/dev/null 2>&1
          for i in virtusertable access domaintable mailertable ; do
              if [ -f /etc/mail/$i ] ; then
                  makemap hash /etc/mail/$i < /etc/mail/$i
              fi
          done
          daemon /usr/sbin/sendmail_cleo $([ "$DAEMON" = yes ] && echo -bd) \
                                    $([ -n "$QUEUE" ] && echo -q$QUEUE) \
                                    -ODaemonPortOptions=Port=2525
          RETVAL=$?
          echo
          [ $RETVAL -eq 0 ] && touch /var/lock/subsys/sendmail_cleo
          ;;
    stop)
          # Stop daemons.
          echo -n "Shutting down Cleopatra sendmail: "
          killproc sendmail_cleo
          RETVAL=$?
          echo
          [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/sendmail_cleo
          ;;
    restart|reload)
          $0 stop
          $0 start
          RETVAL=$?
          ;;
    status)
          status sendmail_cleo
          RETVAL=$?
          ;;
    *)
          echo "Usage: sendmail_cleo {start|stop|restart|status}"
          exit 1

esac

     exit $RETVAL

/etc/sysconfig/sendmail:

If you use the above startup script, you should see the notes in the sendmail section about /etc/sysconfig/sendmail.