Roundcube Community Forum

News and Announcements => General Discussion => Topic started by: Inoubiokadnetsar on June 15, 2014, 04:45:48 AM

Title: virtuser_file / RoundCube 1.0.1
Post by: Inoubiokadnetsar on June 15, 2014, 04:45:48 AM
Hello everybody,

I am having troubles using virtuser_file plugin with a fresh roundcube installation (1.0.1). Roundcube works well but not virtuser_file. I've read many topics about virtuser_file and applied all recommendation but I did'nt succed to make it work with my installation. So here are my questions :
1. Where do I have to define the path of the virtuser_file ?
2. Which is the format of the option ? $rcmail['virtuser_file'] ? $config['virtuser_file'] ? $rcmail_config['virtuser_file'] ?
3. Some topics found on the web where mentioning an "alias" column in users table in the roundcube database. Should it be created ? if yes, what are its parameters ?
4. Does virtuser_file plugin depend on other software on server ?

Thank you for you time.
Title: Re: virtuser_file / RoundCube 1.0.1
Post by: JohnDoh on June 15, 2014, 05:18:26 AM
Quote
1. Where do I have to define the path of the virtuser_file ?

In the main Roundcube config file (rc root/config/config.inc.php)

Quote
2. Which is the format of the option ? $rcmail['virtuser_file'] ? $config['virtuser_file'] ? $rcmail_config['virtuser_file'] ?

It's $config['virtuser_file']

Quote
3. Some topics found on the web where mentioning an "alias" column in users table in the roundcube database. Should it be created ? if yes, what are its parameters ?

The alias column is something from older versions of Roundcube it does not does not exist any more.

Quote
4. Does virtuser_file plugin depend on other software on server ?

No
Title: Re: virtuser_file / RoundCube 1.0.1
Post by: Inoubiokadnetsar on June 15, 2014, 06:03:36 AM
Thank you very much Jonh Doh for your reply,

So, everything I have done is correct but Roundcube is still ignoring the alias and prompting me a login error with the entered alias. I placed de virtuser_file (virtuser in my case) on the rc root folder and chowned it to www-data.

here is the content of virtuser :
Code: [Select]
inoubiokadnetsar inoub
And here the content of config.inc.php :
Code: [Select]
<?php

/* Local configuration for Roundcube Webmail */

// ----------------------------------
// SQL DATABASE
// ----------------------------------
// Database connection string (DSN) for read+write operations
// Format (compatible with PEAR MDB2): db_provider://user:password@host/database
// Currently supported db_providers: mysql, pgsql, sqlite, mssql or sqlsrv
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
// NOTE: for SQLite use absolute path: 'sqlite:////full/path/to/sqlite.db?mode=0646'
$config['db_dsnw'] = '#######################';

// you can define specific table (and sequence) names prefix
$config['db_prefix'] = 'mm';

//    'cache' => 'r',
//    'cache_index' => 'r',
//    'cache_thread' => 'r',
//    'cache_messages' => 'r',
// ----------------------------------
// LOGGING/DEBUGGING
// ----------------------------------
// system error reporting, sum of: 1 = log; 4 = show, 8 = trace
$config['debug_level'] = 5;

// ----------------------------------
// IMAP
// ----------------------------------
// The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
// WARNING: After hostname change update of mail_host column in users table is
//          required to match old user data records with the new host.
$config['default_host'] = '############';

// ----------------------------------
// SMTP
// ----------------------------------
// SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// If left blank, the PHP mail() function is used
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %t = domain.tld
$config['smtp_server'] = '#########';

// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
$config['smtp_port'] = 587;

// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$config['smtp_pass'] = '%p';

// provide an URL where a user can get support for this Roundcube installation
// PLEASE DO NOT LINK TO THE ROUNDCUBE.NET WEBSITE HERE!
$config['support_url'] = '';

// e.g. array( 'localhost:11211', '192.168.1.12:11211', 'unix:///var/tmp/memcached.sock' );
// check client IP in session authorization
$config['ip_check'] = true;

// this key is used to encrypt the users imap password which is stored
// in the session record (and the client cookie if remember password is enabled).
// please provide a string of exactly 24 chars.
$config['des_key'] = '########################';

// Name your service. This is displayed on the login screen and in the window title
$config['product_name'] = 'RDC mail';

// ----------------------------------
// PLUGINS
// ----------------------------------
// List of active plugins (in plugins/ directory)
$config['plugins'] = array('virtuser_file');

// the default locale setting (leave empty for auto-detection)
// RFC1766 formatted language name like en_US, de_DE, de_CH, fr_FR, pt_BR
$config['language'] = 'fr_FR';

// store draft message is this mailbox
// leave blank if draft messages should not be stored
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['drafts_mbox'] = 'Brouillons';

// store spam messages in this mailbox
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['junk_mbox'] = 'Indésirables';

// store sent message is this mailbox
// leave blank if sent messages should not be stored
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['sent_mbox'] = 'Envoyés';

// move messages to this folder when deleting them
// leave blank if they should be deleted directly
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['trash_mbox'] = 'Corbeille';

// display these folders separately in the mailbox list.
// these folders will also be displayed with localized names
// NOTE: Use folder names with namespace prefix (INBOX. on Courier-IMAP)
$config['default_folders'] = array('INBOX''Brouillons''Envoyés''Indésirables''Corbeille');

$config['virtuser_file'] = '/var/www/mymail/virtuser';

Is there anything wrong ?
Title: Re: virtuser_file / RoundCube 1.0.1
Post by: JohnDoh on June 17, 2014, 07:26:06 AM
I have not user the plugin myself but it looks like the plugin expects a file in the format....

email@domain.com  user

the first column has to contain an @.