Sie sind auf Seite 1von 15

MENU

DOCUMENTATION: How to
configure email notifications for
Windows clients using BLAT and
nbmail.cmd in Veritas NetBackup
(tm)

Article:000025818
Publish:January
January 14, 2016
Article URL:http://www.veritas.com/docs/000025818
http://www.veritas.com/docs/000025818
Support / Article

SIGN IN

Remember me
Forgot Password?
Don't have a Veritas Account?
Create a Veritas Account now!

Print Article
Products
Related Articles
Article Languages
Subscribe to this Article
Manage your Subscriptions

Problem

DOCUMENTATION: How to configure email notifications for Windows clients using


BLAT and nbmail.cmd in Veritas NetBackup (tm)

Solution
Manual: NetBackup (tm) System Administrator's Guide, Volume 1 for Windows
Modification Type: Supplement
Modification:
This document is designed to give a complete list of steps to configure Windows email
notification in NetBackup. It will be necessary to have the following information to
properly set up email notifications:

The email address of the NetBackup administrator who will receive the emails

A SMTP server that is configured to accept and relay emails.


Eg. emailserver.company.com

It should be noted first that this document is primarily focused on Windows based
platforms. UNIX platforms have a built-in Simple Mail Transport Protocol (SMTP)
transfer method that Windows does not have. Windows requires a MAPI application or
some other application that can transfer messages over SMTP. NetBackup has
various .cmd files that assume an SMTP utility called BLAT is in place. The .cmd files
that will be discussed assume BLAT is going to be used as the SMTP utility.
BLAT is a open source utility and the most recent version of BLAT can be downloaded
from this site: http://www.blat.net/
Note: Blat is a third party product. It is not written, endorsed or supported by
Symantec. Any problems with blat should be reported to the makers of blat directly.
Symantec will be unable to assist with issues that are encountered when installing or
using blat.
I. Installing and Configuring the BLAT executable

1. Download the .ZIP file from the download page specified above
2. Extract the files to their own folder.
Note: Most of the files in this .ZIP file are informational and is source code for
developmental purposes.
3. Copy the blat.exe file to the \WINNT\System32 directory in Windows
4. From a command prompt, run the following command (Note: This will be the primary
account that will send the emails from the specified server):
% blat -install <server addr> <sender's addr> 4 25

Note: "<server addr>" is the hostname or IP address of the email server that will send
the email notifications.
"<sender's addr>" is the account that will be the primary sender of the email
notifications. Tries (4) and port (25) is added to the end.
Example:
% blat -install emailserver.company.com useraccount@company.com

4 25

5. Test the installation of blat by creating a text file C:\testfile.txt with a message and
emailing it to the NetBackup administrator.
% blat C:\testfile.txt -s test_subject -to useraccount@company.com

If blat is working correctly, the NetBackup administrator should receive the contents of
the C:\testfile.txt file.

Note: Blat stores its configuration information in the Windows registry. If you need to
confirm any default Blat settings, they can be found
under the following registry path: HKEY_LOCAL_MACHINE/SOFTWARE/Public
Domain/Blat.

Warning: Incorrect use of the Windows registry editor may prevent the operating
system from functioning properly. Great care should be taken when making changes to
a Windows registry. Registry modifications should only be carried-out by persons
experienced in the use of the registry editor application. It is recommended that a
complete backup of the registry and workstation be made prior to making any registry
changes.

II. Configuring the nbmail.cmd script


Note: The syntax has changed in versions of BLAT post 2.6, and the syntax below will
change depending on the version you have.

1. Open nbmail.cmd using notepad.exe or some other text editor. The file can be
found on a NetBackup Server/Client install for Windows
at <install_path>\VERITAS\NetBackup\bin. If the file does not exist,
check <install_path>\VERITAS\NetBackup\bin\goodies and move
to <install_path>\VERITAS\NetBackup\bin. Please make a backup copy of this script
before modifying it.
Note: When using Notepad to modify a script do not use the Word Wrap option. If this
option is enabled, then it will need to be unchecked. Using this option can result in
extra line feeds being added to the script which will render it non-functional.

2. Most of the lines in the nbmail.cmd file are informational. The following line(s) are
what need to be adjusted:

For NetBackup 4.5 and 5.x systems find the line:


@rem @blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG -q

For NetBackup 6.x and 7.xsystems find the section:


@REM @IF "%~4"=="" (

@REM blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG -q

@REM ) ELSE (

@REM blat %3 -s %2 -t %1 -i NetBackup -server WARTHOG -q -attach %4

@REM )

3. Remove "@rem" from the beginning of each line. This will activate the sections
needed for blat to run.
4. Replace "WARTHOG" with the name of the email server. An example of how this line
should now appear is (please note the change of parameters for newer versions of
BLAT):

Example on NetBackup 4.5 and 5.x systems:


@blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q

Example on NetBackup 6.x and 7.x systems:


