Paulo Jan <[EMAIL PROTECTED]> wrote on Thu, 18 May 2000:
>       1) maildirsmtp gets executed. The server starts sending out the 30 Mb.
> or so of messages.
>       2) After 30 minutes, the queue hasn't been sent completely yet, but
> another instance of maildirsmtp is started, and begins sending messages
> from the queue again.

When I was using a similar setup, I had this code snippet as part of my
"pppdeliver" script that invoked maildirsmtp:

# Sanity check to avoid two copies running simultaneously
if [ -e $PIDFILE ]; then
  # pppdeliver is already running
  OTHERPID=`cat $PIDFILE`
  logger -t pppdeliver -p mail.notice [$$] Already running at PID $OTHERPID
  exit 1
else
  echo $$ > $PIDFILE
fi

It's not secure etc. etc. but it worked. :-)
Also the script would of course rm $PIDFILE before exiting.

Anyway, any other sort of locking mechanism should work just as well I
imagine.  Sorry, I don't know enough about maildirsmtp to answer your
other questions.


Regards,
Mikko
-- 
// Mikko H�nninen, aka. Wizzu  //  [EMAIL PROTECTED]  //  http://www.iki.fi/wiz/
// The Corrs list maintainer  //   net.freak  //   DALnet IRC operator /
// Interests: roleplaying, Linux, the Net, fantasy & scifi, the Corrs /
Change is inevitable, except from a vending machine.

Reply via email to