Please provide details.but, it´s just for testing. I have changed it and the behaviour is still the same.
bad status will stop service named in %Mailbody%, Good status will be set when a "Good mail" is detected, and then starts the service again.
What exactly action and actions settings do you use now?
Test status?
Recurrences value?
Quick Log results?
1)and then let HMS disable this test. Our Service tests are all named like %Servername%\%Servicename% so this should be possible, right?!
It does not matter what name do you use for your Service tests. You assign action to E-Mail test. This means the action can use variables provided by E-Mail test (e.g. it can use %MailSubj% variable but cannot use %ServiceName% variable)
It cannot use any variables related to your Service test UNLESS you specify variable with link to other test.
Please check the following section of the manual
http://www.ks-soft.net/hostmon.eng/mfra ... #specmacro
In other words, if you want to use single action to restart different services in respond to some e-mail (not service test failure), then you need to send servicehost, servicename as part of the mail or send name of related Service test as part of e-mail.
2)
There is no "restart service" HMScript command so I am not sure why do you want to use HM Script action.
I think you may use "Execute external program" action and %MailSubj% variable...
%MailBody% may have many lines, its not really good for such action. We can implement additional variables in next version, e.g. %MailLine1%..%MailLine9%

Also, if you want to use %MailBody% within HM Script, please check this note
------------------
Note: for security reasons commands StartProgram and ExecuteProgram restricted for HM Scripts when such commands specified within mail body, mail subject, HTTP page or HTTP header.
You may define parameters of StartProgram and ExecuteProgram commands using variables (e.g. StartProgram %MailSubj%), in such case HostMonitor will start external application specified in your e-mail but we do NOT RECOMMEND using such scripts for security reasons.
Also, please make sure you are using mail servers with secure connection!
------------------
BTW:
simple way (use "restart service" action plus "send e-mail" action after 2nd failure) does not work for you?
This way HostMonitor may restarts service automatically; if this does not fix the problem it sends e-mail to admin. Then admin logins to the system, fix the problem and starts service.
Regards
Alex