cancel
Showing results for 
Search instead for 
Did you mean: 

Blat & NetBackup - Need assistance in configuration

a_la_carte
Level 5

Hello Folks,

 

I have been trying to configure BLAT for catalog DR recovery email notifications unsuccessfully multiple times. :(

Please guide me where am I doing wrong.

 

Master Server: Windows 2008 R2 SP1 x64-bit

NetBackup version : 7.6.1.2

Blat version: blat324_64.full.zip

==================================================================================

Have been following the below tech-note, copied the blat.exe file to C:\Windows\System32\ folder and finding myself stuck up on step no.4 repeatedly. Please assist.

https://support.symantec.com/en_US/article.TECH24110.html

 

Below is the error message that I have been receiving.

==================================================================================

C:\Windows\System32>Blat –install exchange.abcd.com.yy backup.support@abcd.com.yy
Blat v3.2.4 (build : Feb 24 2015 21:30:17)
64-bit Windows, Full, Unicode

Blat saw and processed these options, and was confused by the last one...
    exchange.abcd.com.yy
Do not understand argument: exchange.abcd.com.yy

Windows console utility to send mail via SMTP or post to usenet via NNTP
by P.Mendes,M.Neal,G.Vollant,T.Charron,T.Musson,H.Pesonen,A.Donchey,C.Hyde
  http://www.blat.net
syntax:
  Blat <filename> -to <recipient> [optional switches (see below)]

  Blat -SaveSettings -f <sender email addy> -server <server addr>
       [-port <port>] [-try <try>] [-profile <profile>]
       [-u <login id>] [-pw <password>]
  or
  Blat -install <server addr> <sender's addr> [<try>[<port>[<profile>]]] [-q]

  Blat -profile [-delete | "<default>"] [profile1] [profileN] [-q]
  Blat -h


C:\Windows\System32>

=================================================================================

I have tried with both hostname and IP address of the exchange server but still getting the same error saying  "Blat saw and processed these options, and was confused by the last one...followed by IP-address/exchange server name" 

Have tried with small cases blat -install too, still the same.

 

Telnet to SMTP port 25 on Exchange server from Master Server is working fine.

Forward and reverse lookup for exchange server hostname and ip address is working fine. 

 

Please suggest how and where to proceed now.

=================================================================================

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

sdo
Moderator
Moderator
Partner    VIP    Certified

I agree, do not "play" with the registry settings by hand in regedit or regedt32...

...and instead, use 'blat -installSMTP' to add the profile settings.  This is what many of us do.

View solution in original post

13 REPLIES 13

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi,

 

I downloaded blat and installed it on my Windows 8 (closest I can get to Server).

 

Microsoft Windows [Version 6.3.9600]
(c) 2013 Microsoft Corporation. All rights reserved.

C:\Windows\system32>blat -install exchange riaan@condo.com
Blat v3.2.4 (build : Feb 24 2015 21:30:17)
64-bit Windows, Full, Unicode

SMTP server set to exchange on port 25 with user riaan@condo.com, retry 1 time(s)

C:\Windows\system32>

 

I got no errors like you but I looked in the registry and found where the details are kept. You can try add it there manually.

 

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Public Domain\Blat]
"SMTP server"="exchange"
"SMTP Port"="25"
"Try"="1"
"Login"=""
"Pwd"=""
"Sender"="riaan@condo.com"

a_la_carte
Level 5

Hi Riaan,

 

Interestingly, I couldn't find below location in my registry editor.

 

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Public Domain\Blat

Please assist.

Do I need to manually create those sub-folders Public Domain\Blat

 

Capture_0.JPG

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Hi,

 

I would say so. There is nothing else in my registry in the public domain key so I assume BLAT install put it there.

 

Worth a try

 

sdo
Moderator
Moderator
Partner    VIP    Certified

It is the "blat -installOPTION" command which creates the registry entries.

Top tip:  It's probably best to copy blat.exe, blat.dll, blat.lib - all three files to C:\Windows, so that it's always available to run from anywhere and from any script.

Syntax:
blat -install[SMTP|NNTP|POP3|IMAP] <server addr> <sender email addr> [<try n times> [<port> [<profile> [<username> [<password>]]]]]

Example:
> blat -profile
> REM                smtp-server          sender-email         tries  port  profile-name  login-account        password
> blat -installSMTP  mail.btinternet.com  blah@btinternet.com  1      25    myprofile     blah@btinternet.com  blahblahblah
> blat -profile

Test sending:
> (echo test-body)      >test-body.txt
> (echo test-attachment)>test-attachment.txt
> blat -profile
> blat test-body.txt -s "test from %computername%" -t target@email.com -p myprofile -attach test-attachment.txt -debug

 

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

FYI

 

