Oops, I replied to the wrong post.

Cory wrote:
Never mind ... I have it working on one of my machines, so now I just have to figure out what I did so it will work on the other one.  I'll post the answer when I have it, in case anyone else has the same problems.

BTW ... here's the changes I made to /etc/init.d/sendmail.  Running "sendmail -L sm-msp-que -Ac" for the client ueue puts .pid file in /var/spool/clientmqueue instead of /var/run.  The original script touched a /var/run/sm-client.pid and chowned it to smmsp (why not mail?), but since it didn't contain the PID #, the stop script failed.  I commented out those two lines and added a mv and chmod line of my own, after the daemon function call.  Here:

if ! test -f /var/run/sm-client.pid ; then
        gprintf "Starting sm-client: "
        # touch /var/run/sm-client.pid # <-- HERE
        # chown smmsp:smmsp /var/run/sm-client.pid # <-- HERE
        daemon --check sm-client /usr/sbin/sendmail -L sm-msp-queue -Ac \
                                $([ -n "$QUEUE" ] && echo -q$QUEUE)
        RETVAL=$?
        sleep 5
        mv /var/spool/clientmqueue/sm-client.pid /var/run  # <-- HERE
        chown mail:mail /var/run/sm-client.pid # <-- HERE
        echo

    I think it still has a problem on systems running the client only daemon (DAEMON=no in /etc/sysconfig/sendmail), so I still have to work on that.  Oh, and I made another change.  The /etc/init.d/sendmail script wasn't checking the DAEMON variable, so it was starting the listening process no matter what.  So I added a "[ $DAEMON = "yes" ] &&" in a couple of spots:

[ $DAEMON = "yes" ] && gprintf "Starting %s: " "$prog"
        /usr/bin/newaliases > /dev/null 2>&1
        if test -x /usr/bin/make -a -f /etc/mail/Makefile ; then
          make -C /etc/mail -s
        else
          for i in virtusertable access domaintable mailertable ; do
            if [ -f /etc/mail/$i ] ; then
                makemap hash /etc/mail/$i < /etc/mail/$i
            fi
          done
        fi
        [ $DAEMON = "yes" ] && daemon /usr/sbin/sendmail -bd \
                                $([ -n "$QUEUE" ] && echo -q$QUEUE)

That's it.
Cory wrote:

Has anyone figured out the new sendmail with it's "security" changes.  I had to make some modifications to the /etc/init.d/sendmail script to get it to start and stop both process correctly.  However, I used to use the sendmail binary from the command line from time to time as a non root user.  I guess they dont' want you to do that ... not secure.  I added myself to the mail group, which is what has sgid permissions on the sendmail binary, but I still can't run sendmail from the command line. It sees my regular group ID of 501, and wants GID 12 (mail).  It must be something special (or broken) sendmail does to check group permissions, because I have full write permissions to the /var/spool/clientmqueue directory since I'm in the mail group.

What's really frustrating is I can't even use the mail command to send mail from the command line.  Yet, somehow mozilla mail is able to operate just fine to send mail.

Anyone have any thoughts?

Thanks,
Cory



Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com




Reply via email to