author | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-05-10 03:57:29 UTC |
committer | Alberto Bertogli
<albertito@blitiri.com.ar> 2010-05-10 03:57:29 UTC |
parent | fc8628bb408cfbab0e46a815c570925b037fc04c |
el | +3 | -2 |
diff --git a/el b/el index 9607231..15ef8cb 100755 --- a/el +++ b/el @@ -188,6 +188,7 @@ def send_events(evts): import email import email.mime.text import socket + import random if not config.has_option('email', 'to'): print "Error: destination email needed, check config file" @@ -229,8 +230,8 @@ def send_events(evts): e['To'] = config.get("email", "to") if config.has_option("email", "from"): e['From'] = config.get("email", "from") - e['Message-Id'] = "<%s.%s.%f@%s>" % (os.environ['USER'], today, - time.time(), socket.gethostname()) + e['Message-Id'] = "<%f.%d.%d@%s>" % (time.time(), os.getpid(), + int(random.random() * 100000), socket.gethostname()) e['X-Sender'] = "el" e.set_payload(body, 'utf8')