diff --git a/syncmail b/syncmail index db484b02..d015e287 100755 --- a/syncmail +++ b/syncmail @@ -246,13 +246,13 @@ def blast_mail(subject, people, entries, contextlines, fromhost, replyto, charse user = pwd.getpwuid(os.getuid())[0] name = string.split(pwd.getpwuid(os.getuid())[4], ',')[0] - # Modif pour avoir le bon from (=> signature automatique) - if user=="root" : - for proc in os.popen("ps --no-headers -o user -t $(ps --no-headers -o tty %s)" % os.getpid() ).readlines() : - userp=string.strip(proc) - if userp=="root" : break - else : user=userp - name = string.split(pwd.getpwnam(user)[4], ',')[0] + # Modif pour avoir le bon from (=> signature automatique) + if user=="root" : + for proc in os.popen("ps --no-headers -o user -t $(ps --no-headers -o tty %s)" % os.getpid() ).readlines() : + userp=string.strip(proc) + if userp=="root" : break + else : user=userp + name = string.split(pwd.getpwnam(user)[4], ',')[0] domain = fromhost or getfqdn() host = string.split(domain,'.')[0]