cd $dir
# Each report in $1 is mailed as an attachment.
/usr/bin/perl -w email.pl -d $1 -o /dev/null
# Each report in $1 is embedded into an email and mailed.
#/usr/bin/perl -w email.pl -d $1 -embed -o /dev/null
# Each report in $1 is attached to a collated message and the collated message
# is mailed
#/usr/bin/perl -w email.pl -d $1 -collate -o /dev/null
# Each report in $1 is embedded into a collated message and the collated message
# is mailed
#/usr/bin/perl -w email.pl -d $1 -collate -embed -o /dev/null
# Don't change this line
exit $?
The required SMTP settings are provided in email.pl.
##################################################################
# CONFIGURABLE PARAMETERS SECTION (CHANGEABLE)
##################################################################
# From address, don't delete \ before the @ separator
my $from_addr = "user\@localhost.localdomain";
# To address, don't delete \ before the @ separator
my $to_addr = "remote-user\@somewhere.net";
# Email server: not required if sendmail is configured for mail transport
my $email_server = "everywhere.net";
# Subject
my $subject = "Reports are here!";
# Body text for emails with reports as attachments
my $body_text_attach = "Attached reports";
# Body text for emails with reports embedded
my $body_text_embed = "Embedded reports";
# Mail transport agent
my $send_mail_prog = "/usr/sbin/sendmail -t";
# Directory prefix for report directory
my $prefix = "/usr/netscreen/GuiSvr/var";
# Report extension type
my $type = "html";
# Mail output file: Capture sent email in this file, /dev/stdout for screen
my $mail_ofile = "/dev/stdout";
###################################################################
NOTE:
The
email.pl
and
emailReports.sh
scripts only do MIME formatting of the reports.
The actual mailing is done by sendmail or other Mail Transfer Agent (MTA). If you require
authentication to send these reports, you must configure the authentication parameters
as part of the MTA configuration. If you are using the FTP script to send you reports,
you will also need to add values for the remote host, userid and password for the FTP
account in the
ftp.sh
file.
Using Cron with Scheduled Reports
The actual scheduling is done using the cron application. This utility executes scripts at
specific times. It is configured through a file called
crontab
. To edit the file, use the
command
crontab -e
. This command invokes the
vi
editor and opens the crontab table.
Entries in the table consist of a command set and a schedule. The command to run the
report is the same as described above.
The timing of the job is determined by a string of numbers preceding the script. There are
five places and they represent, in order:
Copyright © 2010, Juniper Networks, Inc.
810
Network and Security Manager Administration Guide
Содержание NETWORK AND SECURITY MANAGER 2010.3
Страница 6: ...Copyright 2010 Juniper Networks Inc vi...
Страница 36: ...Copyright 2010 Juniper Networks Inc xxxvi Network and Security Manager Administration Guide...
Страница 52: ...Copyright 2010 Juniper Networks Inc 2 Network and Security Manager Administration Guide...
Страница 90: ...Copyright 2010 Juniper Networks Inc 40 Network and Security Manager Administration Guide...
Страница 144: ...Copyright 2010 Juniper Networks Inc 94 Network and Security Manager Administration Guide...
Страница 146: ...Copyright 2010 Juniper Networks Inc 96 Network and Security Manager Administration Guide...
Страница 234: ...Copyright 2010 Juniper Networks Inc 184 Network and Security Manager Administration Guide...
Страница 310: ...Copyright 2010 Juniper Networks Inc 260 Network and Security Manager Administration Guide...
Страница 364: ...Copyright 2010 Juniper Networks Inc 314 Network and Security Manager Administration Guide...
Страница 366: ...Copyright 2010 Juniper Networks Inc 316 Network and Security Manager Administration Guide...
Страница 478: ...Copyright 2010 Juniper Networks Inc 428 Network and Security Manager Administration Guide...
Страница 576: ...Copyright 2010 Juniper Networks Inc 526 Network and Security Manager Administration Guide...
Страница 580: ...Copyright 2010 Juniper Networks Inc 530 Network and Security Manager Administration Guide...
Страница 592: ...Copyright 2010 Juniper Networks Inc 542 Network and Security Manager Administration Guide...
Страница 684: ...Copyright 2010 Juniper Networks Inc 634 Network and Security Manager Administration Guide...
Страница 690: ...Copyright 2010 Juniper Networks Inc 640 Network and Security Manager Administration Guide...
Страница 696: ...Copyright 2010 Juniper Networks Inc 646 Network and Security Manager Administration Guide...
Страница 698: ...Copyright 2010 Juniper Networks Inc 648 Network and Security Manager Administration Guide...
Страница 748: ...Copyright 2010 Juniper Networks Inc 698 Network and Security Manager Administration Guide...
Страница 778: ...Copyright 2010 Juniper Networks Inc 728 Network and Security Manager Administration Guide...
Страница 870: ...Copyright 2010 Juniper Networks Inc 820 Network and Security Manager Administration Guide...
Страница 872: ...Copyright 2010 Juniper Networks Inc 822 Network and Security Manager Administration Guide...
Страница 898: ...Copyright 2010 Juniper Networks Inc 848 Network and Security Manager Administration Guide...
Страница 908: ...Copyright 2010 Juniper Networks Inc 858 Network and Security Manager Administration Guide...
Страница 910: ...Copyright 2010 Juniper Networks Inc 860 Network and Security Manager Administration Guide...
Страница 995: ...PART 6 Index Index on page 947 945 Copyright 2010 Juniper Networks Inc...
Страница 996: ...Copyright 2010 Juniper Networks Inc 946 Network and Security Manager Administration Guide...