Logout

Alt-N Discussion Groups > MDaemon Discussion Groups > MDaemon Support > Archive > How to run a program from a CF Rule

 [F] Alt-N Discussion Groups  / MDaemon Discussion Groups  / MDaemon Support  / Archive  /

How to run a program from a CF Rule

[vitale, fabio]
fabio vitale
Novice
Novice
Posts: 108
fabio vitale - 09:08am, Feb 22 2022

I have a Ruby script that runs just fine when launched from the
windows command prompt but does not seems to be launched when invoked
from a CF Rule: I can see that the rule is fired but it seems that the
Ruby script is not launched (I do not know how to check while the
script is executed).

 From the command prompt I launch it as follow:

ruby my_script.rb --parameter_1=1 --parameter_2=2 --parameter_3=3

The MDaemon help is very sparse on how to setup a Run a program...
action.

I have no idea on what is going on.

Can someone please help me?


--MD-SUPPORT--------------------------------------------------------------
This list is for questions and discussion about MDAEMON. To unsubscribe
from this mailing list send an email to md-support-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!-----------------------------------------------------

--------------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user
support and discussion. MDaemon staff members may participate in the
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical
support please use the form here:
http://www.mdaemon.com/Support/RequestSupport/
--------------------------------------------------------------------------



  (older msg: 2)All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items

Arron Caruth - Feb 24, 2022 10:25 am (#3 Total: 3)  

Guest User  

Photo of Author
Posts: 1
When MDaemon attempts to run the script, it will run it as the same user account that the MDaemon service is running as.  Does that account have the permissions necessary to execute the script?

If you open a Command prompt, does the same string you are using in the content filter rule work to turn the script?  

If you remove the parameters that you are passing, will it execute the script?   

The only other thing I can think of is that the script is returning an error for some reason that is not being returned when you run it manually.

--
Arron Caruth
Vice President of Product Development
o: 817-601-3222    e: Arron.Caruth@mdaemon.com

MDaemon Technologies
Simple Secure Email

Visit us on www.mdaemon.com | Facebook | LinkedIn | YouTube
Sent using the MDaemon Email Server

On Tue, 22 Feb 2022 15:41:03 +0100, "fabio.vitale@envisioning.it (Fabio VITALE)" <fabio.vitale@envisioning.it> wrote:
Hi Pierre, already tried as follow, and it does not function:

"C:\Ruby31-x64\bin\ruby.exe\ruby.exe" "c:\scripts\my_script.rb"
--parameter_1=1 --parameter_2=2 --parameter_3=3

On Tue, 22 Feb 2022 15:30:57 +0100
  "Pierre PIRAUX (mhc.be)" <ppiraux@mhc.be> wrote:
> Hello Fabio.
> Just my two cents: shouldn't you explicitely specify the absolute
>path of ruby.exe and of my_script.rb ?
>
> Le 22/02/22 à 15:08, Fabio VITALE a écrit :
>> I have a Ruby script that runs just fine when launched from the
>>windows command prompt but does not seems to be launched when invoked
>>from a CF Rule: I can see that the rule is fired but it seems that
>>the Ruby script is not launched (I do not know how to check while the
>>script is executed).
>>
>> From the command prompt I launch it as follow:
>>
>> ruby my_script.rb --parameter_1=1 --parameter_2=2 --parameter_3=3
>>
>> The MDaemon help is very sparse on how to setup a Run a program...
>>action.
>>
>> I have no idea on what is going on.
>>
>> Can someone please help me?
>>
>>
>> --MD-SUPPORT--------------------------------------------------------------
>> This list is for questions and discussion about MDAEMON. To
>>unsubscribe from this mailing list send an email to
>>md-support-unsubscribe@mdaemon.com .
>> --POWERED BY
>>MDAEMON!-----------------------------------------------------
>>
>> --------------------------------------------------------------------------
>> These forums are provided by MDaemon Technologies for user-to-user
>>support and discussion.  MDaemon staff members may participate in the
>>forums periodically but please recognize that this is not the
>>official
>> method of receiving technical support. To receive personal technical
>>support please use the form here:
>> http://www.mdaemon.com/Support/RequestSupport/
>> --------------------------------------------------------------------------
>
> --
>
> -------------------------------------------------
> ***   THIS MAILBOX IS READ **once** PER DAY   ***
> -------------------------------------------------
> Pierre Piraux, from*MHC sa/nv*  -View Pierre Piraux's profile on
>LinkedIn  <https://be.linkedin.com/pub/pierre-piraux/4/284/308>
> email:ppiraux@mhc.be
> Snail
> Mail : MHC sa - 110 Avenue Pastur - 6001 CHARLEROI - BELGIUM
> Web  :www.mhc.be  <http://www.mhc.be>
> Phone: +32 71 36 60 62
>Fax  : +32 71 36 63 04
> [ Never say "oops" in the operating room. ]
>
> Legal disclaimer: as part of an active strategy of litigation and
>claim
> prevention, please note that  this message reflects the opinions of
>its
> sole sender, and that it does not imply any endorsement by MHC sa/nv


--MD-SUPPORT--------------------------------------------------------------
This list is for questions and discussion about MDAEMON. To unsubscribe
from this mailing list send an email to md-support-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!-----------------------------------------------------

--------------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user
support and discussion.  MDaemon staff members may participate in the
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical
support please use the form here:
http://www.mdaemon.com/Support/RequestSupport/
--------------------------------------------------------------------------

--MD-SUPPORT--------------------------------------------------------------
This list is for questions and discussion about MDAEMON. To unsubscribe 
from this mailing list send an email to md-support-unsubscribe@mdaemon.com .
--POWERED BY MDAEMON!-----------------------------------------------------

--------------------------------------------------------------------------
These forums are provided by MDaemon Technologies for user-to-user 
support and discussion.  MDaemon staff members may participate in the 
forums periodically but please recognize that this is not the official
method of receiving technical support. To receive personal technical 
support please use the form here:
http://www.mdaemon.com/Support/RequestSupport/
--------------------------------------------------------------------------



  All MessagesOldest ItemsOlder ItemsNewer ItemsNewest Items



 Content:

Read New | Search

 Guest:

Email to Admin



You are visiting as a Guest user.