Author Topic: (SOLVED) Question about the installation of rcguard for captchas  (Read 6605 times)

Offline SipriusPT

  • Jr. Member
  • **
  • Posts: 36
Hello guys,

I am trying to install the rcguard for captchas at roundcube but i dont know well how to set this with SQL.

After start to read the installation guide (https://github.com/dsoares/rcguard) i was unable to do this because i really dont know how can i do it:

Use the files within SQL/ to create the database layout required for rcguard. The table should be created in the database used by Roundcube.


My knowledge about SQL is almost none :-[

And do i have to install PHP GD to let this plugin run?
« Last Edit: January 16, 2017, 05:36:13 AM by SipriusPT »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Question about the installation of rcguard for captchas
« Reply #1 on: January 13, 2017, 07:24:30 AM »
You need to run the sql file to import it into the database. What database (MySQL, PostgreSQL, SQLite) does your Roundcube install use?

It doesn't look like you need GD library just a recaptcha api key.

Offline SipriusPT

  • Jr. Member
  • **
  • Posts: 36
Re: Question about the installation of rcguard for captchas
« Reply #2 on: January 13, 2017, 07:45:13 AM »
Hey SKaero!  :D

I am using MySQL. How can i run the sql file to import?

Yes, i have just added the API key of reCAPTCHA from google, in the rcguard config file.

« Last Edit: January 13, 2017, 07:55:09 AM by SipriusPT »

Offline SipriusPT

  • Jr. Member
  • **
  • Posts: 36
Re: Question about the installation of rcguard for captchas
« Reply #3 on: January 13, 2017, 09:35:41 AM »
SKaero just confirm if the right sintax is this one please:

mysql -u <roundcubeuser> -p <dbname> < <mysql.initial.sql from rcguard>
« Last Edit: January 13, 2017, 10:07:38 AM by SipriusPT »

Offline SipriusPT

  • Jr. Member
  • **
  • Posts: 36
Re: Question about the installation of rcguard for captchas
« Reply #4 on: January 13, 2017, 10:12:58 AM »
I have just done that and add the name of the plugin at:

$config['plugins'] = array('rcguard-master','emoticons');

But after doing some tests didnt show up.

Here is the config of this plugin:

Code: [Select]
// Number of failed logins before reCAPTCHA is shown
$rcmail_config['failed_attempts'] = 3;

// Release IP after how many minutes (after last failed attempt)
$rcmail_config['expire_time'] = 10;

// Reset failure count after successfull login (see bratkartoffel/rcguard@670395e)
$rcmail_config['rcguard_reset_after_success'] = true;

// reCAPTCHA API
$rcmail_config['recaptcha_api']        = 'http://www.google.com/recaptcha/api.js';
$rcmail_config['recaptcha_api_secure'] = 'https://www.google.com/recaptcha/api.js';

// Use HTTPS for reCAPTCHA
$rcmail_config['recaptcha_https'] = false;

// Log events
$rcmail_config['recaptcha_log'] = true;

// Event is not logged when set to NULL
// Parameter expansion:
// %r - Remote IP
// %u - Username
$rcmail_config['recaptcha_log_success'] = 'Verification succeeded for %u. [%r]';
$rcmail_config['recaptcha_log_failure'] = 'Error: Verification failed for %u. [%r]';
$rcmail_config['recaptcha_log_unknown'] = 'Error: Unknown log type.';

// Block IPv6 clients based on prefix length
// Use an integer between 16 and 128, 0 to disable
$rcmail_config['rcguard_ipv6_prefix'] = 0;

I have added both public and private keys from google.

UPDATE1:

At errors log file i am getting when is supposed to show:

Code: [Select]
[13-Jan-2017 15:22:32 +0000]: PHP Error: Failed to load plugin file /Library/Server/Web/Data/Sites/Default/plugins/rcguard-master/rcguard-master.php in /Library/Server/Web/Data/Sites/Default/program/lib/Roundcube/rcube_plugin_api.php on line 173 (POST /?_task=login&_action=login)
« Last Edit: January 13, 2017, 10:24:41 AM by SipriusPT »

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: Question about the installation of rcguard for captchas
« Reply #5 on: January 13, 2017, 04:40:03 PM »
In the plugin array it should be 'rcguard' not 'rcguard-master'

Offline SipriusPT

  • Jr. Member
  • **
  • Posts: 36
Re: Question about the installation of rcguard for captchas
« Reply #6 on: January 16, 2017, 05:34:25 AM »
Ah it was a bad path problem, this plugin folder is named as rcguard-master and the php as rcguard =/ they should have given the same name to both folder and php file, since roundcube will use the name at plugins array to build that path.

Thanks SKaero!  :D