Setting up email notifications on a NetWorker Server (Windows) using blat

Legato NetWorker for Windows can use email to send automatic notifications to the administrator at certain points in the backup and restore processes.

You can configure a NetWorker server on Windows to work with the following mail programs:

  • Microsoft Mail (builtin)
  • Microsoft Exchange
  • SMTP application (ie: blat)

The aim of this article is to configure NetWorker for Windows to send email notifications via SMTP using the blat console-based program.

NOTE: We will not discuss setting up notifications using MS-Mail or Exchange.

In order setup email notifications, we need to perform the following tasks:

  1. First, download "Blat" from their opensource homepage at: http://sourceforge.net/projects/blat/files/
  2. Copy the blat.exe binary into the %SystemRoot%\win32app\nsr\bin directory on the NetWorker NT server (Or for later Window releases copy the binary into the %SystemRoot%\WINT\SYSTEM32 or %SystemRoot%\WINDOWS\SYSTEM32 directories).
  3. Install blat to connect to an existing SMTP server
    c:\win32app\nsr\bin> blat -install mail.server.com sender@server.com 2 25
    where:
    • mail.server.com -- your SMTP mail server
    • sender@server.com -- the sender of the emails
    • 2 -- number of retries in sending email
    • 25 -- the SMTP port to communicate on
  4. (optional) Setup an email address for NetWorker notifications and confirm that the email address is able to send and receives emails
  5. Test Networker's ability to send emails:
    1. At a command prompt, change to the \win32app\nsr\bin directory
      c:\> cd \win32app\nsr\bin
    2. Create a text file for NetWorker to send (for example test.txt)
      c:\win32pp\nsr\bin\> echo "this is a test" > test.txt
    3. At the command prompt type the following command:
      c:\win32app\nsr\bin\> blat test.txt -s "Test message" -t addr
      where:
      • addr -- is the recipient of the email.
  6. Change NetWorker notifications so that they send email
    1. In the NetWorker Administrator program, select the notification you want to automate from the Notifications menu. In the action field, enter the appropriate command for your mail program.
      blat - -s "subject" -t addr
      NOTE: The extra - is not a typo and is very important for making blat work with NetWorker where:
      • subject -- is the subject line you would like the email to have, for example, "smurf's savegroup completion report".
      • addr -- is the recipient. If you want multiple users to receive the email, you must specify each name separated by a space, for example:
        blat - -s "subject" -t addr1 addr2 addr3