Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 268001 Details for
Bug 397711
[RFE] [PATCH] make yum-updatesd use sendmail
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
yum-updatesd-sendmail.patch
yum-updatesd-sendmail.patch (text/plain), 3.40 KB, created by
Pierre Ossman
on 2007-11-24 11:44:26 UTC
(
hide
)
Description:
yum-updatesd-sendmail.patch
Filename:
MIME Type:
Creator:
Pierre Ossman
Created:
2007-11-24 11:44:26 UTC
Size:
3.40 KB
patch
obsolete
>--- yum-updatesd-helper.orig2 2007-11-24 12:23:38.000000000 +0100 >+++ yum-updatesd-helper 2007-11-24 12:32:56.000000000 +0100 >@@ -26,6 +26,7 @@ > from email.MIMEText import MIMEText > import socket > import rfc822 >+import subprocess > > > import yum >@@ -137,11 +138,12 @@ > > > class EmailUpdateEmitter(UpdateEmitter): >- def __init__(self, sender, rcpts, smtp_server): >+ def __init__(self, sender, rcpts, smtp_server, sendmail): > UpdateEmitter.__init__(self) > self.sender = sender > self.rcpts = rcpts > self.smtp_server = smtp_server >+ self.sendmail = sendmail > > def _msgGreeting(self): > output = """Hi, >@@ -170,13 +172,18 @@ > msg['To'] = self.rcpts > msg['Date'] = rfc822.formatdate() > >- s = smtplib.SMTP() >- if self.smtp_server: >- s.connect(self.smtp_server) >+ if self.sendmail: >+ p = subprocess.Popen("/usr/bin/sendmail", stdin=subprocess.PIPE) >+ p.stdin.write(str(msg)) >+ p.communicate() > else: >- s.connect() >- s.sendmail(self.sender, self.rcpts.split(','), msg.as_string()) >- s.close() >+ s = smtplib.SMTP() >+ if self.smtp_server: >+ s.connect(self.smtp_server) >+ else: >+ s.connect() >+ s.sendmail(self.sender, self.rcpts.split(','), msg.as_string()) >+ s.close() > > def updatesAvailable(self, updateInfo): > num = len(updateInfo) >@@ -334,7 +341,8 @@ > if self.options.email: > self.emitters.append(EmailUpdateEmitter(self.options.emailfrom, > self.options.emailto, >- self.options.smtpserver)) >+ self.options.smtpserver, >+ self.options.sendmail)) > if self.options.syslog: > self.emitters.append(SyslogUpdateEmitter(self.options.logfacility, > self.options.logident, >@@ -588,6 +596,7 @@ > parser.add_option("", "--email-from", type="string", default="root", dest="emailfrom") > parser.add_option("", "--email-to", type="string", default="root", dest="emailto") > parser.add_option("", "--smtp-server", type="string", default="localhost:25", dest="smtpserver") >+ parser.add_option("", "--sendmail", action="store_true", default=False, dest="sendmail") > > (options, args) = parser.parse_args() > >--- yum-updatesd.orig 2007-11-24 12:34:19.000000000 +0100 >+++ yum-updatesd 2007-11-24 12:37:02.000000000 +0100 >@@ -55,6 +55,7 @@ > email_to = ListOption(["root"]) > email_from = Option("root") > smtp_server = Option("localhost:25") >+ use_sendmail = BoolOption(True) > dbus_listener = BoolOption(True) > do_update = BoolOption(False) > do_download = BoolOption(False) >@@ -168,6 +169,8 @@ > args.extend(["--email", "--email-from=%s" %(opts.email_from,), > "--email-to=%s" %(",".join(opts.email_to),), > "--smtp-server=%s" %(opts.smtp_server)]) >+ if opts.use_sendmail: >+ args.append("--sendmail") > if "syslog" in opts.emit_via: > args.extend(["--syslog", "--syslog-level=%s" %(opts.syslog_level,), > "--syslog-facility=%s" %(opts.syslog_facility,),
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 397711
: 268001 |
282291
|
282301