Bug 1330670
| Summary: | [PATCH] Have yum-cron provide hostname for from email | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Pat Riehecky <riehecky> |
| Component: | yum | Assignee: | Valentina Mukhamedzhanova <vmukhame> |
| Status: | CLOSED ERRATA | QA Contact: | Karel Srot <ksrot> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 7.2 | CC: | admiller, extras-orphan, extras-qa, james.antill, rdieter, vmukhame |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | yum-3.4.3-145.el7 | Doc Type: | Enhancement |
| Doc Text: |
Feature:
This is an enhancement for yum-cron config files. If the domain part of the email address in "email_from" config option is set to 'localhost', it will be replaced with the value of "system_name" config option.
Reason:
System administrators with many systems need a way to determine which system the email is coming from.
Result:
With default values of config options, the emails from yum-cron will be coming from the address that contains a specific system name instead of 'localhost'.
|
Story Points: | --- |
| Clone Of: | 1121189 | Environment: | |
| Last Closed: | 2016-11-04 05:32:04 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Pat Riehecky
2016-04-26 17:06:56 UTC
Thanks for the patch! The proposed patch does only string replace
+ # transform 'localhost' into a more specific descriptor
+ email_from = self.opts.email_from.replace('localhost', self.opts.system_name)
I think it should be improved so it does the substitution only in case the opts.email_from matches exactly the default value (localhost). It is not very likely that my customized email_from would be something like "mylocalhost" but if it were, proposed change would not alter the default value but my customized value. Moreover, I would propose to extend the configuration file with a comment mentioning that such substitution is happening.
(In reply to Karel Srot from comment #5) > Moreover, I would propose to extend the > configuration file with a comment mentioning that such substitution is > happening. Ignore this part, I can see that the config file has been updated. Done. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2397.html |