From 3f4bc03346174f48b69854705d5905909c606892 Mon Sep 17 00:00:00 2001 From: root Date: Sat, 29 Sep 2007 13:17:01 +0200 Subject: [PATCH] On regarde en priorite dans $SUDO_USER pour determiner l'expediteur du mail. darcs-hash:20070929111701-dc76e-3e753a724a6d88672b8bb88ca6492e8ad5fc4c1e.gz --- syncmail | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syncmail b/syncmail index d015e287..fbb040be 100755 --- a/syncmail +++ b/syncmail @@ -243,7 +243,7 @@ def blast_mail(subject, people, entries, contextlines, fromhost, replyto, charse # Create the smtp connection to the localhost conn = smtplib.SMTP() conn.connect(MAILHOST, MAILPORT) - user = pwd.getpwuid(os.getuid())[0] + user = os.getenv("SUDO_USER", pwd.getpwuid(os.getuid())[0]) name = string.split(pwd.getpwuid(os.getuid())[4], ',')[0] # Modif pour avoir le bon from (=> signature automatique)