I've tried the environment variable.  I'm not sure where it needs to go.

Here's the code in the xmail script /etc/rc.d/init.d 

I've added the export to the start_xmail(), rather I added the 
=/var/MailRoot

My MailRoot is actually in /var/MailRoot

Thanks,
Chris

#!/bin/sh
#
# skeleton    example file to build /etc/init.d/ scripts.
#        This file should be used to construct scripts for /etc/init.d.
#
#        Written by Miquel van Smoorenburg <[EMAIL PROTECTED]>.
#        Modified by Davide Libenzi <[email protected]>
#
# Version:    @(#)skeleton  1.8  03-Mar-1998  [EMAIL PROTECTED]
#

XMAIL_ROOT=/var/MailRoot
DEFAULT_DOMAIN=athleticzone.biz
XMAIL_CMD_LINE=""
PATH=$XMAIL_ROOT/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
DAEMON=$XMAIL_ROOT/bin/XMail
NAME=XMail
DESC="XMail server"

test -f $DAEMON || exit 0

set -e
ulimit -c 20000

start_xmail()
{
    MAIL_ROOT=$XMAIL_ROOT
    export MAIL_ROOT=/var/MailRoot
    MAIL_CMD_LINE=$XMAIL_CMD_LINE
    export MAIL_CMD_LINE
    $DAEMON
    while [ ! -f /var/run/$NAME.pid ]
    do
        sleep 1
    done
}

stop_xmail()
{
    if [ -f /var/run/$NAME.pid ]
    then
        echo `date` > $XMAIL_ROOT/.shutdown
        kill -INT `cat /var/run/$NAME.pid`
        while [ -f $XMAIL_ROOT/.shutdown ]
        do
            sleep 1
           done
    fi
}


case "$1" in
  start)
      echo -n "Starting $DESC: "
      start_xmail
      echo "$NAME.[" `cat /var/run/$NAME.pid` "]"
    ;;
  stop)
      echo -n "Stopping $DESC: "
      stop_xmail
      echo "$NAME."
    ;;
  #reload)
    #
    #    If the daemon can reload its config files on the fly
    #    for example by sending it SIGHUP, do it here.
    #
    #    If the daemon responds to changes in its config file
    #    directly anyway, make this a do-nothing entry.
    #
    # echo "Reloading $DESC configuration files."
    # start-stop-daemon --stop --signal 1 --quiet --pidfile \
    #    /var/run/$NAME.pid --exec $DAEMON
  #;;
  restart|force-reload)
    #
    #    If the "reload" option is implemented, move the "force-reload"
    #    option to the "reload" entry above. If not, "force-reload" is
    #    just the same as "restart".
    #
    echo -n "Restarting $DESC: "
    stop_xmail
    sleep 1
    start_xmail
        echo "$NAME.[" `cat /var/run/$NAME.pid` "]"   
    ;;
  *)
    N=/etc/init.d/$NAME
    # echo "Usage: $N {start|stop|restart|reload|force-reload}" >&2
    echo "Usage: $N {start|stop|restart|force-reload}" >&2
    exit 1
    ;;
esac

exit 0


Davide Libenzi wrote:

>On Fri, 26 May 2006, Chris Fink wrote:
>
>  
>
>>I've installed an web app. for keeping track of projects
>>(dotproject.net).  It has an email feature that gives the following
>>error in the /var/log/httpd/error.log.
>>
>>cannot find environment variable: MAIL_ROOT
>>
>>
>>Email from my other web servers works fine.  I'm running PHP 4.2.2,
>>Apache 2.0
>>
>>Any ideas how to fix the issue?
>>    
>>
>
>Are you using the XMail's sendmail? The shell script should have an 
>environment export of that variable is not already there.
>
>
>- Davide
>
>
>-
>To unsubscribe from this list: send the line "unsubscribe xmail" in
>the body of a message to [EMAIL PROTECTED]
>For general help: send the line "help" in the body of a message to
>[EMAIL PROTECTED]
>
>
>  
>
-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]

Reply via email to