On regarde en priorite dans $SUDO_USER pour determiner l'expediteur du mail.
darcs-hash:20070929111701-dc76e-3e753a724a6d88672b8bb88ca6492e8ad5fc4c1e.gz
This commit is contained in:
parent
ecd24110ed
commit
3f4bc03346
1 changed files with 1 additions and 1 deletions
2
syncmail
2
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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue