X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=plc.d%2Fmail;h=01441b74895c9b7a84e1be3c78f5964a5ac51b33;hb=fe9648c46de34c2d98466349f8f73f610a93bbec;hp=fba09737630f3d9f41803d51cb6931d04f501f24;hpb=5d6ee9df0f38af59e99f88374e38d0317154c739;p=myplc.git diff --git a/plc.d/mail b/plc.d/mail index fba0973..01441b7 100755 --- a/plc.d/mail +++ b/plc.d/mail @@ -28,7 +28,10 @@ case "$1" in # 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 + count=$(grep ^apache /etc/mail/trusted-users|wc -l) + if [ $count -eq 0 ] ; then + echo "apache" >>/etc/mail/trusted-users + fi (exec 3>&- 4>&- ; service sendmail start) check