From 4ddf1694b26958aff1ebbc4d4e88bb87d340b2ed Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Wed, 26 Mar 2008 16:46:36 +0000 Subject: [PATCH] Support ${HOST} substitution in "From" field. Thanks to wschlich. svn path=/main/trunk/; revision=9510 --- pym/portage/elog/mod_mail.py | 1 + pym/portage/elog/mod_mail_summary.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pym/portage/elog/mod_mail.py b/pym/portage/elog/mod_mail.py index 922ea0846..09e3db22d 100644 --- a/pym/portage/elog/mod_mail.py +++ b/pym/portage/elog/mod_mail.py @@ -14,6 +14,7 @@ def process(mysettings, key, 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}", key) mysubject = mysubject.replace("${HOST}", socket.getfqdn()) diff --git a/pym/portage/elog/mod_mail_summary.py b/pym/portage/elog/mod_mail_summary.py index 2e870fe5d..40a2484a6 100644 --- a/pym/portage/elog/mod_mail_summary.py +++ b/pym/portage/elog/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()) -- 2.26.2