# $Id: 310-ezmlm-split 176 2005-01-04 19:18:37Z bruce $

###############
# ezmlm-split #
###############

if [ $SECT -le 3 ]; then

  prompt "ezmlm-split (2/2):    "

# we know that ezmlm-manage works. A bounce would go to MODDIR, so a
# message in SINKDIR means that the request was forwarded to ezmlm-manage,
# which replied with a confirmation request.
  ${GREP} 'X-num: spl1' $SINKDIR/new/* > /dev/null 2>&1 || \
	{ ${ECHO} "failed to receive sub conf req.";
	  ${ECHO} "this could be a failure of ezmlm-split, but usually,";
	  ${ECHO} "it happens because ezmlm binaries when run by qmail";
	  ${ECHO} "don't have access to shared libraries required for";
	  ${ECHO} "RDBMS access. This happens on systems where RDBMS";
	  ${ECHO} "shared libs are installed in the /usr/local hierarchy.";
	  ${ECHO} "fix: see ld.so man page on how to modify /etc/ld.so.conf";
	  ${ECHO} "or compile statically by adding -static to conf-sqlld.";
	  ${ECHO}
	  exit 100; }

  ${ECHO} "OK"

fi
