Software >> OS >> Unix >> Solaris >> 11 >> How to test the smtp-notify service on your local solaris 11 server

1.  enable svc:/system/fm/smtp-notify:default (to trigger sending of emails when svc state change)

2.  enable svc:/network/smtp:sendmail (to receive mails send to root@localhost)

3.  To set notification for all services use
      # svccfg -s svc:/system/svc/global:default setnotify -g transition1, transition2 mailto:root@localhost

4.  To set notification for specific service e.g. svc:/network/iscsi/initiator:default use
      # svccfg -s svc:/network/iscsi/initiator:default  setnotify transition1, transition2 mailto:root@localhost

5.  To show notify status

      # svccfg -s svc:/system/svc/global:default listnotify

6.   To delete notification for all services

       # svccfg -s svc:/system/svc/global:default delnotify -g all