Bug 1032467 - [RFE] Configuration of email notifications
[RFE] Configuration of email notifications
Status: CLOSED ERRATA
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-hosted-engine-setup (Show other bugs)
3.3.0
Unspecified Unspecified
high Severity low
: ---
: 3.3.0
Assigned To: Sandro Bonazzola
Leonid Natapov
integration
: FutureFeature
Depends On: 1030437
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-20 04:33 EST by Sandro Bonazzola
Modified: 2014-01-21 11:55 EST (History)
9 users (show)

See Also:
Fixed In Version: ovirt-hosted-engine-setup-1.0.0-0.9.beta4.el6ev
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: 1030437
Environment:
Last Closed: 2014-01-21 11:55:15 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 21415 None None None Never
oVirt gerrit 21451 None None None Never
Red Hat Product Errata RHBA-2014:0083 normal SHIPPED_LIVE new package: ovirt-hosted-engine-setup 2014-01-21 16:42:22 EST

  None (edit)
Description Sandro Bonazzola 2013-11-20 04:33:04 EST
+++ This bug was initially created as a clone of Bug #1030437 +++

I am working on a feature that can report state changes using email. For that I need to configure the broker so it can send emails.

I will need the following information:

- smtp server and port
- From email address
- list of To email addresses

The configuration will be in $(engine_ha_confdir)/notifications.conf and will look like this:

[email]
smtp_server=localhost
smtp_port=25
source_email=root@localhost
destination_emails=root@localhost "Martin Sivak <msivak@redhat.com>" "John 'Master' Doe <john@doe.com>"

There will be other sections in that file as well and those need to be kept intact for now.

--- Additional comment from Sandro Bonazzola on 2013-11-14 08:07:19 EST ---

Didi, can you take care of this? Martin correct me if I'm wrong, this is just a plain ini file parsable by ConfigParser right?
If so I think that multiple values for one key should be separated by ';'
Pay attention in escaping properly " and ' if needed.

--- Additional comment from Yedidyah Bar David on 2013-11-18 04:29:46 EST ---

I recommend to drop the "real name" part and delimit with commas, as is common in sendmail's command line. I also recommend to be very conservative in what chars we accept in email addresses - these are used for notifications and we want them to work also if the mail goes through old/buggy/unconfigured smtp gateways. E.g. allow only something like '[a-zA-Z_.-]+@[a-zA-Z_.-]+' -

destination_emails=root@localhost,admin@example.com

Also, do we want to allow to filter sending these emails based on e.g. severity or something like that?

--- Additional comment from Martin Sivák on 2013-11-18 04:42:31 EST ---

We could delimit with commas, I was actually thinking about that. Space was just easier for the initial implementation thanks to shlex :)

But I would like to support real names as we are using them in the email header (From,To) as well. And receiving email from "Hosted engine <root@localhost>" is quite different from just root@localhost.

--- Additional comment from Yedidyah Bar David on 2013-11-18 05:26:01 EST ---

(In reply to Martin Sivák from comment #3)
> We could delimit with commas, I was actually thinking about that. Space was
> just easier for the initial implementation thanks to shlex :)
> 
> But I would like to support real names as we are using them in the email
> header (From,To) as well. And receiving email from "Hosted engine
> <root@localhost>" is quite different from just root@localhost.

I guess that users who care will configure it to be something like 'ovirt-notifications@example.com' and point that address to their ticketing system, so that they can reply and track issues. The address does not need to be local, or related to the machine the mail is sent from. I think allowing "real names" will complicate parsing, might lead to new bugs etc., and is not really needed. Most similar notifiers I have used in the past did not allow that either.
Comment 1 Sandro Bonazzola 2013-11-20 05:29:28 EST
Merged on upstream master, pushed to 1.0 branch.
Comment 2 Sandro Bonazzola 2013-11-20 05:36:51 EST
Merged also on upstream 1.0 branch, waiting acks for porting this downstream.
Comment 4 Charlie 2013-11-27 20:19:39 EST
This bug is currently attached to errata RHBA-2013:15257. If this change is not to be documented in the text for this errata please either remove it from the errata, set the requires_doc_text flag to 
minus (-), or leave a "Doc Text" value of "--no tech note required" if you do not have permission to alter the flag.

Otherwise to aid in the development of relevant and accurate release documentation, please fill out the "Doc Text" field above with these four (4) pieces of information:

* Cause: What actions or circumstances cause this bug to present.
* Consequence: What happens when the bug presents.
* Fix: What was done to fix the bug.
* Result: What now happens when the actions or circumstances above occur. (NB: this is not the same as 'the bug doesn't present anymore')

Once filled out, please set the "Doc Type" field to the appropriate value for the type of change made and submit your edits to the bug.

For further details on the Cause, Consequence, Fix, Result format please refer to:

https://bugzilla.redhat.com/page.cgi?id=fields.html#cf_release_notes 

Thanks in advance.
Comment 5 Sandro Bonazzola 2013-12-05 06:02:25 EST
hosted engine is a new package, does not need errata for specific bugs during its development.

Adding flag for release note, since I think this feature should be documented there.
Comment 6 errata-xmlrpc 2014-01-21 11:55:15 EST
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.

http://rhn.redhat.com/errata/RHBA-2014-0083.html

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