Author Topic: Roundcube Getmail plugin  (Read 5419 times)

Offline tryphon

  • Newbie
  • *
  • Posts: 3
Roundcube Getmail plugin
« on: September 07, 2015, 10:15:21 AM »
Hi,

Maybe this post should be addressed to the Getmail author : I tried to create an account to GitLab without success and I had no answer from GitLab about this issue. Then I cannot write a new subject on his GitLab project website.

I installed successfully Getmail 4.48 on my home server (Qnap). I use the MailDir method to retrieve messages from a Gmail account. It works.

The next step is to use the Getmail plugin with RoundCube. I followed carefully the installation process and carefully study the config.inc.php file to set up the right parameters. For a test I run manually the cron.php file with php-cli command included in my server OS. No error message. When I go to my MailDir folder I see nothing new.

I would like to produce the /roundcube/logs/console file to debug the issue. In the configuration file I set $config['getmail_debug'] = 1 or $config['getmail_debug'] = true, but I don't get any console log file and nothing more appears in the errors log file.

In fact, nothing happens. I do not know PHP language but I added :

Code: [Select]
echo $rcmail;
just after the line

Code: [Select]
$rcmail = rcmail::get_instance($GLOBALS['env']);
in the file cron.php, and I executed it manually.

$rcmail is empty. I do not know what rcmail::get_instance() is doing but I see this statement in the Plugins Resources page in your website.

I suspect the getmail plugin cannot work with $rcmail empty ...

Any idea ?

Thank you.

Offline SimonTank

  • Newbie
  • *
  • Posts: 2
Re: Roundcube Getmail plugin
« Reply #1 on: December 17, 2015, 09:20:42 AM »
Does no one have a clue?

I also tried to debug this...
the error is in rcmail::get_instance($GLOBALS['env']);
somewhere in this a die() without message is thrown.

Also added
Code: [Select]
error_reporting(E_ALL);
ini_set('error_log', '/var/log/php-error-shell.log');
error_log('hello');

but only log is
[17-Dec-2015 15:11:44 Europe/Berlin] hello

did in one of the last versions
rcmail::get_instance
change?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Roundcube Getmail plugin
« Reply #2 on: December 17, 2015, 05:28:24 PM »
I don't use the getmail plugin so I can't really comment on the setup but maybe I can give you some hints as to whats wrong.

In fact, nothing happens. I do not know PHP language but I added :

Code: [Select]
echo $rcmail;
just after the line

Code: [Select]
$rcmail = rcmail::get_instance($GLOBALS['env']);
in the file cron.php, and I executed it manually.

$rcmail is empty. I do not know what rcmail::get_instance() is doing but I see this statement in the Plugins Resources page in your website.

I suspect the getmail plugin cannot work with $rcmail empty ...
The get_instance function is being used to start Roundcube, the reason why it seems empty when you echo it is because it returns an object not a string. If you wanted to see the contents you would need to do the following:
Code: [Select]
echo print_r($rcmail, true);

I also tried to debug this...
the error is in rcmail::get_instance($GLOBALS['env']);
somewhere in this a die() without message is thrown.

Also added
Code: [Select]
error_reporting(E_ALL);
ini_set('error_log', '/var/log/php-error-shell.log');
error_log('hello');

but only log is
[17-Dec-2015 15:11:44 Europe/Berlin] hello
Most likely there isn't any fail errors being thrown and thats why changing the error reporting doesn't show anything more.

did in one of the last versions
rcmail::get_instance
change?
If your using the GIT version of Roundcube then yes the function has changed, if your using Roundcube 1.1.x then the function hasn't changed.

My gut feel is that the problem is something deeper in the plugin then the initialization.

Offline SimonTank

  • Newbie
  • *
  • Posts: 2
Re: Roundcube Getmail plugin
« Reply #3 on: December 18, 2015, 08:18:24 AM »
Found the error....
Damn thing.

If any problem got a little error in config, get instance isn't delivered...
The Problem was the "Melanie2 Larry Mobile skin v0.4.4" the required plugin for mobile doesn't work correct.

Deactivated it. Now everthing works

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,882
    • SKaero - Custom Roundcube development
Re: Roundcube Getmail plugin
« Reply #4 on: December 18, 2015, 01:21:46 PM »
Glad to here that you fixed it ;D