@IF "%~4"=="" (

blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q

) ELSE (

blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q -attach


%4

Example for blat version 2.6+:


@IF "%~4"=="" (

blat %3 -s %2 -to %1 -server emailserver.company.com -q

) ELSE (

blat %3 -s %2 -to %1 -server emailserver.company.com -q -attach %4

and at the bottom of the file:

@IF "%~4"=="" (

blat %TEMP%\nbmail.tmp -subject %2 -to %1 -server emailserver.company.com -q

) ELSE (

blat %TEMP%\nbmail.tmp -subject %2 -to %1 -server emailserver.company.com -q


-attach %4

@REM -

Additionally, it is good practice to replace any instances of "NetBackup" with a valid


email address for 4.x, 5.x, or 6.x,and 7.x for example:
blat %3 -s %2 -t %1 -i admin@acme.com -server emailserver.company.com -q

This email address will appear in the "From:" field in the email. The reason for this is
that some email servers may not process the mail if it is from "NetBackup" as opposed
to a valid email address.

5. Save the nbmail.cmd file


6. Example of an email sent by NetBackup using blat:
Backup on client <hostname> by root was partially successful.

File list

---------

C:\Documents and Settings

Options explained:

is the file that BLAT will send in the body of the email. This is generated

%3

by one of the other scripts,backup_notification.cmd for example.


-s is the subject line of the email ("-s" is replaced by "-subject" in blat

2.6+)
%2 is the contents of the subject line. This is generated by another script that

calls on blat, backup_notification.cmd, for example.


-t is who will receive the email. ("-t" is replaced by "-to" in blat 2.6+)
%1 - is the email address. This is by default the contents of the Email

Address for the administrator of this NetBackup Client field.


-i is the "From" portion of the email. This is not necessarily known to the

email server. In this case it will be "From NetBackup." There should be a


valid email address specified here instead of "NetBackup", such as

"admin@acme.com". (-i is no longer existing in blat 2.6+)


-server is the name of the SMTP server to use.
-q will suppress all output to the screen.

III. Configure NetBackup to use email notification


To allow a master server to send emails for all failed client backups that end with a nonzero status, do the following:
1. Open the NetBackup Administration Console
2. Open the Host Properties for the master server and go to the Global Attributes tab
3. At the bottom of this page, enter the email address for the NetBackup administrator in
the field called Administrator e-mail address: (separate multiple entries with
commas)

To allow a specific client to send emails for all successful and failed jobs, do the
following:
1. Open the NetBackup Administration Console
2. Open the Host Properties for the Client and go to the Universal Settings tab
3. Under the Administrator section of this page, enter the email address for the
NetBackup administrator in the field calledClient Administrator's e-mail (separate
multiple entries with commas)

NetBackup should send email notifications at this point. To get more information sent to
the administrator configure some of
the<install_path>\VERITAS\NetBackup\bin\*.cmd files. This would result in additional
information for the administrator.

IV. Additional ways to use BLAT and nbmail.cmd


Sending to multiple users can be done in two ways: by creating an administrative group
SMTP account on an email server and configuring NetBackup and nbmail.cmd to use
that SMTP address, or by configuring the nbmail.cmd file to send to multiple users.

Providing more email address for BLAT can be done by adding additional email
addresses after the %1 in the nbmail.cmd file. Here is an example of the syntax
required:

Example on NetBackup 4.5 and 5.x systems:


@blat %3 -s %2 -t %1,name1@acme.com,name2@acme.com,name3@acme.com -i
NetBackup -server emailserver.company.com -q

Example on NetBackup 6.x and 7.x systems:


@IF "%~4"=="" (

blat %3 -s %2 -t %1,name1@acme.com,name2@acme.com,name3@acme.com -i NetBackup


-server emailserver.company.com -q

) ELSE (

blat %3 -s %2 -t %1,name1@acme.com,name2@acme.com,name3@acme.com -i NetBackup


-server emailserver.company.com -q -attach %4

Configured this way, four emails will be sent out. It is important to separate the email
addresses with commas (,) and no spaces in between.

V. Troubleshooting BLAT
1. It may be necessary to do some troubleshooting of BLAT. If BLAT is run from a
straight command line, and it has an error, it will produce a message in the command
line results. To make a "log" file for BLAT, make an entry at the end of
the nbmail.cmd"@blat" line similar to this:
Example on NetBackup 4.5 and 5.x systems:

@blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com q >>"C:\program files\veritas\netbackup\logs\blat.out.txt"

Example on NetBackup 6.x and 7.x systems:


@IF "%~4"=="" (

blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com q >>"C:\program files\veritas\netbackup\logs\blat.out.txt"

) ELSE (

blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q -attach


%4 >>"C:\program files\veritas\netbackup\logs\blat.out.txt"

This will create a .txt file in the specified directory and will append to the bottom of that
file. If there is an error message from BLAT it will show in the specified file.

2. There have been instances where email notification is working, but Vault will not send
reports correctly. To correct this, a modification to the "blat" line in the nbmail.cmd file
is necessary. If you are experiencing this, make the following modification to
the nbmail.cmd file:
Example on NetBackup 4.5 and 5.x systems:
@blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q -mime

Example on NetBackup 6.x and 7.x systems:

@IF "%~4"=="" (

blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q -mime

) ELSE (

blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q -attach


%4 -mime

3. There have been instances where email notification is configured correctly, BLAT is
configured correctly, but emails are not received. Try making the following modification
to the nbmail.cmd file:
Example on NetBackup 4.5 and 5.x systems:
@blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q enriched

Example on NetBackup 6.x and 7.x systems:


@IF "%~4"=="" (

blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q -enriched

) ELSE (

blat %3 -s %2 -t %1 -i NetBackup -server emailserver.company.com -q -attach


%4 -enriched

Terms of use for this information are found in Legal Notices.


SEARCH
SURVEY
Did this article answer your question or resolve your issue?
No
Yes

Create/Manage Case

SOLUTIONS

Unstructured Data Growth

Multi-Vendor Hybrid Cloud

Healthcare

Government

PRODUCTS

Backup and Recovery

Business Continuity

Storage Management

Information Governance

Products A-Z

SERVICES

Education Services

Business Critical Services

Consulting Services

Managed Services

Appliance Services

CUSTOMER CENTER

Support

Community

MyVeritas

Customer Success

Licensing Programs

Licensing Process

ABOUT

Corporate Profile

Corporate Leadership

Newsroom

Corporate Responsibilty

Careers

19952016 Veritas Technologies LLC

Sitemap

Legal Terms

Privacy

Contact

Activate to launch comment card

Das könnte Ihnen auch gefallen