Configuring the nbmail.cmd script on Windows
For Windows hosts to receive email notifications about backups, the nbmail.com script must be configured on the host.
By default, nbmail.cmd does not send email. Use the following procedure to configure the nbmail.cmd script.
To configure the nbmail.cmd script
- On a NetBackup master server, copy nbmail.cmd from the following directory:
install_path\NetBackup\bin\goodies\nbmail.cmd
- Paste it into the following directory on the server or client:
install_path\NetBackup\bin\
- Use a text editor to open nbmail.cmd. Create a backup copy of nbmail.cmd before modifying it.
In some text editors, using the word wrap option can create extra line feeds in the script and render it non-functional.
The following options are used in the script:
-s
The subject line of the email
-t
Indicates who receives the email.
-i
The originator of the email, though it is not necessarily known to the mail server. The default (-i NetBackup) shows that the email is from NetBackup.
-server
The name of the SMTP server that is configured to accept and relay emails.
-q
Suppresses all output to the screen.
- Most of the lines are informational in nbmail.cmd.
Locate the following lines in the script:
@REM @IF "%~4"=="" ( @REM blat %3 -s %2 -t %1 -i NetBackup -server SERVER_1 -q @REM ) ELSE ( @REM blat %3 -s %2 -t %1 -i NetBackup -server SERVER_1 -q -attach %4 @REM )
- Adjust the fives lines as follows:
Remove @REM from each of the five lines to activate the necessary sections for BLAT to run.
Replace SERVER_1 with the name of the mail server. For example:
@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 )
- Save nbmail.cmd.
More Information