add mail notification
diff --git a/src/cfgparse.c b/src/cfgparse.c
index 2a5f178..1398e4c 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -584,6 +584,22 @@
goto out;
#endif
}
+ else if (!strcmp(args[0], "email_alert")) {
+ global.email_alert = 1;
+ if (*(args[1]) == 0) {
+ Alert("parsing [%s:%d] : email_alert Expects email address as argument.\n", file, linenum);
+ global.email_alert = 0;
+ err_code |= ERR_ALERT;
+ goto out;
+ }
+ if (*(args[2]) != 0) {
+ strncpy(global.email_from,args[2],50);
+ }
+ else {
+ strncpy(global.email_from,"na",50);
+ }
+ strncpy(global.email_to,args[1],50);
+ }
else if (!strcmp(args[0], "daemon")) {
global.mode |= MODE_DAEMON;
}