From: Zac Medico Date: Fri, 28 Mar 2008 12:43:12 +0000 (-0000) Subject: Support ${HOST} substitution in "From" field. Thanks to wschlich. X-Git-Tag: v2.1.5~320 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c1a6c5981162b495003a1c73e3131da0704ab13a;p=portage.git Support ${HOST} substitution in "From" field. Thanks to wschlich. (trunk r9510) svn path=/main/branches/2.1.2/; revision=9570 --- diff --git a/pym/elog_modules/mod_mail.py b/pym/elog_modules/mod_mail.py index 058faa7c0..01771262d 100644 --- a/pym/elog_modules/mod_mail.py +++ b/pym/elog_modules/mod_mail.py @@ -14,6 +14,7 @@ def process(mysettings, cpv, logentries, fulltext): myrecipient = "root@localhost" myfrom = mysettings["PORTAGE_ELOG_MAILFROM"] + myfrom = myfrom.replace("${HOST}", socket.getfqdn()) mysubject = mysettings["PORTAGE_ELOG_MAILSUBJECT"] mysubject = mysubject.replace("${PACKAGE}", cpv) mysubject = mysubject.replace("${HOST}", socket.getfqdn()) diff --git a/pym/elog_modules/mod_mail_summary.py b/pym/elog_modules/mod_mail_summary.py index 339b4b827..50e8171df 100644 --- a/pym/elog_modules/mod_mail_summary.py +++ b/pym/elog_modules/mod_mail_summary.py @@ -39,6 +39,7 @@ def _finalize(mysettings, items): myrecipient = "root@localhost" myfrom = mysettings["PORTAGE_ELOG_MAILFROM"] + myfrom = myfrom.replace("${HOST}", socket.getfqdn()) mysubject = mysettings["PORTAGE_ELOG_MAILSUBJECT"] mysubject = mysubject.replace("${PACKAGE}", count) mysubject = mysubject.replace("${HOST}", socket.getfqdn())