I extracted all files to SYSTEM32

sdo
Moderator
Moderator
Partner    VIP    Certified

Yep :)

The three "blat" files could go in any of these actually:

C:\temp>path
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\WindowsPowerShell\v1.0\

.

@a_la_carte - my suggestion to place the three 'blat' binary files in C:\Windows was only for a quick test.  Personally, I would recommend the following long term:

...usually, I like to keep the C:\Windows folder tree free from third party binaries, and so, usually, I would create a folder named C:\Utils, and place all the small standalone useful tools/commands/scripts/binaries in there and then add C:\Utils to the system wide 'PATH' environment variable (in My Computer / Properties / Advanced system settings / Advanced (tab) / Environment Variables... / System variables).  Less chance of things going wonky.

 

a_la_carte
Level 5

Folks,

 

I still do not have any luck even after putting all the 3 BLAT files in System32 folder. :(

the command blat -install is still acting wiered. 

 

Please guide what should I do now. I dont know what am I doing wrong here.

 

I dont think Tech Support would be of any help here even if I log a case as BLAT is a 3rd party offering.

 

 

Capture1.JPG

 

==================================================================================

C:\Windows\System32>Blat –install exchange.abcd.com.yy backup.support@abcd.com.yy
Blat v3.2.4 (build : Feb 24 2015 21:30:17)
64-bit Windows, Full, Unicode

Blat saw and processed these options, and was confused by the last one...
    exchange.abcd.com.yy
Do not understand argument: exchange.abcd.com.yy

Windows console utility to send mail via SMTP or post to usenet via NNTP
by P.Mendes,M.Neal,G.Vollant,T.Charron,T.Musson,H.Pesonen,A.Donchey,C.Hyde
  http://www.blat.net
syntax:
  Blat <filename> -to <recipient> [optional switches (see below)]

  Blat -SaveSettings -f <sender email addy> -server <server addr>
       [-port <port>] [-try <try>] [-profile <profile>]
       [-u <login id>] [-pw <password>]
  or
  Blat -install <server addr> <sender's addr> [<try>[<port>[<profile>]]] [-q]

  Blat -profile [-delete | "<default>"] [profile1] [profileN] [-q]
  Blat -h

C:\Windows\System32>

=================================================================================

Tried replacing exchange hostname with ip-address too, still the same thing, it's getting confused with ip-address argument too.

 

Really need help here please.

 

 

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Have you created the registry entries?

a_la_carte
Level 5

No Riaan.

 

I am afraid. I do not want to play with system's registry as this is our Master Backup Server. Entries there should get automatically created when command gets successfully executed, but here the command in question isn't working...

 

:(

RiaanBadenhorst
Moderator
Moderator
Partner    VIP    Accredited Certified

Ok, try and check with blat why this is happening. Maybe they've got an answer.
 

sdo
Moderator
Moderator
Partner    VIP    Certified

I agree, do not "play" with the registry settings by hand in regedit or regedt32...

...and instead, use 'blat -installSMTP' to add the profile settings.  This is what many of us do.

a_la_carte
Level 5

Wow sdo....

 

This worked like a charm...!! not sure if I missed any switches along with "blat -installSMTP" but it took me to "blat -SaveSettings" options which actually worked for me.

What blat -install couldn't do, "blat -SaveSettings" have done that.

==========================================================

C:\Windows\System32>blat -installSMTP
Blat v3.2.4 (build : Feb 24 2015 21:30:17)
64-bit Windows, Full, Unicode

Blat saw and processed these options, and found fault with the last one...
    -installSMTP
Not enough arguments supplied for option: -installSMTP
Blat found fault with: -installSMTP

-SaveSettings   : store common settings to the Windows Registry.  Takes the
                  same parameters as -install, and is only for SMTP settings.

C:\Windows\System32>

C:\Windows\System32>Blat -SaveSettings -f backup.support@abcd.com.yy -server exchange.abcd.com.yy
Blat v3.2.4 (build : Feb 24 2015 21:30:17)
64-bit Windows, Full, Unicode

SMTP server set to exchange.abcd.com.yy on port 25 with user backup.support@abcd.com.yy, retry 1 time(s)

C:\Windows\System32>

===========================================================

I can now see below entry too, which i couldn't before :- 

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Public Domain\Blat

 

==========================================================

Has this now been executed properly and correctly this time ?

Or do I need to know anything else apart from this too ?

I would still like to know why "blat -install" couldn't work in my case or is Windows 2008 R2 64-bit an exception here ?

 

 

sdo
Moderator
Moderator
Partner    VIP    Certified

I think your blat -installSMTP failed because you didn't specify any of the other required options on the command line, whereas you did when you used the -savesettings option.

To prove whether it's ok - try sending a test email your self.