Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Beta 4 - incoming.pl in login.cgi

Quote Reply
Beta 4 - incoming.pl in login.cgi
Is it still possible to run incoming.pl in login.cgi? I put this in sub main:

system ("/home/domain/webmail/batch/incoming.pl");

When I run login.cgi I get this:

GMail (11237): Connecting to POP server domain.com. at /home/domain/webmail/batch/incoming.pl line 223.
GT::Mail::POP3 (11237): Attempting to connect .. at /home/domain/www/cgi-bin/webmail/admin/GT/Mail/POP3.pm line 277.
GT::Mail::POP3 (11237): Connected to domain.com on port 110 at /home/domain/www/cgi-bin/webmail/admin/GT/Mail/POP3.pm line 289.
GT::Mail::POP3 (11237): Going to login at /home/domain/www/cgi-bin/webmail/admin/GT/Mail/POP3.pm line 311.
GT::Mail::POP3 (11237): Attempting to log in via clear text ... at /home/domain/www/cgi-bin/webmail/admin/GT/Mail/POP3.pm line 359.
GT::Mail::POP3 (11237): --> USER webmail at /home/domain/www/cgi-bin/webmail/admin/GT/Mail/POP3.pm line 152.
GT::Mail::POP3 (11237): <-- +OK User name accepted, password please at /home/domain/www/cgi-bin/webmail/admin/GT/Mail/POP3.pm line 178.
GT::Mail::POP3 (11237): --> PASS password at /home/domain/www/cgi-bin/webmail/admin/GT/Mail/POP3.pm line 152.
...

above the login page. I can still login fine. I just need to know how to get rid of the output from incoming.pl. Any ideas?

Thanks
~Charlie

Quote Reply
Re: Beta 4 - incoming.pl in login.cgi In reply to
I believe if you turn OFF de-bugging that these messages will not appear.

Regards,

Eliot Lee
Quote Reply
Re: Beta 4 - incoming.pl in login.cgi In reply to
Thanks Eliot. I tried setting de-bugging to 0 in the admin before I posted here but that didn't help. Is there another place I should set this?

Thanks
~Charlie

Quote Reply
Re: Beta 4 - incoming.pl in login.cgi In reply to
Hi,

incoming.pl, when ran from the web redirects standard error to standard out and turns debugging on. This was designed as a debugging mechinism. It was never designed to be ran from the web because of the time it can take to get large amounts of data can timeout a browser. If you must run it like this you can use `` (backtics) to catch the output from it.
So change your system() to something like:

my $output = `/usr/bin/perl /path/to/incoming.pl`;
# Do something with $output or just discard it.

Where /path/to is the full path.

Cheers,

Scott

Quote Reply
Re: Beta 4 - incoming.pl in login.cgi In reply to
Hello there!

In Reply To:
take to get large amounts of data can timeout a browser.
I thought this too but found out that it could be wrong.

Once this process is started from the browser at the level of nph-incoming.pl it will do the work on its own and will also end the process when finished regardless of the browser timeout problem. The browser only tells you that it is not responding. The browser fails to notice that the process is still going on in the memory and has no control over it. Hence the timeout. That ofcourse does not mean that the process has stoped or got killed.

nph = No Parsing Headers and why should it be incoming.pl instead of nph-incoming.pl?

This script does not require any output or does it?

Hence there is nothing that stops this process from the web.

Although it would be not stupid to run it via web in the form of a login combination.

Once this process is started it will run on its own on the server. So if twenty logins will invoke twenty processes which will continue. Hence it depends on the resources of the server. If the mails have been sorted out then the next process will sort it out and the following process will also be faster. Hence there is also no harm in there.

So to offer an option in the Admin.pm somewhere to the administrator if it should run with the login script or as cron is not at all a bad idea from the designers point of view as it would be the choice of the user/administrator of the script to decide either to work with cron or not. Due to service provider restrictions on resources this option in the admin management becomes interesting.




Quote Reply
Re: Beta 4 - incoming.pl in login.cgi In reply to
hi all,
it's a problem for me also, to just check for new mail every x minutes.

Is there any way to check only for mail to a single user ???

i mean, when somebody logs in, gmail will check JUST his new mails.

And also, can be the outgoing mails, be delivered as soon as they got sended ???

(Naturally i'm using catch-all account)

Thx

Quote Reply
Re: Beta 4 - incoming.pl in login.cgi In reply to
Hello!

I am not an expert like other guys around but thought of commenting here.

I do not think it can work the way you suggest since the mail files are raw files and they needed to be sorted. If it needs time to sort then it may do final sorting as well.

What I suggested was that if the incomming.pl was activated at the time of logging in by any user then it would take only few seconds to sort them out. More the logins faster the sorting shall be. Moreover the cron can run in the background every hour or two any way.

Such would be a problem with many people to run cron and many service providers do not give a lot of liberties on them. Hence such an intreme soluttion is a must for many.

What I do not know is how to activate incoming.pl from the admin or web interface.

By the way outgoing.pl does what you suggest anyway. I do not know if it launched a que of emails waiting to be send.

Thanks