NBMAIL.CMD - modifications
Hello!
I have searched around on the forums, on the web and to no avail. I have
the nbmail.cmd working w/ blat. The only problem is that I get tons of emails
for all jobs, no matter what the status. I tried editing the expression
so that anything greater than 0 would only send, but it does not work - so
I know I am not doing it right. This on on the master server - W2K3 - NBU6.0MP4.
I only want to know about the jobs that aren't 100% successful.
@copy /y %3 %TEMP%\nbmail.tmp > NULL
@echo . >> %TEMP%\nbmail.tmp
@IF "%~4"=="" (
blat %TEMP%\nbmail.tmp -s %2 -t %1 -q -enriched
) ELSE (
blat %TEMP%\nbmail.tmp -s %2 -t %1 -q -attach %4 -enriched
)
I thought making it "%~4">"0" (
Any ideas / tips/ suggestions are greatly appreciated.
Thanks
Re: NBMAIL.CMD - modifications
Hi Cole,
could you post the execution of this batch and the source-file from where
you copy "nbmail.tmp"? If you change the servernames in the source-file,
please say it if possible.
I also don't know, what you try to check with the "%~4". Can you explain
this?
bye
Para
"Cole" <brownn@afghan.swa.army.mil> schrieb im Newsbeitrag
news:469b178c@ROSASTDMZ05....[color=blue]
>
> Hello!
>
> I have searched around on the forums, on the web and to no avail. I have
> the nbmail.cmd working w/ blat. The only problem is that I get tons of[/color]
emails[color=blue]
> for all jobs, no matter what the status. I tried editing the expression
> so that anything greater than 0 would only send, but it does not work - so
> I know I am not doing it right. This on on the master server - W2K3 -[/color]
NBU6.0MP4.[color=blue]
> I only want to know about the jobs that aren't 100% successful.
>
> @copy /y %3 %TEMP%\nbmail.tmp > NULL
> @echo . >> %TEMP%\nbmail.tmp
> @IF "%~4"=="" (
> blat %TEMP%\nbmail.tmp -s %2 -t %1 -q -enriched
> ) ELSE (
> blat %TEMP%\nbmail.tmp -s %2 -t %1 -q -attach %4 -enriched
> )
>
> I thought making it "%~4">"0" (
>
> Any ideas / tips/ suggestions are greatly appreciated.
>
> Thanks[/color]
Re: NBMAIL.CMD - modifications
We have NBU5.1 and we use backup_exit_notify.cmd from the goodies folder.
You can customize that and put it in \bin folder.
"Cole" <brownn@afghan.swa.army.mil> wrote:[color=blue]
>
>Hello!
>
>I have searched around on the forums, on the web and to no avail. I have
>the nbmail.cmd working w/ blat. The only problem is that I get tons of[/color]
emails[color=blue]
>for all jobs, no matter what the status. I tried editing the expression
>so that anything greater than 0 would only send, but it does not work -[/color]
so[color=blue]
>I know I am not doing it right. This on on the master server - W2K3 - NBU6.0MP4.
> I only want to know about the jobs that aren't 100% successful.
>
>@copy /y %3 %TEMP%\nbmail.tmp > NULL
>@echo . >> %TEMP%\nbmail.tmp
>@IF "%~4"=="" (
>blat %TEMP%\nbmail.tmp -s %2 -t %1 -q -enriched
> ) ELSE (
>blat %TEMP%\nbmail.tmp -s %2 -t %1 -q -attach %4 -enriched
>)
>
>I thought making it "%~4">"0" (
>
>Any ideas / tips/ suggestions are greatly appreciated.
>
>Thanks[/color]
Re: NBMAIL.CMD - modifications
Hi Cole,
Nbmail is not the script to modify to adjust whether you get "backup" exit
statii.
Many of the NBU scripts all call nbmail.cmd. There should be any need to
modify it really, maybe if you can't use blat or some other weird setup for
your email server/gateway.
Anyway, the sole purpose of nbmail to send mail, not to decide whether too,
Sounds like you need to modify "backup_exit_notify".
See this link:
[url]http://seer.support.veritas.com/docs/274059.htm[/url]
To stop "backup_exit_notify" sending you success emails, you could try
adding these two lines at some point in your modified version of
"backup_exit_notify" on the master server:
if "%5" == "0" goto :end
if "%5" == "1" goto :end
....of course you'll need to add an ":end" label somewhere near the end of
the script.
HTH,
Regards,
Dave.
P.S. You may get more response posting here in future:
[url]https://forums.symantec.com/syment/board?board.id=21&page=1[/url]
"Cole" <brownn@afghan.swa.army.mil> wrote in message
news:469b178c@ROSASTDMZ05....[color=blue]
>
> Hello!
>
> I have searched around on the forums, on the web and to no avail. I have
> the nbmail.cmd working w/ blat. The only problem is that I get tons of
> emails
> for all jobs, no matter what the status. I tried editing the expression
> so that anything greater than 0 would only send, but it does not work - so
> I know I am not doing it right. This on on the master server - W2K3 -
> NBU6.0MP4.
> I only want to know about the jobs that aren't 100% successful.
>
> @copy /y %3 %TEMP%\nbmail.tmp > NULL
> @echo . >> %TEMP%\nbmail.tmp
> @IF "%~4"=="" (
> blat %TEMP%\nbmail.tmp -s %2 -t %1 -q -enriched
> ) ELSE (
> blat %TEMP%\nbmail.tmp -s %2 -t %1 -q -attach %4 -enriched
> )
>
> I thought making it "%~4">"0" (
>
> Any ideas / tips/ suggestions are greatly appreciated.
>
> Thanks[/color]