Running CMAILD Remotely

CommuniMail related questions

Moderator: admin

Message
Author
RickSanson
Posts: 36
Joined: Mar 14, 2007 6:27 pm

Running CMAILD Remotely

#1 Postby RickSanson » Oct 13, 2007 6:24 pm

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!

admin
Site Admin
Posts: 1785
Joined: Mar 22, 2006 12:32 pm

Re: Running CMAILD Remotely

#2 Postby admin » Oct 15, 2007 7:27 am

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

RickSanson
Posts: 36
Joined: Mar 14, 2007 6:27 pm

#3 Postby RickSanson » Oct 16, 2007 12:37 am

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!

admin
Site Admin
Posts: 1785
Joined: Mar 22, 2006 12:32 pm

#4 Postby admin » Oct 16, 2007 1:22 pm

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

RickSanson
Posts: 36
Joined: Mar 14, 2007 6:27 pm

#5 Postby RickSanson » Oct 16, 2007 1:34 pm

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...


Return to “CommuniMail”

Who is online

Users browsing this forum: No registered users and 0 guests