Hide Forgot
+++ 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
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