# Mark Huang <mlhuang@cs.princeton.edu>
# Copyright (C) 2006 The Trustees of Princeton University
#
-# $Id: mail,v 1.1 2006/04/24 15:49:32 mlhuang Exp $
+# $Id$
#
# Source function library and configuration
. /etc/plc.d/functions
. /etc/planetlab/plc_config
+# Be verbose
+set -x
+
case "$1" in
start)
if [ "$PLC_MAIL_ENABLED" != "1" ] ; then
MESSAGE=$"Starting mail server"
dialog "$MESSAGE"
- service sendmail start
+ # Add apache to list of users that can send mail as others
+ # without a warning, so that the API can send out mail.
+ echo "apache" >/etc/mail/trusted-users
+
+ (exec 3>&- 4>&- ; service sendmail start)
check
result "$MESSAGE"