]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Rework zed_notify_email for configurable PROG/OPTS
authorChris Dunlap <cdunlap@llnl.gov>
Tue, 28 Jul 2015 22:52:40 +0000 (15:52 -0700)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 30 Jul 2015 18:52:56 +0000 (11:52 -0700)
commit69520d6855d962885e9ec4e2614575bb39c6326b
tree95364c964fe57bd19fd21f162997bdebd38caeee
parent6f1eccff2c264bf44c63ca40a9279fffc3b5d5b5
Rework zed_notify_email for configurable PROG/OPTS

This commit reworks the zed_notify_email() function to allow
configuration of the mail executable and command-line arguments.

ZED_EMAIL_PROG specifies the name or path of the executable responsible
for sending notifications via email.  This variable defaults to "mail".

ZED_EMAIL_OPTS specifies command-line options passed to ZED_EMAIL_PROG.
The following keyword substitutions are performed:
- @ADDRESS@ is replaced with the recipient email address(es)
- @SUBJECT@ is replaced with the notification subject
This variable defaults to "-s '@SUBJECT@' @ADDRESS@".

ZED_EMAIL_ADDR replaces ZED_EMAIL (although the latter is retained
for backward compatibility).  This variable can contain multiple
addresses as long as they are delimited by whitespace.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3634
Closes #3631
cmd/zed/zed.d/zed-functions.sh
cmd/zed/zed.d/zed.rc