C'est mieux comme ca.

darcs-hash:20070929112143-dc76e-2e3d4a438eebd96a9a886244fd356c07a2d1f923.gz
This commit is contained in:
root 2007-09-29 13:21:43 +02:00
parent 3f4bc03346
commit 757a97ec31

View file

@ -244,7 +244,6 @@ def blast_mail(subject, people, entries, contextlines, fromhost, replyto, charse
conn = smtplib.SMTP()
conn.connect(MAILHOST, MAILPORT)
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)
if user=="root" :
@ -252,8 +251,8 @@ def blast_mail(subject, people, entries, contextlines, fromhost, replyto, charse
userp=string.strip(proc)
if userp=="root" : break
else : user=userp
name = string.split(pwd.getpwnam(user)[4], ',')[0]
name = string.split(pwd.getpwnam(user)[4], ',')[0]
domain = fromhost or getfqdn()
host = string.split(domain,'.')[0]
address = '%s@crans.org' % user