[go: up one dir, main page]

File: mailwrapper.sh

package info (click to toggle)
sma 1.4-3.1
  • links: PTS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 620 kB
  • sloc: ansic: 6,291; sh: 163; perl: 148; makefile: 67
file content (25 lines) | stat: -rwxr-xr-x 449 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/sh
#
# mailwrapper.sh -- send SMA HTML report via email
# NOTE: requires "IncludeAscii yes" (cmd line: -i)
#
# Usage: mailwrapper.sh < report-with-ascii-comment.html
#

# Mail headers
FROM=from@example.dom
TO=to@example.dom
SUBJECT="Sendmail log analysis"

# Sendmail command line
SENDMAIL="/usr/sbin/sendmail -t $TO"


(
echo From: $FROM
echo To: $TO
echo Subject: $SUBJECT
echo
sed -n '/<!--/,/-->/p' | egrep -v '^<!--|^-->'
) | $SENDMAIL