- Add apache to list of users that can send mail as others without a
[myplc.git] / plc.d / mail
index 6698a68..fe31b25 100755 (executable)
@@ -7,13 +7,16 @@
 # 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: mail,v 1.3 2006/06/23 20:29:22 mlhuang Exp $
 #
 
 # 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
@@ -23,6 +26,10 @@ case "$1" in
        MESSAGE=$"Starting mail server"
        dialog "$MESSAGE"
 
+       # 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
+
        service sendmail start
        check