#!/bin/csh -f
#**********************************************************************
#         Copyright IBM Corporation 1988,1991 - All Rights Reserved
#         For full copyright information see: 'andrew/config/COPYRITE'
#**********************************************************************
# IBM, CARNEGIE MELLON UNIVERSITY, 
# AND THE OTHER COPYRIGHT HOLDERS
#  DISCLAIM ALL WARRANTIES WITH 
# REGARD TO THIS SOFTWARE, INCLUDING 
# ALL IMPLIED WARRANTIES OF MERCHANT-
# ABILITY AND FITNESS. IN 
# NO EVENT SHALL  IBM, CARNEGIE 
# MELLON UNIVERSITY, OR ANY OTHER 
# COPYRIGHT HOLDER BE LIABLE FOR 
# ANY SPECIAL, INDIRECT OR CONSE-
# QUENTIAL DAMAGES OR ANY DAMAGES 
# WHATSOEVER RESULTING FROM LOSS OF
# USE, DATA OR PROFITS, WHETHER IN AN
# ACTION OF CONTRACT, NEGLIGENCE OR
# OTHER TORTIOUS ACTION, ARISING OUT 
# OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#  $
%include pobbconfig.defs
#
# ?[POBBRunWarning]
# ?[POBBRunNotice]

%ifdef pobb_RunAMSDelivery

# Start up specified queuemail demons

set nonomatch

# Start daemons
foreach Q ($$*)
    /bin/echo -n " "
    if ($$Q =~ ?[SlowQueueNamePrefix]* || $$Q =~ test?[SlowQueueNamePrefix]*) then
	?[queuemail] ?[QueuemailCommonArgs] -P -q ?[CellCommonPrefix]?[WorkstationCell]?[CellCommonSuffix]?[CellCommonMailQueueDirSuffix]/$$Q -w ?[QueuemailSlowInterval]	
	?[queuemail] ?[QueuemailCommonArgs] -Ca -C02 -P -q ?[CellCommonPrefix]?[WorkstationCell]?[CellCommonSuffix]?[CellCommonMailQueueDirSuffix]/$$Q -w 9000
    /bin/echo "Ca -C02" >& ?[BigLocalDir]/config/qmCa.$$Q
    else if ($$Q =~ ?[MailQueueNamePrefix]* || $$Q =~ test?[MailQueueNamePrefix]*) then
	?[queuemail] ?[QueuemailCommonArgs] -p -q ?[CellCommonPrefix]?[WorkstationCell]?[CellCommonSuffix]?[CellCommonMailQueueDirSuffix]/$$Q -w ?[QueuemailNormalInterval]
    else
	/bin/echo "(Bad argument to qmd: $$Q) "
    endif
    /bin/echo "q ?[CellCommonPrefix]?[WorkstationCell]?[CellCommonSuffix]?[CellCommonMailQueueDirSuffix]/$$Q" >& ?[BigLocalDir]/config/qm.$$Q
    /bin/echo -n $$Q
end

%endif pobb_RunAMSDelivery
