summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-analyzer/dhcp_probe/files/dhcp_probe_mail')
-rw-r--r--net-analyzer/dhcp_probe/files/dhcp_probe_mail23
1 files changed, 23 insertions, 0 deletions
diff --git a/net-analyzer/dhcp_probe/files/dhcp_probe_mail b/net-analyzer/dhcp_probe/files/dhcp_probe_mail
new file mode 100644
index 000000000000..58b07766bbb3
--- /dev/null
+++ b/net-analyzer/dhcp_probe/files/dhcp_probe_mail
@@ -0,0 +1,23 @@
+#!/bin/bash
+# Old style alert program:
+#
+# Syntax:
+# alert_program_name /absolute/path/name
+#
+# The program specified via 'alert_program_name' will be called as follows:
+# /absolute/path/name name_of_calling_program name_of_interface_on_which_the
+#_response_was_received IP_source_of_the_response ether_src_of_the_response
+
+DHCP_PROBE_DOMAIN=$(dnsdomainname)
+
+sendmail root <<EOF
+From: root@${DHCP_PROBE_DOMAIN}
+Subject: $1 ALERT - $3 is acting as a DHCP server
+
+Called program: $0
+Calling program: $1
+Interface on which response was received: $2
+IP source of the response: $3
+Ethernet source of the response: $4
+
+EOF