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)