RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1330670 - [PATCH] Have yum-cron provide hostname for from email
Summary: [PATCH] Have yum-cron provide hostname for from email
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: yum
Version: 7.2
Hardware: All
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Valentina Mukhamedzhanova
QA Contact: Karel Srot
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-26 17:06 UTC by Pat Riehecky
Modified: 2016-11-04 05:32 UTC (History)
6 users (show)

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'.
Clone Of: 1121189
Environment:
Last Closed: 2016-11-04 05:32:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:2397 0 normal SHIPPED_LIVE yum bug fix and enhancement update 2016-11-03 13:55:12 UTC

Description Pat Riehecky 2016-04-26 17:06:56 UTC
+++ This bug was initially created as a clone of Bug #1121189 +++

Description of problem: It would be nice if yum-cron could fill out the 'from' section a bit more elegantly when left to the defaults.  The program already locates the hostname, so I thought it might be nice if it used that for 'from' if left at the defaults.


Version-Release number of selected component (if applicable):yum-cron-3.4.3-152.fc21.noarch.rpm


How reproducible:100%


Steps to Reproduce:
1.enable sending email
2.note it comes from root@localhost
3.

Actual results:
From: root@localhost

Expected results:
something more specific

Additional info:
Attached patch resolves.

--- Additional comment from Rex Dieter on 2014-10-31 14:17:32 EDT ---

triaging to yum component

--- Additional comment from Jaroslav Reznik on 2015-03-03 11:08:11 EST ---

This bug appears to have been reported against 'rawhide' during the Fedora 22 development cycle.
Changing version to '22'.

More information and reason for this action is here:
https://fedoraproject.org/wiki/Fedora_Program_Management/HouseKeeping/Fedora22

Comment 2 Valentina Mukhamedzhanova 2016-06-03 11:38:24 UTC
Thanks for the patch!

Comment 5 Karel Srot 2016-07-04 11:19:06 UTC
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.

Comment 6 Karel Srot 2016-07-04 11:22:42 UTC
(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.

Comment 8 Valentina Mukhamedzhanova 2016-07-18 13:22:35 UTC
Done.

Comment 11 errata-xmlrpc 2016-11-04 05:32:04 UTC
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


Note You need to log in before you can comment on or make changes to this bug.