Go to main content

man pages section 8: System Administration Commands

Exit Print View

Updated: Wednesday, July 27, 2022



smtp-notify - email notification daemon for software events




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 that are stored in the SMF service configuration repository.

Email notification preferences are set using svccfg(8).

smtp-notify is managed by the service management facility, smf(7), under the service FMRI:


Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using svcadm(8). The service's status can be queried using the svcs(1) command.


The following service properties can be set:


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 the Oracle Solaris operating system. smtp-notify will lookup the appropriate template (based on the event class) and fill in the template using elements from the event payload.

A user-supplied message body template can be substituted by specifying the msg_template notification preference. Refer to svccfg(8) for more information about setting notification preferences on a per-service or per-event-class basis.

The message body template can contain the expansion macros listed below. These macros will be expanded by smtp-notify before sending the message.

Macro          Description
-----          -----------
%%              expands to a literal % character
%<HOSTNAME>     expands to the hostname on which the event
%<URL>          expands to the URL of the knowledge article
                associated with this event
%<CLASS>        expands to the event class
%<UUID>         expands to the UUID of the event
%<CODE>         expands to the knowledge article message ID
%<SEVERITY>     expands to the severity of the event

For SMF service state transition events, the following additional macros can be specified in a message template:

%<FMRI>          expands to FMRI of the affected service
%<FROM-STATE>    expands to the previous state of the service
%<TO-STATE>      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 transition 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


Example 1 Configuring Notification Preferences

The following command configures notification preferences for SMF service state transition events.

# svccfg -s svc:/system/svc/global:default setnotify -g \
from-online,to-maintenance mailto:admin@example.com
Example 2 Enabling Email Notifications

The following command enables email notifications for Fault Management problem diagnosis events.

# svccfg setnotify problem-diagnosed mailto:admin@example.com

Example 3 Listing Notification Settings

The following command lists all notification settings for Fault Management problem diagnosis events.

# svccfg listnotify problem-diagnosed


See attributes(7) for descriptions of the following attributes:

Interface Stability

See Also

svcs(1), attributes(7), smf(7), svcadm(8), svccfg(8), syslogd(8)