Hi all,
I want to add a vacation responder (i.e. the possibility to save a string
to my db representing the text to display when the user set the
auto-responder
on) to my Roundcube installation.
I find some examples of vacation plugins on the forum, but they are
not as I want it: I need a plugin that uses only Roundcube and read/write
the text message of the responder from/to a db. (while the other responders
use cPanel or COM or others...)
I tried to implement the plugin basing my code on the changepasswd plugin
(see
http://wheaties.us/blog/2008/12/21/change-password-roundcube/).
The problem is that using this code I cannot show the current value of the
vacation
responder text on the browser page, while I'm able to change it in the db.
Here is what I tried to write:
--- File program/steps/settings/vacationresp.inc --- (new)
<?php
$OUTPUT->set_pagetitle(rcube_label('vacationresp'));
$OUTPUT->add_handler('vacationresp', 'rcmail_vacationresp_form');
// $OUTPUT->include_script('vacationresp.js');
$OUTPUT->add_label('vacationfailed','vacationchanged');
$OUTPUT->send('vacationresp');
function rcmail_vacationresp_form($attrib) {
list($form_start, $form_end) = get_form_tags($attrib,
'save_vacationresp');
unset($attrib['form']);
// return the complete edit form as table
$out = $form_start;
$table = new html_table(array('cols' => 2));
if (!isset($no_override['curvacation']))
{
$field_id = 'rcmfd_curvac';
//$input_curvac = new html_textarea(array('name' => '_curvacation',
'id' => $field_id));
$input_curvac = new html_textarea(array('name' => '_curvacation',
'id' => $field_id, 'size' => 40));
$table->add('title', html::label($field_id,
Q(rcube_label('curvacation'))));
//$table->add(null, $input_curvac->show());
$table->add(null, $input_curvac->show('_vacation'));
// $table->add(null, $input_curvac->show($show_vacation));
}
$out .= $table->show($attrib);
$out .= $form_end;
return $out;
}
?>
--- File program/steps/settings/save_vacationresp.inc --- (new)
<?php
require_once('plugins/vacationresp/config.inc.php');
$old_vac = $_POST['_curvacation'];
$sql_select = str_replace(array('%u'),
array($_SESSION['username']),
$vacationresp_config['sql_select']);
$sql_update = str_replace(array('%u', '%o'),
array($_SESSION['username'], $old_vac),
$vacationresp_config['sql_update']);
$user_db = new rcube_mdb2($vacationresp_config['db_dsnw'],
$vacationresp_config['db_dsnr'], $vacationresp_config['db_persistent']);
$user_db->db_connect('w');
if ($err_str = $user_db->is_error()) {
raise_error(array(
'code' => 603,
'type' => 'db',
'message' => $err_str), FALSE, TRUE);
}
$user_db->query($sql_select);
if ($user_db->num_rows() == 1) {
$updated = false;
$updated = $user_db->query($sql_update);
if ($updated) {
$OUTPUT->show_message('vacationchanged', 'confirmation');
}
else {
$OUTPUT->show_message('vacationfailed', 'error');
}
}
else {
$OUTPUT->show_message('vacationfailed', 'error');
}
rcmail_overwrite_action('vacationresp');
?>
--- File program/js/app.js --- (modified)
case 'settings':
this.enable_command('preferences', 'identities', 'save', 'folders',
'changepasswd', 'vacationresp', true);
if (this.env_action='vacationresp')
this.enable_command('save_vacationresp', true);
case 'vacationresp':
this.goto_url('vacationresp');
break;
case 'save_vacationresp':
this.gui_objects.editform.submit();
break;
--- File program/plugins/vacationresp/config.inc.php --- (new)
<?php
$vacationresp_config = array();
$vacationresp_config['db_dsnw'] =
'mysql://roundcube:round@localhost/roundcubemail';
$vacationresp_config['db_dsnr'] = '';
$vacationresp_config['db_persistent'] = FALSE;
$vacationresp_config['sql_select'] = "SELECT username FROM users WHERE
username = '%u';";
$vacationresp_config['sql_update'] = "UPDATE users SET vacation = '%o'
WHERE username = '%u';";
?>
--- File program/plugins/vacationresp/vacationresp.php
<?php
class vacationresp extends rcube_plugin
{
function init()
{
// preperation for Plugin API
// not used yet
}
}
?>
--- File skins/default/templates/vacationresp.html --- (new)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><roundcube:object name="pagetitle" /></title>
<roundcube:include file="/includes/links.html" />
<link rel="stylesheet" type="text/css" href="/settings.css" />
<script type="text/javascript" src="/functions.js"></script>
</head>
<body onload="rcube_init_settings_tabs()">
<roundcube:include file="/includes/taskbar.html" />
<roundcube:include file="/includes/header.html" />
<roundcube:include file="/includes/settingstabs.html" />
<div id="userprefs-box">
<div id="userprefs-title"><roundcube:label name="vacation" /></div>
<div style="padding:15px 0 15px 15px">
<roundcube:object name="vacationresp" />
<div style="clear:left"></div>
</div>
</div>
<p id="listbuttons"><roundcube:button command="save_vacationresp"
type="input" class="button mainaction" label="save" /></p>
</body>
</html>
--- File skins/default/includes/settingstabs.html --- (modified)
<span id="settingstabvacationresp" class="tablink"><roundcube:button
command="vacationresp" type="link" label="vacation" title="vacationresp"
class="tablink" /></span>
Someone knows how to pass the current vacation text value to the showed
page?
Thanks in advance.
_______________________________________________
List info: http://lists.roundcube.net/users/
Hi all,
I add the changepassword plugin from the link below to my Roundcube
installation:
http://wheaties.us/blog/2008/12/21/change-password-roundcube/
I need to logout after user change his password, so he can re-login with
the new one. I want to show an alert popup, and when the user clicks the
"OK" button, it will be redirected to the logout page.
I tried to add this line to the "app.js" file:
case 'save_changepasswd':
if (changepasswd_check_input())
{
this.gui_objects.editform.submit();
---> alert(this.get_label('passwdconfirm')); <---
---> this.switch_task("logout"); <---
}
break;
This actually works only when user inserts old and new password correctly.
But if the user
inserts a wrong old password, the alert popup fires anyway, because this
script is called
before testing submitted values with the db ones.
My questions is: where can I insert the above commands to get the right
behaviour?
Thanks in advance.
_______________________________________________
List info: http://lists.roundcube.net/users/
I've been using Round Cube for about three years to receive my business
faxes. Three days ago it stopped working. I can sign in and then I get a
message saying that the site cannot open. Do you know what is causing this
or how I can fix it?
Glenn Cressy CEO
www.RegisteredServiceDogs.com
_______________________________________________
List info: http://lists.roundcube.net/users/
Hi
I encountered the following problem. I have installed roundcubemail in
Fedora8 machine. Everything seems to work. But the conection
with the IMAP server didn't happen. The error I got is:
Connecting to xxx.xxx.xxx...
Warning: fsockopen() [function.fsockopen]: unable to connect to
xxx.xxx.xxx:143 (Permission denied)
in/var/www/html/roundcubemail/program/lib/imap.inc on line 596
IMAP connect: NOT OK(Could not connect to xxx.xxx.xxx at port 143:
Permission denied)
I have verified the logs in the imap server and there is nothing
related to the conection. It seems that the problem is in the machine
where I put roundcubemail.
Any help?
Thank you
_______________________________________________
List info: http://lists.roundcube.net/users/
On Fri, 13 Feb 2009 11:24:02 -0300, Eden Caldas <edencaldas(a)gmail.com>
wrote:
>> > It's on a VM so I'm not afraid to say passwords here.
>> >
>> > Distro is Ubuntu 8.04.2
>> > Installed slapd then I did dpkg-reconfigure and configured teste.org
>> > Set admin password to 123456
>> > backend and database are hdb
>> > suffix "dc=teste,dc=org"
>> >
>> > I also installed phpldapadmin.
>> > I can login with the admin account
>> > I create and addressbook entry
>> >
>> > dc=teste,dc=org (2)
>> > |_cn=admin
>> > |_cn=Eden Caldas
>> >
>> > Eden Caldas is the addressbook entry.
>> >
>> > I edit main.inc.php and uncoment the ldap lines.
>> > I configure like this:
>> >
>> > $rcmail_config['address_book_type'] = 'ldap';
>> >
>> > $rcmail_config['ldap_public']['teste'] = array(
>> > 'name' => 'teste.org',
>> > 'hosts' => array('mail.teste.org'),
>> > 'port' => 389,
>> > 'use_tls' => false,
>> > 'user_specific' => false,
>> > 'base_dn' => 'dc=teste,dc=org',
>> > 'bind_dn' => 'cn=admin,dc=teste,dc=org',
>> > 'bind_pass' => '123456',
>> > 'writable' => true,
>> > 'LDAP_Object_Classes' => array("top", "inetOrgPerson"),
>> > 'required_fields' => array("cn", "sn", "mail"),
>> > 'LDAP_rdn' => 'mail',
>> > 'ldap_version' => 3,
>> > 'search_fields' => array('mail', 'cn'),
>> > 'name_field' => 'cn',
>> > 'email_field' => 'mail',
>> > 'surname_field' => 'sn',
>> > 'firstname_field' => 'gn',
>> > 'sort' => 'cn',
>> > 'scope' => 'sub',
>> > 'filter' => '',
>> > 'fuzzy_search' => true);
>> >
>> > When I log into roundcube and go to the address book get only
>> "teste.org"
>> > showing in the groups field but nothing else.
>> >
>> > Any thoughts?
>>
>> And what happens when you search for one or more persons?
> err... it works
>
> So is that the normal behavior? We have no list of contacts, we have
> to search?
While testing something, I noticed that when the filter-option in the
LDAP config is filled, this search is performed when opening the
addressbook. You can use I.E.:
'filter' => 'mail=*@*', // used for basic listing (if not empty)
--
Kees de Keizer
kees(a)de-keizer.net
http://www.de-keizer.net/
_______________________________________________
List info: http://lists.roundcube.net/users/
I've tried to address book with openldap, but I have no success:
There is the entry on main.inc.php:
$rcmail_config['ldap_public']['LDAPBEM'] = array('hosts' => '192.168.0.199',
'port' => 389,
'use_tls' => false,
'base_dn' => 'dc=domain,dc=com,dc=br',
'bind_dn' =>
'cn=phpldapadmin,ou=ldapadmin,o=sistemas,dc=domain,dc=com,dc=br',
'bind_pass' => 'pass',
//'base_dn' => 'o=ENT,dc=domain,dc=com,dc=br',
'search_fields' => array('Email' => 'mail', 'Name' => 'cn'),
'name_field' => 'cn',
'mail_field' => 'mail',
'email_field' => 'mail',
'scope' => 'sub',
'fuzzy_search' => 1);
Please, this is the issue to assign roundcubemail to be a official
webmail in my enterprise, but the ldap contacts is the first subject for
my users.
Thanks!
--
Juliano Souza
TI
Grupo BEM
55(11)-3871-6746
juliano(a)grupobem.com.br
_______________________________________________
List info: http://lists.roundcube.net/users/
Hello:
I'm looking to integrate a copy of RoundCube with XRMS.
Any one willing and able?
Dumarest
_______________________________________________
List info: http://lists.roundcube.net/users/
It's on a VM so I'm not afraid to say passwords here.
Distro is Ubuntu 8.04.2
Installed slapd then I did dpkg-reconfigure and configured teste.org
Set admin password to 123456
backend and database are hdb
suffix "dc=teste,dc=org"
I also installed phpldapadmin.
I can login with the admin account
I create and addressbook entry
dc=teste,dc=org (2)
|_cn=admin
|_cn=Eden Caldas
Eden Caldas is the addressbook entry.
I edit main.inc.php and uncoment the ldap lines.
I configure like this:
$rcmail_config['address_book_type'] = 'ldap';
$rcmail_config['ldap_public']['teste'] = array(
'name' => 'teste.org',
'hosts' => array('mail.teste.org'),
'port' => 389,
'use_tls' => false,
'user_specific' => false,
'base_dn' => 'dc=teste,dc=org',
'bind_dn' => 'cn=admin,dc=teste,dc=org',
'bind_pass' => '123456',
'writable' => true,
'LDAP_Object_Classes' => array("top", "inetOrgPerson"),
'required_fields' => array("cn", "sn", "mail"),
'LDAP_rdn' => 'mail',
'ldap_version' => 3,
'search_fields' => array('mail', 'cn'),
'name_field' => 'cn',
'email_field' => 'mail',
'surname_field' => 'sn',
'firstname_field' => 'gn',
'sort' => 'cn',
'scope' => 'sub',
'filter' => '',
'fuzzy_search' => true);
When I log into roundcube and go to the address book get only "teste.org"
showing in the groups field but nothing else.
Any thoughts?
_______________________________________________
List info: http://lists.roundcube.net/users/
Hi!
The following changeset fixes an XSS vulnerability:
http://trac.roundcube.net/changeset/2245
Roundcube is packaged in Debian Lenny and the version that is considered
for this version is 0.1.1. It is not possible to package a more recent
version due to the way Debian manages to publish a "stable" version.
The code is really different for 0.1.1. From my understanding of the
code, it seems that 0.1.1 is not vulnerable, but I will test this.
We also have 0.2-alpha. We are in the process to release 0.2-stable as
well but this is not done yet since some pieces are missing in
Debian. 0.2-alpha does not accept the background attribute, so no
problem with this one. However, the patch also changes a regexp. Is this
change related to the XSS vulnerability?
Thanks for any input.
--
Make sure comments and code agree.
- The Elements of Programming Style (Kernighan & Plauger)
_______________________________________________
List info: http://lists.roundcube.net/users/
Hi,
I just installed Roundcube yesterday and am rather impressed. Nice work.
I have a question regarding how to interleave replies, especially those
in HTML coming from GMail.
When I hit reply, there is a blue line that runs to the end of the
message. If I interleave my replies in the original, there doesn't appear
to be a way to determine who is replying to what. What I was hoping was
that Roundcube's editor would drop the blue line where I am entering text
to indicate new comments. Instead, my replies are included with the last
reply. As a result, there is no way to determine who is replying to what..
I looked at the generated HTML and I could rewrite it each time but I am
wondering if this was intended or a known issue ?
When replying in text, it works better, however, previous replies are
treated as only one layer of replies. That is instead of adding ">>" for a
reply to a reply, it simply enters ">"..
Thanks
J
_______________________________________________
List info: http://lists.roundcube.net/users/