C'est mieux comme ca.
darcs-hash:20070929112143-dc76e-2e3d4a438eebd96a9a886244fd356c07a2d1f923.gz
This commit is contained in:
parent
3f4bc03346
commit
757a97ec31
1 changed files with 2 additions and 3 deletions
3
syncmail
3
syncmail
|
@ -244,7 +244,6 @@ def blast_mail(subject, people, entries, contextlines, fromhost, replyto, charse
|
||||||
conn = smtplib.SMTP()
|
conn = smtplib.SMTP()
|
||||||
conn.connect(MAILHOST, MAILPORT)
|
conn.connect(MAILHOST, MAILPORT)
|
||||||
user = os.getenv("SUDO_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)
|
# Modif pour avoir le bon from (=> signature automatique)
|
||||||
if user=="root" :
|
if user=="root" :
|
||||||
|
@ -252,8 +251,8 @@ def blast_mail(subject, people, entries, contextlines, fromhost, replyto, charse
|
||||||
userp=string.strip(proc)
|
userp=string.strip(proc)
|
||||||
if userp=="root" : break
|
if userp=="root" : break
|
||||||
else : user=userp
|
else : user=userp
|
||||||
name = string.split(pwd.getpwnam(user)[4], ',')[0]
|
|
||||||
|
|
||||||
|
name = string.split(pwd.getpwnam(user)[4], ',')[0]
|
||||||
domain = fromhost or getfqdn()
|
domain = fromhost or getfqdn()
|
||||||
host = string.split(domain,'.')[0]
|
host = string.split(domain,'.')[0]
|
||||||
address = '%s@crans.org' % user
|
address = '%s@crans.org' % user
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue