X-Git-Url: http://git.onelab.eu/?p=mom.git;a=blobdiff_plain;f=pl_mom.py;h=bcb77c44eae55a91ce54c416fa708ad47d9f2cd1;hp=0c05740a03054332f6e36053277d637e7c4011c5;hb=70ca61230840d22697c074819918f7c992642c9d;hpb=7f4bbf5280c7f1dfdce489599f450c65c213ff5c diff --git a/pl_mom.py b/pl_mom.py index 0c05740..bcb77c4 100644 --- a/pl_mom.py +++ b/pl_mom.py @@ -5,7 +5,7 @@ # Mark Huang # Copyright (C) 2006 The Trustees of Princeton University # -# $Id: pl_mom.py,v 1.4 2006/06/02 04:00:00 mlhuang Exp $ +# $Id$ # import os @@ -23,8 +23,8 @@ except: print "Warning: Configuration file /etc/planetlab/plc_config.py not found" PLC_NAME = "PlanetLab" PLC_SLICE_PREFIX = "pl" - PLC_MAIL_SUPPORT_ADDRESS = "support@planet-lab.org" - PLC_MAIL_SLICE_ADDRESS = "SLICE@slices.planet-lab.org" + PLC_MAIL_SUPPORT_ADDRESS = "root@" + socket.gethostname() + PLC_MAIL_SLICE_ADDRESS = "SLICE@" + socket.gethostname() def format_bytes(bytes, si = True): """ @@ -86,13 +86,9 @@ def removepid(prog): os.unlink("/var/run/%s.pid" % prog) def slicemail(slice, subject, body): - sendmail = os.popen("/usr/sbin/sendmail -t -f%s" % PLC_MAIL_SUPPORT_ADDRESS, "w") + sendmail = os.popen("/usr/sbin/sendmail -N never -t -f%s" % PLC_MAIL_SUPPORT_ADDRESS, "w") - # PLC has a separate list for pl_mom messages - if PLC_MAIL_SUPPORT_ADDRESS == "support@planet-lab.org": - to = ["pl-mom@planet-lab.org"] - else: - to = [PLC_MAIL_SUPPORT_ADDRESS] + to = [PLC_MAIL_MOM_LIST_ADDRESS] if slice is not None and slice != "root": to.append(PLC_MAIL_SLICE_ADDRESS.replace("SLICE", slice))