RegisterRegister    SearchSearch   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

File sharing script

File mirror script
Running CMAILD Remotely

 
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> CommuniMail
View previous topic :: View next topic  
Author Message
RickSanson



Joined: 14 Mar 2007
Posts: 36

PostPosted: Oct 13, 2007 6:24 pm    Post subject: Running CMAILD Remotely Reply with quote

Hi!

I need to to kickoff the cmaild or cmail_daemon scripts from another application. I have all the networking done but it seems the only way to run the script is from within the ./communimail directory. Any other method, both local and remote, results in the following error:

Can't locate libraries.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /var/www/cgi-bin/communimail/cmail_daemon.pl line 3.

BEGIN failed--compilation aborted at /var/www/cgi-bin/fresh/cmail_daemon.pl line 3.

I've placed the /var/www/cgi-bin/communimail in the PATH.

The only way both cmaild.pl and cmail_daemon.pl will properly run is if the scripts are executed from the /var/www/cgi-bin/communimail directory. I am using (without quotes) "nohup perl /var/www/cgi-bin/communimail/cmaild.pl" or cmail_daemon.pl

Thank you! I appreciate your help!
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 22 Mar 2006
Posts: 1487

PostPosted: Oct 15, 2007 7:27 am    Post subject: Re: Running CMAILD Remotely Reply with quote

RickSanson wrote:
Hi!

I need to to kickoff the cmaild or cmail_daemon scripts from another application. I have all the networking done but it seems the only way to run the script is from within the ./communimail directory. Any other method, both local and remote, results in the following error:

Can't locate libraries.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 .) at /var/www/cgi-bin/communimail/cmail_daemon.pl line 3.

BEGIN failed--compilation aborted at /var/www/cgi-bin/fresh/cmail_daemon.pl line 3.

I've placed the /var/www/cgi-bin/communimail in the PATH.

The only way both cmaild.pl and cmail_daemon.pl will properly run is if the scripts are executed from the /var/www/cgi-bin/communimail directory. I am using (without quotes) "nohup perl /var/www/cgi-bin/communimail/cmaild.pl" or cmail_daemon.pl

Thank you! I appreciate your help!



Hello,
yes, it's working from communimail dir only, because it should have to "know" where to find libraries (we using relative paths).
Workaround here is to chdir to that dir first, and then execute daemon.
So, you need to change current dir to communimail first ("chdir" for Perl and PHP) and then call script.

Thanks
Back to top
View user's profile Send private message Send e-mail
RickSanson



Joined: 14 Mar 2007
Posts: 36

PostPosted: Oct 16, 2007 12:37 am    Post subject: Reply with quote

Hi!

I now realize that I misunderstood both cmaild.pl and cmail_daemon.pl in that they initialize the daemon the continues to monitor SendStatus for a change in the status number. I wish I had really read (and understood) the README that clearly describes this.

What I really need to do what web_cmaild.pl does which looks at SendStatus and processes a SendRequest if a status 3 is found. No running daemons nothing waiting for something to happen.

How I can use web_cmaild.pl to perform an uninterrupted or quiet kickoff of a new newsletter? I need to be able to call this script remotely (which I know how to do) but not feed it any login details, etc.

I just need it to run and go away...

Thank you for your help!
Back to top
View user's profile Send private message
admin
Site Admin


Joined: 22 Mar 2006
Posts: 1487

PostPosted: Oct 16, 2007 1:22 pm    Post subject: Reply with quote

RickSanson wrote:
Hi!

I now realize that I misunderstood both cmaild.pl and cmail_daemon.pl in that they initialize the daemon the continues to monitor SendStatus for a change in the status number. I wish I had really read (and understood) the README that clearly describes this.

What I really need to do what web_cmaild.pl does which looks at SendStatus and processes a SendRequest if a status 3 is found. No running daemons nothing waiting for something to happen.

How I can use web_cmaild.pl to perform an uninterrupted or quiet kickoff of a new newsletter? I need to be able to call this script remotely (which I know how to do) but not feed it any login details, etc.

I just need it to run and go away...

Thank you for your help!



cmail_daemon.pl - it's just "watchdog" for cmaild.pl. It just launch cmaild.pl every X seconds. And cmaild.pl is the actual script which checking queue for send requests with proper status.
Actually, cmaild.pl and web_cmaild.pl are the same scripts. web_cmaild.pl just have some HTML output.
You can start cmaild.pl manually (through a call from your script).
Or you can start web_cmaild.pl manually as well (in browser). You will just need to comment CheckAuth call and eliminate $user references in code.

I hope that will help.

Thanks
Back to top
View user's profile Send private message Send e-mail
RickSanson



Joined: 14 Mar 2007
Posts: 36

PostPosted: Oct 16, 2007 1:34 pm    Post subject: Reply with quote

Quote:
You can start cmaild.pl manually (through a call from your script).


Thank you!

So, cmaild.pl will look for as status change (3) then go away, and not be run again until something kicks it off again, yes?

I appreciate your help and I'm trying to repay by answering some of the questions here and updating some of the questions I have had here too...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SibSoft Ltd Forum Index -> CommuniMail All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Copyright © 2003-2013 Sibsoft Ltd