Hi All,
it's me again :-) !!!!!!!
I would use roundcube with autologin from another php script. I found the
plugin "autologin" but it seems to work.
This is my php script :
<!DOCTYPE html>
<html>
<head>
</head>
<body>
<?
$_POST['password'] = 'password in clear and in plain text';
$_SESSION['userpassword'] = strrev(base64_encode('*yourkey*'.$_POST
['password']));
?>
<form name="roundcubelogin" action="http://192.168.254.201/roundcube/?
_task=mail" method="post" target="roundcube">
<input type="hidden" name="_timezone" value="_default_" />
<input type="hidden" name="_task" value="mail" />
<input type="hidden" name="_autologin" value="1" />
<input type="hidden" name="_user" value="mark" />
<input type="hidden" name="_host" value="192.168.254.201:143" />
<input type="hidden" name="_pass" value="<?echo $_SESSION['userpassword']?>"
/>
<input type="submit" name="submit" value="SUBMIT" />
</form>
</body>
</html>
The plugin autologin.php :
<?php
/**
* This plugin performs an automatic login if accessed
* with post Data from other Site an Portal or CMS
* Based on sample autologon PlugIn
*
* @version 0.2
* @author Eric Appelt (lacri)
*
* show into README to install and config
*
* changes
* 0.2 make a little bit secure with base64_encode strrev
* and a key thats replace after submitting encoded pass data
*
*/
class autologin extends rcube_plugin
{
function init()
{
$this->add_hook('startup', array($this, 'startup'));
$this->add_hook('authenticate', array($this, 'authenticate'));
}
function startup($args)
{
$rcmail = rcmail::get_instance();
$autologin = get_input_value('_autologin', RCUBE_INPUT_POST);
// change action to login
if ($args['task'] == 'mail' && empty($args['action']) && empty($_SESSION
['user_id']) && !empty($autologin)) {
$args['action'] = 'login';
// decode pass, revert and replace key
$_POST['_pass'] = str_replace('*yourkey*','',base64_decode(strrev
(get_input_value('_pass', RCUBE_INPUT_POST, true, 'ISO-8859-1'))));
// set initial cookie without this cookie login is not possible
$_COOKIE['roundcube_sessid'] = session_id();
}
return $args;
}
function authenticate($args)
{
$autologin = get_input_value('_autologin', RCUBE_INPUT_POST);
if (!empty($autologin)) {
$args['user'] = get_input_value('_user', RCUBE_INPUT_POST);
$args['pass'] = get_input_value('_pass', RCUBE_INPUT_POST);
$args['host'] = get_input_value('_host', RCUBE_INPUT_POST);
}
return $args;
}
}
Dear subscribers of the Roundcube mailing lists
I'd like to announce the migration of our mailing lists to a new host
which is planned to take place on Monday, March 5th at 3pm GMT.
There's no action required on your side, all subscriptions and
settings will be transferred to the new host. There might be some
delay until all nodes on the net have updated their DNS entries for
lists.roundcube.net and to avoid any loss of messages during that
period, we recommend to suspend posting between 3pm and 9pm GMT on
Monday.
This is also a good occasion to thank Jason at gigo.com for offering
the list hosting for the last couple of years and to Jeroen at
kolab.org to take over.
Best,
Thomas
--
List info: http://lists.roundcube.net/users/
BT/9b404e9e
Hi All,
I configured the ldap server and roundcube to manage contacts. I used the
howto : http://trac.roundcube.net/wiki/Howto_Ldap. It work quite, I have only
a problem for credentials in private addressbook. The public addressbook works
fine, I can search and add contacts.
I checked the Mark's password and it is correct. I tried to use rootpw but it
doesn't works.
My versions are :
openldap-servers-2.4.19-6
php-5.3.3-1
roundcube 0.7.1
I report the error in ldap log of rouncube, my slapd.conf and my main.inc.php.
Thanks a lot
Mark
--------------------------------
logs/ldap :
[05-Mar-2012 10:09:01 +0100]: C: Connect [localhost:389]
[05-Mar-2012 10:09:01 +0100]: S: OK
[05-Mar-2012 10:09:01 +0100]: C: Bind [dn: cn=mark,ou=private,ou=rcabook,
dc=localhost] [pass: xxxx]
[05-Mar-2012 10:09:01 +0100]: S: Invalid credentials
[05-Mar-2012 10:09:01 +0100]: C: Close
[05-Mar-2012 10:14:24 +0100]: C: Connect [localhost:389]
[05-Mar-2012 10:14:24 +0100]: S: OK
[05-Mar-2012 10:14:24 +0100]: C: Bind [dn: cn=mark,ou=private,ou=rcabook,
dc=localhost] [pass: xxxx]
[05-Mar-2012 10:14:24 +0100]: S: Invalid credentials
[05-Mar-2012 10:14:24 +0100]: C: Close
[05-Mar-2012 10:27:42 +0100]: C: Connect [localhost:389]
[05-Mar-2012 10:27:42 +0100]: S: OK
[05-Mar-2012 10:27:42 +0100]: C: Bind [dn: cn=mark,ou=private,ou=rcabook,
dc=localhost] [pass: xxxx]
[05-Mar-2012 10:27:42 +0100]: S: Invalid credentials
[05-Mar-2012 10:27:42 +0100]: C: Close
[05-Mar-2012 10:27:52 +0100]: C: Connect [localhost:389]
[05-Mar-2012 10:27:52 +0100]: S: OK
[05-Mar-2012 10:27:52 +0100]: C: Bind [dn: cn=mark,ou=private,ou=rcabook,
dc=localhost] [pass: xxxx]
[05-Mar-2012 10:27:52 +0100]: S: Invalid credentials
[05-Mar-2012 10:27:52 +0100]: C: Add [dn: mail=ssssss(a)iiii.uu,cn=mark,
ou=private,ou=rcabook,dc=localhost]: Array
(
[cn] => ssssssss sss
[sn] => sss
[givenname] => ssssssss
[mail] => ssssss(a)iiii.uu
[objectClass] => Array
(
[0] => top
[1] => inetOrgPerson
)
)
[05-Mar-2012 10:27:52 +0100]: S: Strong(er) authentication required
[05-Mar-2012 10:27:52 +0100]: C: Close
------------------------------------------------------------
config/main.inc.php
$rcmail_config['ldap_public']['public'] = array(
'name' => 'Public LDAP Addressbook',
'hosts' => array('localhost'),
'use_tls' => false,
'ldap_version' => 3, // using LDAPv3
'port' => 389,
'auth_method' => '',
'user_specific' => false,
'writable' => true,
'base_dn' => 'ou=public,ou=rcabook,dc=localhost',
'bind_dn' => 'cn=rcuser,ou=rcabook,dc=localhost',
'bind_pass' => 'rcpass',
'fieldmap' => array(
'name' => 'cn',
'surname' => 'sn',
'firstname' => 'givenName',
'email' => 'mail',
'phone:home' => 'homePhone',
'phone:work' => 'telephoneNumber',
'phone:mobile' => 'mobile',
'street' => 'street',
'zipcode' => 'postalCode',
'locality' => 'l',
'country' => 'c',
'organization' => 'o',
),
'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
'LDAP_rdn' => 'mail',
'required_fields' => array('cn', 'sn', 'mail'),
'filter' => '(objectClass=inetOrgPerson)',
'groups' => array(
'base_dn' => '', // in this Howto, the same base_dn as
for the contacts is used
'filter' => '(objectClass=groupOfNames)',
'object_classes' => array("top", "groupOfNames"),
),
);
$rcmail_config['ldap_public']['private'] = array(
'name' => 'Private LDAP Addressbook',
'hosts' => array('localhost'),
'use_tls' => false,
'ldap_version' => 3, // using LDAPv3
'port' => 389,
'auth_method' => '',
'user_specific' => true,
'writable' => true,
'base_dn' => 'cn=%u,ou=private,ou=rcabook,dc=localhost',
'bind_dn' => 'cn=%u,ou=private,ou=rcabook,dc=localhost',
'bind_pass' => '', // the user login password is used
'fieldmap' => array(
'name' => 'cn',
'surname' => 'sn',
'firstname' => 'givenName',
'email' => 'mail',
'phone:home' => 'homePhone',
'phone:work' => 'telephoneNumber',
'phone:mobile' => 'mobile',
'street' => 'street',
'zipcode' => 'postalCode',
'locality' => 'l',
'country' => 'c',
'organization' => 'o',
),
'LDAP_Object_Classes' => array('top', 'inetOrgPerson'),
'LDAP_rdn' => 'mail',
'required_fields' => array('cn', 'sn', 'mail'),
'filter' => '(objectClass=inetOrgPerson)',
'groups' => array(
'base_dn' => '', // in this Howto, the same base_dn as
for the contacts is used
'filter' => '(objectClass=groupOfNames)',
'object_classes' => array("top", "groupOfNames"),
),
);
-------------------------------------------
openldap/slapd.conf
#
# See slapd.conf(5) for details on configuration options.
# This file should NOT be world readable.
#
include /etc/openldap/schema/corba.schema
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/duaconf.schema
include /etc/openldap/schema/dyngroup.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/java.schema
include /etc/openldap/schema/misc.schema
include /etc/openldap/schema/nis.schema
include /etc/openldap/schema/openldap.schema
include /etc/openldap/schema/ppolicy.schema
include /etc/openldap/schema/collective.schema
# Allow LDAPv2 client connections. This is NOT the default.
allow bind_v2
# Do not enable referrals until AFTER you have a working directory
# service AND an understanding of referrals.
#referral ldap://root.openldap.org
pidfile /var/run/openldap/slapd.pid
argsfile /var/run/openldap/slapd.args
SIZELIMIT 100000
#
# if no access controls are present, the default policy
# allows anyone and everyone to read anything but restricts
# updates to rootdn. (e.g., "access to * by * read")
#
# rootdn can always read and write EVERYTHING!
#######################################################################
# ldbm and/or bdb database definitions
#######################################################################
database bdb
suffix "dc=localhost"
checkpoint 1024 15
rootdn "cn=admin,dc=localhost"
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw {SSHA}xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd and slap tools.
# Mode 700 recommended.
directory /var/lib/ldap
# Indices to maintain for this database
index objectClass eq,pres
index ou,cn,mail,surname,givenname eq,pres,sub
index uidNumber,gidNumber,loginShell eq,pres
index uid,memberUid eq,pres,sub
index nisMapName,nisMapEntry eq,pres,sub
# Replicas of this database
#replogfile /var/lib/ldap/openldap-master-replog
#replica host=ldap-1.example.com:389 starttls=critical
# bindmethod=sasl saslmech=GSSAPI
# authcId=host/ldap-master.example.com(a)EXAMPLE.COM
# Grant the Roundcub user to create private users
access to dn.one="ou=private,ou=rcabook,dc=localhost" attrs=userPassword
by dn="cn=rcuser,ou=rcabook,dc=localhost" write
by anonymous auth
by self write
by * none
# For user authentication and password change
access to attrs=userPassword
by dn="cn=admin,dc=localhost" write
by anonymous auth
by self write
by * none
# Grant the Roundcube users access to their private addressbooks
access to dn.regex="^.*cn=([^,]+),ou=private,ou=rcabook,dc=localhost$"
by dn="cn=admin,dc=localhost" write
by dn="cn=rcuser,ou=rcabook,dc=localhost" write
by dn.exact,expand="cn=$1,ou=private,ou=rcabook,dc=localhost" write
# Grant the Roundcube user access to the whole addressbook
access to dn.subtree="ou=rcabook,dc=localhost"
by dn="cn=admin,dc=localhost" write
by dn="cn=rcuser,ou=rcabook,dc=localhost" write
# For direcory access
access to *
by dn="cn=admin,dc=localhost" write
# enable monitoring
database monitor
-----------------------------------------
openldap/ldap.conf
#
# LDAP Defaults
#
# See ldap.conf(5) for details
# This file should be world readable but not world writable.
#BASE dc=example,dc=com
#URI ldap://ldap.example.com ldap://ldap-master.example.com:666
#SIZELIMIT 12
#TIMELIMIT 15
#DEREF never
URI ldap://127.0.0.1/
BASE dc=localhost
TLS_REQCERT never
TLS_CACERTDIR /etc/openldap/cacerts
--
List info: http://lists.roundcube.net/users/
BT/9b404e9e
Hey Marcel,
2012/3/2 Marcel Herrguth <mherrguth(a)mrgeneration.de>
> Hey,
>
> Am 2.3.2012 04:51, schrieb rapaterres Oo.:
>
>> i'm just upgraded 7.0 to 7.1 roundcube and i can't access into
>> webmail, i have the error "Session invalid or expired" when i try to
>> login
>>
>> here the logs...
>> [..]
>>
>> i don't know what's going on because all looks fine... but it isn't :(
>>
>> anyone can guide me with this error?
>>
>>
> I had similare Errors. These errors occur soemtimes, but simply seem to be
> a Browser Problem. (for me it was Firefox).
> If you delete all cookies that Roundcube writes (especially the session
> cookie) and then refresh the page, a login should work fine to you.
>
> You can also use the plugin that keeps you logged in. It may sometimes
> display this error as well, but if you refresh it without doing anything
> else, it logs you in most of the times.
>
> Hope I could help you
>
thank you for your help but...
I already read that this problem could be the browser and I deleted all
cookies, and tried from another browser too... but it did not work. I even
tried from another computer (and other ip), and even tried to delete the
sessions in the bbdd, but I have the same error.
--
List info: http://lists.roundcube.net/users/
BT/9b404e9e
Hi,
In my system I have multiple domains with many users, all set up in mysql.
MTA is served by Exim 4, Backend and IMAP is handled by dovecot 2.0.
Some of my users have mail aliases, what means that for example john(a)test.com
is able to log in also as johny(a)test.com as well as john(a)williams.com. All these
accounts lead to the same mailbox, and check the password for the same
basic user, which is john(a)test.com.
And everything works fine, until they log in to roundcube. Lightweight issue is that
settings are separate for each email that they used to log in - annoying, but you could
live with it. But another thing is much worse: when users set up sieve rules in roundcube,
these settings are also separate for each mail alias - what is hardly acceptable. But what
is absolutely unacceptable is the fact, that actually only rules set up for the basic account
(john(a)test.com) are working. This is quite understandable, since dovecot during delivery
checks the basic account sieve file instead of checking all possible variants :)
Now I'd like to find out if there is any solution for repairing this.
Dovecot, for example, uses its user_query and password_query, that always return the
same no matter which credentials were used to log in.
Maybe there is a way for roundcube to identify user not by credentials but by eg. inbox path?
That would help a lot...
Am I the only one who needs such functionality?
Greetings,
--
Jacek
--
List info: http://lists.roundcube.net/users/
BT/9b404e9e
Hi Devs, you're probably getting this question every day now, but will we
be seeing a February announcement for the beta release including the new
skin for Roundcube?
Thanks for all your hard work and talent!
--
List info: http://lists.roundcube.net/users/
BT/9b404e9e