System Administration Commands smtp-notify(1M) NAME smtp-notify - Email Notification Daemon for Software Events SYNOPSIS /usr/lib/fm/notify/smtp-notify DESCRIPTION smtp-notify is a daemon that subscribes to software events and Fault Management lifecycle events and produces email notifications based on a set of notification preferences which are stored in the SMF service configuration repository. email notification preferences are set using svccfg(1M) smtp-notify is managed by the service management facility, smf(5), under the service FMRI: svc:/system/fm/smtp-notify:default Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(1M). The service's status can be queried using the svcs(1) command. Properties The following service properties can be set config/rootdir This is an astring property that defaults to "/". When set, the specified root directory will be used for all pathnames evaluated by smtp-notify. By default, the body of the email event notification will be based on a set of localized message templates that are delivered with Solaris. smtp-notify will lookup the appropriate template (based on the event class) and fill in the template using elements from the event payload. User-supplied message body template can be substituted by specfiying the "msg_template" notification preference. Refer to svccfg(1m) for more information about setting notification preferences on a per-service or per-event-class basis. The message body template can contain the following expansion macros. These macros will be expanded by smtp-notify before sending the message. Macro Description ----- ----------- %% expands to a literal % character % expands to the hostname on which the event occurred % expands to the URL of the knowledge article associated with this event % expands to the event class % expands to the UUID of the event % expands to the knowledge article message ID % expands to the severity of the event For SMF service state transition events, the following addditional macros can be specified in a message template: % expands to FMRI of the affected service % expands to the previous state of the service % expands to the new state of the service 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 SMF service state transistion events will also 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 EXAMPLES Example 1 Configuring notification preferences for SMF service state transition events # svccfg -s svc:/system/svc/global:default setnotify -g \ from-online,to-maintenance mailto:admin@somehost.com Example 2 Enabling email notifications for Fault Management problem events # svccfg setnotify fma-diagnosis mailto:admin@somehost.com Example 3 Listing notification settings for Fault Management problem events # svccfg listnotify fma-diagnosis ATTRIBUTES See attributes(5) for descriptions of the following attri- butes: ____________________________________________________________ | ATTRIBUTE TYPE | ATTRIBUTE VALUE | |_____________________________|_____________________________| | Availability | SUNWfmd | |_____________________________|_____________________________| | Interface Stability | Unstable | |_____________________________|_____________________________| SEE ALSO svcs(1), svcadm(1M), syslogd(1M), attributes(5), smf(5) NOTES