On Tuesday 11 February 2003 03:46, [EMAIL PROTECTED] wrote:
> >> When that new message comes in, TMDA recognizes the


<snip>


> >
> > Bryan
>
> Ok, that was the problem!   Once I seperated that into 2 lines everything
> fell into place.  I am oh so very greatful for your patience.  Just for
> clarification, in case someone else comes along and reads this, the file
> now looks like this (line breaks are too hard to see in many mail programs
> so this should be 3 lines below but can be typed as 1  \ indicates that
> the next line is a part of the current one).
>
> | preline /var/vpopmail/tmda-0.68/bin/tmda-filter -c \
>
> /var/vpopmail/domains/techropolis.com/.tmdarc-tmda
> /var/vpopmail/domains/techropolis.com/tmda/Maildir/
>
> One last thing I have, I would like to have tmda-ofmipd runing either as
> it's own seperate user or as vpopmail.  If I su to a user and run it it
> only seems to run for a short period of time.  Is there a way to build a
> supervise/services for it to keep it running and to run as a non root user
> in global mode?

Ah. I am an expert here. I struggled with tmda-ofmipd and supervise for a
long time.

See attached text file for detailed tmda-ofmipd+supervise installation
instructions after the tradition of "Life With Qmail". It's written for TMDA
0.69, and taken from my personal webserver installation notes.

However, please note that my installation is VpopMail+TMDA, and so I run
Virtual Domain options in my tmda-ofmipd RUN script. Customize that exec
line to taste.

Jason, what do you say we add a HOW-TO for running tmda-ofmipd with supervise?

Pretty much everything you need is in the file I have attached.


>
>
> Thanks again, you guys are great!
> Bryan
>
>
>
> _____________________________________________
> tmda-users mailing list ([EMAIL PROTECTED])
> http://tmda.net/lists/listinfo/tmda-users

-- 
Jesse Guardiani, Systems Administrator
WingNET Internet Services,
P.O. Box 2605 // Cleveland, TN 37320-2605
423-559-LINK (v)  423-559-5145 (f)
http://www.wingnet.net

We are actively looking for companies that do a lot of long
distance faxing and want to cut their long distance bill by
up to 50%.  Contact [EMAIL PROTECTED] for more info.

# --
# Create the ofmipdctl script
# --
    
    vim /usr/local/tmda/bin/ofmipdctl

# *****************************************************************
# NOTE: Place this script in /usr/local/tmda/bin/ofmipdctl
# *****************************************************************

#!/bin/sh

# For Red Hat chkconfig
# chkconfig: - 80 30
# description: the TMDA ofmipd python script

PATH=/usr/local/tmda/bin:/bin:/usr/bin:/usr/local/bin:/usr/local/sbin
export PATH

case "$1" in
  start)
    echo "Starting tmda-ofmipd"
    if svok /service/tmda-ofmipd ; then
      svc -u /service/tmda-ofmipd
    else
      echo tmda-ofmipd supervise not running
    fi  
    if [ -d /var/lock/subsys ]; then
      touch /var/lock/subsys/tmda-ofmipd
    fi
    ;;
  stop)
    echo "Stopping tmda-ofmipd..."
    echo "  tmda-ofmipd"
    svc -d /service/tmda-ofmipd
    if [ -f /var/lock/subsys/tmda-ofmipd ]; then
      rm /var/lock/subsys/tmda-ofmipd
    fi
    ;;
  stat)
    svstat /service/tmda-ofmipd
    svstat /service/tmda-ofmipd/log
    ;;
  hup)
    echo "Sending HUP signal to tmda-ofmipd."
    svc -h /service/tmda-ofmipd
    ;;
  help)
    cat <<HELP
   stop -- stops tmda-ofmipd service (smtp connections refused, nothing goes out)
  start -- starts tmda-ofmipd service (smtp connection accepted, mail can go out)
   stat -- displays status of tmda-tofmipd service
    hup -- same as reload
HELP
    ;;
  *)
    echo "Usage: $0 {start|stop|stat|hup|help}"
    exit 1
    ;;
esac

exit 0


# --
# Create your boot symlink to ofmipdctl:
# --
    ln -s /usr/local/tmda/bin/ofmipdctl /usr/local/etc/rc.d/ofmipdctl.sh


# --
# Make ofmipdctl an executable and link to path:
# --
    chmod 755 /usr/local/tmda/bin/ofmipdctl
    chown vpopmail /usr/local/tmda/bin/ofmipdctl
    ln -s /usr/local/tmda/bin/ofmipdctl /usr/local/bin


# -----------------------------------------------------------------
# 14.) Create supervise scripts/directories for tmda-ofmipd
# -----------------------------------------------------------------

# --
# Create the supervise directories for the tmda-ofmipd service:
# --

    mkdir -p /usr/local/tmda/supervise/tmda-ofmipd/log

    vim /usr/local/tmda/supervise/tmda-ofmipd/run
# --
# Create the /usr/local/tmda/supervise/tmda-ofmipd/run file:
# --

#!/bin/sh
exec su -l vpopmail -c "exec /usr/local/tmda/bin/tmda-ofmipd -f -p 0.0.0.0:8025 -R 
imaps -S /usr/local/tmda/contrib/vpopmail-vdir.sh" 2>&1


    vim /usr/local/tmda/supervise/tmda-ofmipd/log/run
# --
# Create the /usr/local/tmda/supervise/tmda-ofmipd/log/run file:
# --

#!/bin/sh
exec /usr/local/bin/setuidgid vpopmail /usr/local/bin/multilog t /var/log/tmda-ofmipd


# Make the run files executable:

    chmod 755 /usr/local/tmda/supervise/tmda-ofmipd/run
    chmod 755 /usr/local/tmda/supervise/tmda-ofmipd/log/run

# Then set up the log directories:

    mkdir -p /var/log/tmda-ofmipd
    chown vpopmail /var/log/tmda-ofmipd 

# Finally, link the supervise directory into /service:

    ln -s /usr/local/tmda/supervise/tmda-ofmipd /service

# *****************************************************************
# Note: The tmda-ofmipd script will start automatically shortly 
#       after these links are created. If you don't want it running
#       yet, do the following:
# *****************************************************************
    ofmipdctl stop

Reply via email to