#! /bin/sh
#
# This zshell script recreates the FQDN alias map
#
#  THIS IS IN PRACTICE SUPERCEDED BY THE  'zmailer newdb'  MECHANISM!
#
# NB!  If your kernel supports #! but the mechanism fails mysteriously when
# invoking this file, remember the total length of the command's path is
# limited to 30 characters or so.
#

if [ -z "$ZCONFIG" ] ; then
    ZCONFIG=/opt/mail/zmailer.conf
fi

. $ZCONFIG
export ZCONFIG

SOPT=""
if [ "x$1" = "x-s" ]; then
  SOPT="-s"
  shift
fi

$MAILBIN/newaliases $SOPT $MAILVAR/db/fqdnaliases
