start-method revision 4151
#
# CDDL HEADER START
#
# The contents of this file are subject to the terms of the
# Common Development and Distribution License (the "License").
# You may not use this file except in compliance with the License.
#
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
# See the License for the specific language governing permissions
# and limitations under the License.
#
# When distributing Covered Code, include this CDDL HEADER in each
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
# If applicable, add the following below this CDDL HEADER, with the
# fields enclosed by brackets "[]" replaced with your own identifying
# information: Portions Copyright [yyyy] [name of copyright owner]
#
# CDDL HEADER END
#
{
# Check the alias configuration. Per
# On systems with NIS, the default is to search the local alias
# database, then the NIS alias database.
# All Solaris systems ship "with NIS", but unless NIS is configured for
# aliases, this will cause problems, so check and tweak the default if
# NIS is not configured.
alias_maps=$(/usr/sbin/postconf -h alias_maps)
# We have the default Postfix setting.
# NIS is not configured, so change the Postfix setting.
alias_maps="hash:/etc/mail/aliases"
fi
fi
# Check for LDAP: if configured via the switch, then (if needed)
# create $LDAP_ALIASES and configure in alias_maps.
if [[ $aliasprop != ${aliasprop/ldap} ]]; then
# LDAP is configured for aliases.
if [[ ! -f $LDAP_ALIASES ]]; then
# $LDAP_ALIASES does not exist yet, so create it.
servers=$(/usr/sbin/ldapclient list | \
grep NS_LDAP_SERVERS | \
basedn=$(/usr/sbin/ldapclient list | \
echo "result_attribute = mgrpRFC822MailMember" >> \
fi
# No "ldap:" entry yet in alias_maps, so add one.
alias_maps="$alias_maps, ldap:$LDAP_ALIASES"
fi
fi
}
# First, make sure we have a valid domain name.
myhostname=$(/usr/bin/hostname)
case $myhostname in
*.*)
# Fully qualified: we're set.
;;
*)
# Unqualified; fall back to postconf.
*.*)
# Fully qualified: we're set.
;;
echo "Domain name cannot be determined."
echo "Either set hostname to a fully-qualified value,"
echo "or run '/usr/sbin/postconf mydomain=YOUR.DOMAIN'."
exit $SMF_EXIT_ERR_CONFIG
;;
esac
esac
# Second, tweak aliases for NIS and LDAP as needed.
if [[ $auto == true ]]; then
fi
# Finally, start the daemon.
exit 0