1. Introduction 1.1. Project/Component Working Name: smtp-notify: Email Notification Daemon for Software Events 1.2. Name of Document Author/Supplier: Author: Robert Johnston 1.3. Date of This Document: 11/18/2009 1.5. Email Aliases: 1.5.1. Responsible Manager: sridhar.yedunuthula@sun.com 1.5.2. Responsible Engineer: robert.johnston@sun.com 1.5.4. Interest List: swfma@sun.com 4. Technical Description: 4.1. Details: smtp-notify is a small, lightweight daemon that is fully managed by the Service Management Facility (SMF). It uses the interfaces delivered in libfmevent to subscribe to both software and FMA problem lifecycle events. Upon receipt of an event, it produces an email notification based on a set of notification preferences which are stored in the SMF service configuration repository. The following email notification preferences can be set per event class (and per service instance for SMF service transition (STN) events): name type descr ---- ---- ---- active boolean toggles email notifications on/off to string array list of email recipients reply-to string array email addresses for Reply-to header (optional: defaults to root@localhost) msg_template string pathname of message body template For STN events, these properties are attached to the individual service. For all other software events and FMA events, these properties are attached to the instance svc:/system/fm/notify-params:default. A set of default notification preferences for FMA events will be delivered in the manifest for the notify-params instance. Users will be able to query and set notification preferences using svccfg(1M). By default, the message body will be based on a localized message template contained in the portable object files that are delivered in SUNWfmd. smtp-notify will lookup the appropriate template (based on the event class) and fill in the template using elements from the event payload. The admin can optionally set the msg_template notification preference to the pathname of a user supplied message template. This template can contain expansion macros (which are documented in the man page) which reference portions of the event payload. These macros will be filled in by smtp-notify before sending the message. To facilitate email filtering, smtp-notify will create X-headers for the following components of the event payload for all event classes: Header name Value ----------- ----- X-FMEV-HOSTNAME the name of the host on which the event occurred X-FMEV-CLASS the event class X-FMEV-CODE the Knowledge article message ID X-FMEV-SEVERITY the severity of the event X-FMEV-UUID the UUID of the event Notifications for STN events will include the following additional X-headers: Header name Value ----------- ----- X-FMEV-FMRI the FMRI of the affected SMF service X-FMEV-FROM-STATE the previous state of the service X-FMEV-TO-STATE the new state of the service The smtp-notify daemon will be delivered in the SUNWfmd and SUNWfmdr packages. This case has been approved by the FMA Portfolio committee. This case seeks a patch binding. 4.5. Interfaces: Interface Stability Binding --------------------------------------------------------------- service FMRI name Committed Patch msg template expansion macros Committed Patch X-headers Committed Patch 4.11. Security Impact: The daemon initially starts as uid/gid 0/0 in order to bind/create sysevent channels during initialization. After daemon initialization, the smtp-notify daemon will change its uid/gid to noaccess/noaccess. It will also reduce its privileges to the following minimal set: afsr# ppriv 104651 104651: /usr/lib/fm/notify/smtp-notify flags = PRIV_AWARE E: basic,proc_setid I: basic,proc_setid P: basic,proc_setid L: basic,proc_setid The case will introduce the following new authorization for management and configuration of the smtp-notify service: solaris.smf.manage.smtp-notify solaris.smf.value.smtp-notify This case also introduces the "Event Notification Agent Management" profile which will include the above authroizations as well as the new authorizations being added for the snmp-notify service. 5. Reference Documents: smtp-notify(1M) man page and Sample email notifications are available in the case directory. libfmevent PSARC case (2009/573) http://arc.opensolaris.org/caselog/PSARC/2009/573/ Software Events Notification Parameters CLI (2009/617) http://arc.opensolaris.org/caselog/PSARC/2009/617/ 6. Resources and Schedule: 6.4. Product Approval Committee requested information: 6.4.1. Consolidation or Component Name: OS/Net 6.5. ARC review type: Fasttrack 6.6. ARC Exposure: open