Configuring the nbmail.cmd script

To receive email notifications about backups, the nbmail.com script must be configured for Windows.

Locate install_path\VERITAS\NetBackup\bin\nbmail.cmd on a NetBackup master server. If configuring the script on the client, copy nbmail.cmd from a master server to the client. By default, nbmail.cmd does not send email.

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 email 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.

Use the following procedure to configure the nbmail.cmd script.

To configure the nbmail.cmd script

  1. 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.

  2. 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 )
    
  3. 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 email 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
      )
      
  4. Save nbmail.cmd.