Fin du mnage de l'indentation
darcs-hash:20070911175220-72cb0-9a5771057190cd3791fce0399965a9d67b5205fe.gz
This commit is contained in:
parent
21f551a2c1
commit
b21163ba8b
1 changed files with 7 additions and 7 deletions
14
syncmail
14
syncmail
|
@ -246,13 +246,13 @@ def blast_mail(subject, people, entries, contextlines, fromhost, replyto, charse
|
||||||
user = pwd.getpwuid(os.getuid())[0]
|
user = pwd.getpwuid(os.getuid())[0]
|
||||||
name = string.split(pwd.getpwuid(os.getuid())[4], ',')[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" :
|
||||||
for proc in os.popen("ps --no-headers -o user -t $(ps --no-headers -o tty %s)" % os.getpid() ).readlines() :
|
for proc in os.popen("ps --no-headers -o user -t $(ps --no-headers -o tty %s)" % os.getpid() ).readlines() :
|
||||||
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]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue