Skip to content

Commit

Permalink
yum-cron: replace 'localhost' with system_name value in email_from. B…
Browse files Browse the repository at this point in the history
…Z 1330670
  • Loading branch information
megaumi committed Jun 30, 2016
1 parent 94e1366 commit 8bc8251
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions etc/yum-cron-hourly.conf
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ output_width = 80

[email]
# The address to send email messages from.
# NOTE: 'localhost' will be replaced with the value of system_name.
email_from = root

# List of addresses to send messages to.
Expand Down
1 change: 1 addition & 0 deletions etc/yum-cron-security.conf
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ output_width = 80

[email]
# The address to send email messages from.
# NOTE: 'localhost' will be replaced with the value of system_name.
email_from = root

# List of addresses to send messages to.
Expand Down
1 change: 1 addition & 0 deletions etc/yum-cron.conf
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ output_width = 80

[email]
# The address to send email messages from.
# NOTE: 'localhost' will be replaced with the value of system_name.
email_from = root@localhost

# List of addresses to send messages to.
Expand Down
2 changes: 1 addition & 1 deletion yum-cron/yum-cron.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def sendMessages(self):
charset = 'us-ascii'
msg = MIMEText(output, 'plain', charset)
msg['Subject'] = self.subject
msg['From'] = self.opts.email_from
msg['From'] = self.opts.email_from.replace('localhost', self.opts.system_name)
msg['To'] = ",".join(self.opts.email_to)

# Send the email
Expand Down

0 comments on commit 8bc8251

Please sign in to comment.