On Thu, Jul 9, 2009 at 10:55, Cor Bosman<cor(a)xs4all.nl> wrote:
> Hi Thomas, im not certain the patch you added in 2727 is what people were
> asking for. I was under the impression what they wanted is to be able to add
> to existing <roundcube:container name="XXX"> and <roundcube:object
> name="YYY"> elements. So if a template defines a container that builds say
> a message list, they could add to the bottom of that container. Or actually,
> maybe people want/can use both..
I see. There's also the 'template_container' hook which is internally
used and is now documented on
http://trac.roundcube.net/wiki/Plugin_Hooks#template_container
> So, maybe we can use 3 types of hook:
>
> 1) add to the end of a page (footer)
Isn't this the same as in r2727?
> 2) add to the end of a template (patch 2727)
> 3) add to the end (and beginning?) of container/object elements.
Can be done using the 'template_container' hook.
~Thomas
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
line 171, file /program/localization/nl_NL/labels.inc
"Let op: Dit bevestigd alleen dat uw bericht bij de geaddresseerde is
weergegeven. Er is geen garantie dat de geaddresseerde het bericht
daadwerkelijk heeft gelezen of de inhoud heeft begrepen." 'bevestigt'
moet met een 't' ipv met een 'd'
Above the word bevestigd, should be with 't', like bevestigt
Please change this.
Met vriendelijke groet,
Robert Broekhof
Team Meesterlijk
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
*attachment type*
the newly introduced extension based mime-ing does not work, an old code
fragment got back...:
https://svn.roundcube.net/trunk/roundcubemail/program/steps/mail/attachment…
instead of
'mimetype' => rc_mime_content_type($filepath,
$_FILES['_attachments']['type'][$i])
should be this
'mimetype' => rc_mime_content_type($filepath,
$_FILES['_attachments']['name'][$i], $_FILES['_attachments']['type'][$i])
*undocumented plugin hook*
http://trac.roundcube.net/wiki/Plugin_Hooks
$attachment = $RCMAIL->plugins->exec_hook('upload_attachment', $attachment);
Bye,
Balazs
_______________________________________________
List info: http://lists.roundcube.net/dev/
Is there a "proper" way for Roundcube plugins to be accessing/writing to
session data? I was assuming that $_SESSION would be okay, but it seems
that if you are putting data in $_SESSION before the authenticate hook
it will be killed by $RCMAIL->kill_session(); on line 76 of index.php.
Having debugged it through xdebug, it seems as if the session data is
being killed by rc.
Here is what I am seeing:
- library is called from plugin "startup" hook. This forces an unauth'd
session to redirect to url of login service to establish authentication
credentials
- once auth'd it redirects back to the Roundcube url with
$_SESSION['phpCAS'] set
- again plugin "startup" hook is called, but $_SESSION['phpCAS'] exists
so session is authenticated so startup hook sets $startup['action'] =
'login'
- index.php evaluates ($RCMAIL->action=='login' &&
$RCMAIL->task=='mail') to true and executes $RCMAIL->kill_session(); on
line 76 of index.php
- $_SESSION['phpCAS'] gets nuked
Is there a way of saving and restoring phpCAS so that when authenticate
hook is called it will exist in $_SESSION?
_______________________________________________
List info: http://lists.roundcube.net/dev/
This diff for rcube_ldap.php allows users to define an array
'search_base_dn' in an ldap config. This is for users that may have to
deal with poor LDAP data (like you would see from someone who can
install Windows Server 2008 so they think they're an IT admin expert).
I freely and openly admit that I am NOT an expert programmer (or expert
anything really). This patch "worked for me" for my specific
implementation. It shouldn't break anything for people with a single
search base defined in 'base_dn'.
Example:
.... // regular ldap configuration options
'search_base_dn' => array(
'OU=Administration,DC=company,DC=org',
'OU=Finance,DC=company,DC=org'),
.... // continue regular ldap options
Note that the diff results below are against the rcube_ldap.php in 0.3b.
TA
55,56d54
< if (! isset($this->prop['search_base_dn']))
< $this->prop['search_base_dn'] = $p['base_dn'];
259a258,260
> if ($this->sort_col && $this->prop['scope'] !== "base")
> @ldap_sort($this->conn, $this->ldap_result, $this->sort_col);
>
264,280c265
< $entries = array();
< $entries['count'] = 0;
< if (is_array($this->ldap_result)) {
< // merge multiple ldap results into a single array
< foreach ($this->ldap_result as $ldr) {
< $single_result_entries = ldap_get_entries($this->conn, $ldr);
< for ($srindex=0; $srindex < $single_result_entries['count'];
$srindex++) {
< $entries[] = $single_result_entries[$srindex];
< $entries['count']++;
< }
< }
< } else {
< $entries = ldap_get_entries($this->conn, $this->ldap_result);
< }
< uasort($entries, array($this, 'sort_entries'));
< // array_merge will reindex the array after it is sorted by uasort
< $entries = array_merge($entries);
---
> $entries = ldap_get_entries($this->conn, $this->ldap_result);
288,292d272
< // this is used by uasort to sort the merged ldap results
< function sort_entries($a, $b) {
< return (strcmp ($a[$this->sort_col][0],$b[$this->sort_col][0]));
< }
<
363,370c343
< if (is_array($this->ldap_result)) {
< // sum counts for all ldap results
< foreach ($this->ldap_result as $ldr) {
< $count += ldap_count_entries($this->conn, $ldr);
< }
< } else {
< $count = ldap_count_entries($this->conn, $this->ldap_result);
< }
---
> $count = ldap_count_entries($this->conn, $this->ldap_result);
380,387c353
< if (is_array($this->ldap_result)) {
< // sum counts for all ldap results
< foreach ($this->ldap_result as $ldr) {
< $count += ldap_count_entries($this->conn, $ldr);
< }
< } else {
< $count = ldap_count_entries($this->conn, $this->ldap_result);
< }
---
> $count = ldap_count_entries($this->conn, $this->ldap_result);
580d545
< if ($this->filter == $this->prop['filter']) return false;
583,591d547
< if (is_array($this->prop['search_base_dn'])) {
< $conns = array();
< $bdindex = 0;
< foreach ($this->prop['search_base_dn'] as $basednval) {
< $conns[$bdindex++]=$this->conn;
< }
< } else {
< $conns = $this->conn;
< }
593c549
< $this->ldap_result = $function($conns,
$this->prop['search_base_dn'], $this->filter,
array_values($this->fieldmap), 0, 0);
---
> $this->ldap_result = $function($this->conn,
$this->prop['base_dn'], $this->filter, array_values($this->fieldmap), 0, 0);
640a597
>
_______________________________________________
List info: http://lists.roundcube.net/dev/
Here is the id_ID translation update for message.inc, please check this out.
--- 8< --- detachments --- 8< ---
The following attachments have been detached and are available for viewing.
http://detached.gigo.com/rc/RK/tV9Ohsm1/messages.inc
Only click these links if you trust the sender, as well as this message.
--- 8< --- detachments --- 8< ---
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
walking through roundcube's code I've found some room for small improvements.
if you sum them all together you may get some nice performance improvement
(not very huge - but you can probably notice it)
what I'm talking of are mainly style questions... because there are functions
in php that do the same as another function, with the small difference that
function X is faster
for example print() is slower than echo()
also double-quotes (") are up to 25% slower than concatenating strings
with single quotes (') - which is a HUGE performance boost
I've found a site which lists some of those functions - check [1]
I quickly compared the list with roundcube's codebase
those are the main places where there is still room for improvement:
* use ' instead of " (where possible - for example 'this is a test' . "\n"
would still be faster than "this is a test\n" - but you cannot replace
'"\n" by '\n')
* multiple parameters for echo - but most people prefer concatenating
over this multiple argument feature (I have to admit: I also prefer
string concatenation)
* pre-increment instead of post-increment (should be quite easy to do this,
since you need post-increment only in very few cases)
* unset() should be used more often (bigger task)
* use require() instead of require_once() - this is probably a bigger task too
one small note about [1]: afaik switch/case is faster than if/else
that site says the opposite
some of those things can be put into roundcube's codebase quite easily
maybe you can create some "Junior Jobs" section in your wiki, so bored
devs may write patches (which of course should be reviewed by an
experienced dev)
however, feel free to discuss this
oh, and I know: this whole mail is not mean for today's development...
but more something for the future
Regards,
Martin
[1] http://progtuts.info/55/php-optimization-tips/
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
I always read about localization updates on your mailing list
I started asking myself how translators know that they have
to translate something which was recently added?
do they check the interface and see "oh, there's text which is
not translated yet"?
or do they compare their locale with en_US ?
anyway, wouldn't it be easier if some (maybe I :)) wrote
some small PHP script that could easily compare multiple
localized include-files with each other?
if you want something like this feel free to tell me
Regards,
Martin
_______________________________________________
List info: http://lists.roundcube.net/dev/
Thanks Thomas!
The hook has meanwhile changed to "render_mailboxlist".
It works great on the mailbox list within the task "mail". It does not work on the subscription table.
Regards,
Roland
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
I’ve attached the patch for the completed pt_BR localization.
Att.
- Denis
--- 8< --- detachments --- 8< ---
The following attachments have been detached and are available for viewing.
http://detached.gigo.com/rc/Bf/a6SuCK11/pt_BR.patch
Only click these links if you trust the sender, as well as this message.
--- 8< --- detachments --- 8< ---
_______________________________________________
List info: http://lists.roundcube.net/dev/
Oops... Btw, please CC the list (always).
On Sat, Jul 4, 2009 at 10:50 PM, till<klimpong(a)gmail.com> wrote:
> On Sat, Jul 4, 2009 at 10:09 PM, Tiago Gomes<algodas(a)gmail.com> wrote:
>> yes, I do , but the cpu HIGH Over continued, any Idea ? it ´s normal ?
>
> I hope that means the database error is gone. ;-)
>
> In general, RoundCube doesn't cause high loads for me. I'd suggest you
> run xdebug and generate some cachegrind files (through xdebug's
> profiler) to figure out what is going on. There could be a number of
> things slowing the webserver down.
>
> http://xdebug.org/docs/profiler
>
> Till
>
_______________________________________________
List info: http://lists.roundcube.net/dev/
Is there a way to localize the "Archive" folder? Regards, Roland
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi all,
I think it might be a good idea to have a database table for
plugins.
If plugins needs to store some values currently this is
done
mostly by using 'users' table 'preferences' field.
I think it's
better to have a separate table.
The following structure should be
flexible enough. ------------------------------------------------------
CREATE TABLE IF NOT EXISTS `plugins` (
`id` int(11) NOT NULL
AUTO_INCREMENT,
`user_id` int(11) DEFAULT NULL,
`contact_id` int(11)
DEFAULT NULL,
`identity_id` int(11) DEFAULT NULL,
`plugin` text,
`key`
text,
`value` text,
`timestamp` timestamp NULL DEFAULT CURRENT_TIMESTAMP
ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT
CHARSET=latin1 AUTO_INCREMENT=1
;
-------------------------------------------------------- Any comments are
welcome. Regards, Roland
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi devs, just wondering if this is normal:
Jun 29 16:36:03 roundcube-test roundcube: PHP Fatal error: Allowed
memory size of 104857600 bytes exhausted (tried to allocate 17100392
bytes) in /data/WWW/roundcubemail-2493/program/lib/Net/SMTP.php on
line 831
This is a 12MB attachment. That shouldnt be needing a total memory
footprint of 100+ MB. I had to move our memory limit up to 200MB just
to be able to send a 12MB attachment.
Regards,
Cor
_______________________________________________
List info: http://lists.roundcube.net/dev/
Folks,
I'm experiencing a very odd issue with a custom plug-in using the
authenticate hook. Here at our university we use a Web based single sign
on authentication called CAS (http://www.jasig.org/cas). I am trying to
write a plug-in to allow CAS to work with Roundcube proxying a connection
through imapproxy (http://www.imapproxy.org/).
The normal operation for authentication for IMAP by CAS service is to get
a one time use CAS ticket for every authentication. Since RC stores and
reuses the initial password CAS cannot work in direction connection to the
IMAP server. This is not an issue because when we proxy through imapproxy,
it holds open the imap connection by password/username combination.
So everything should be working great and superficially it seems okay,
that is until you try and delete an e-mail. It seems that a delete will
call the authenticate hook again and grab a new CAS ticket. The new CAS
ticket breaks the imapproxy connection identifier because the password is
now different. In turn this causes rc to have a "lost imap connection"
error.
The way I look at it I have 2 possibilities:
1. Figure a way out to only request the CAS ticket once in the plugin.
I'm guessing do a check for existing ticket before requesting.
This is the quick fix, but feels like a "duct tape" solution for what
might be a larger issue in extending RC for alternative authentication
mechanisms.
2. Extend RC so that instead of caching a password, it uses a password
recall function that can has an exec handler for custom plug-ins
$rcmail->auth->getpass() returns a clear text password and has an exec
handler for password return. Default it would be an abstraction of the
decrypt session password to keep current functionality
The value with option two is it would allow plug-in authors to
authenticate to peripheral services like managesieve with out limiting
alternative authentication methods.
I've included the current sort of working plugin for anyones interest.
--
Robert King
System Administrator
Computing & Communications
Memorial University
--- 8< --- detachments --- 8< ---
The following attachments have been detached and are available for viewing.
http://detached.gigo.com/rc/BK/UGmCcQQp/casauth.php
Only click these links if you trust the sender, as well as this message.
--- 8< --- detachments --- 8< ---
_______________________________________________
List info: http://lists.roundcube.net/dev/
We have a few plugins for password change using different methods for
saving new password, but all of them have the same UI. I think it would
be better for localization and future maintenance to join them into one
plugin with many drivers. We need one function for password change, so
we can do this as simple as possible. Let's add drivers/ directory with
files sql.php, sasl.php, etc. and config option 'password_driver'. So,
everyone just could add his own driver function.
My second idea is to create hooks for rcube_user's email2user and
user2email functions. Then we could move current virtuser_* features
into 'virtuser' plugin. This plugin should also work as password above
with drivers for file, sql, or any callback.
--
Aleksander 'A.L.E.C' Machniak http://alec.pl gg:2275252
LAN Management System Developer http://lms.org.pl
Roundcube Webmail Developer http://roundcube.net
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
one note before you continue reading: I'm not familiar with xdebug yet
- so you may need to
re-verify me findings. also this mail is not a wish to immediately fix
some performance-lag,
but more some info to the developers/project managers so they can plan
correctly :)
because I was interested.. I installed xdebug today [1]
so.. I was cleaning up my mailbox and I deleted 200 messages (at once)
according to firebug this took ~60 seconds which is quite much...
then I did some tests... after checking xdebug's profiler output I
found something strange:
there were 745 queries made by rcube_mdb2->query (which calls _query
and this calls
the real MDB2 stuff...)
745 queries - and I just profiled the click on the delete button
(NOTE: the at this point the
messages were in folder X and now they were moved to "Trash")
NOTE: there was one huge call to rcube_imap->set_flag() which is because I have
$rcmail_config['read_when_deleted'] = TRUE; in my config
maybe this can also be optimized (not sure if it can be - but this
should have a lower
prio)
also read_when_deleted s a real performance-killer, I'll try to explain later
small break here: as I had message caching enabled I wanted to check
if really all messages
were in my (MySQL) DB.. looked fine
after like 10 seconds (deleting was still being done by roundcube) I
refreshed the phpMyAdmin
page... and what was that?
now there were less messages in the table than before.. - even if they
were just moved to
"Trash"
now.. I waited some seconds - and the row count started to rise again
let's try to explain so many database queries (NOTE: keep in mind I
had read_when_deleted
enabled):
when user deletes message 1 from mailbox X the following happens:
* $IMAP->set_flag($uids, 'SEEN'); reads and deletes all messages from
the caching table...
that already makes 400 queries
* (message being moved through IMAP)
* (message being parsed through IMAP)
* message being inserted into the cache table (in the DB) again - that
makes another 200
queries -> we're at a total of 600 now
plus some others (had no time yet to fully check this)
now.. I'm pretty sure that set_flag kills so much performance because
it removes the messages
from the cache. wouldn't it be easier to just update the header column
in the database? (ok,
I see it's needed that you unserialize the field.. change some value,
then serialize it again and
I'm not sure if that costs even more time)
also move_message() should do the same, currently it just gets the
mail from the caching table
and removes it from there (if it exists) - later it has to be inserted
into the DB again
I may do some more tests later.. feel free to suggest other parts which I could
profile :)
Regards,
Martin
[1] http://www.xdebug.org/docs/
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi all, ive seen several requests on the mailinglist and forums
concerning sorting by internaldate. Looking through the code there
seems to be pieces of code to facilitate this, but either I cant find
the way to actually set this, or it's not finished. For many imap
servers a SORT (ARRIVE) is orders of magnitude faster as all you need
to do is stat() the files. For SORT (DATE) you need to open every
single email (which can be tens of thousands), find the Date header,
then sort all of them. And all so you can find the 50 messages
roundcube wants to show.
I have a lot of experience with the customer side of this setting as
we have this set in our current webmail solution (squirrelmail). In
practice there is a percentage of customers that dont like sorting by
arrival date. They just dont understand why an email with an obvious
date thats older is sorted above an other email. So we have this
configurable, with a default of arrival date. That way you can
accommodate people that dont like this, while at the same time benefit
from the bulk of people that dont care.
It should be trivial to add a user-configurable option in roundcube to
allow sorting by arrival date. Id be more than happy to make a patch.
Would this be something of use to RC?
Cor
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hey Nik,
I am not sure if the GPL requires that. AFAIK, the GPL requires Linux
Magic to distribute the source code of their webmail when they sold it
to a customer. They are not allowed to encrypt the source, etc..
Furthermore, the GPL requires them to keep the copyright on all source
files, etc..
Last but not least -- customers of Linux Magic are allowed to put the
webmail app on BitTorrent or whatever. Thanks to the GPL. ;-) You may
distribute it for free and they couldn't do anything against it.
It really looks like they used at least our icon set, and I'm not sure
if they are allowed to do that. That might be a direct violation of
another license that was granted to the RoundCube project.
Do you know anyone who purchased it so we can double-check that?
Till
P.S.
I cc'ed our developer mailinglists.
On Wed, Jun 24, 2009 at 1:08 AM, Nik Dahl<nik(a)nwnexus.com> wrote:
> I received a sales call from a company called Linux Magic. The message they
> left was vague and gave no information about their company, and led me to
> believe that they were a client, not a salesperson. So I had to call them
> back. This irritated me, but while I was researching their company, I
> noticed that they sell a webmail product called Tuxedo for $189 that is
> based on RoundCube. But they do not offer any way to download free of
> charge, as required under the GPL.
>
>
>
> Is this not a violation of the GPL?
>
>
>
> More information on the product is available here:
> http://www.linuxmagic.com/products/tuxedo
>
>
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hello
I asked the list moderator if it was ok to post this to the group.
We have an entry-level CRM application and would like to integrate Roundcube
into it. We have the source code but have since moved on from the initial
develop who developed the application. They did this using a very basic
text based email engine, which does not have the functionality we require.
I have a looked at a number of webmail apps but Roundcube meets our
requirements.
What we would need would be to be to tie the address book into our contacts
sections, ideally we would like the webmail interface to sit within our
application.
We do not expect to get this service for free (L) and will come to a
commercial arrangement with the developer(s) who can help us out.
Regards and thanks for everyone's time
Hey David,
feel free to post to the developer mailing list. That's the easiest way to
get some people involved. :-)
Till
On Tue, Jun 23, 2009 at 12:34 PM, <depstein(a)zero27.co.za> wrote:
> Hello
>
> We are looking at integrating roundcube into an entry CRM application
> we have developed - where do you think I could locate a developer who
> could do this - I was thinking of posting to dev(a)lists.roundcube.net.
> - would this be appropriate?
>
> Thanks
>
> David
>
_______________________
David Epstein
_______________________________________________
List info: http://lists.roundcube.net/dev/
Hi,
as ticket #1485135 [1] suggests, javascript's native prompt() should be replaced
with a custom one.
I did a bit of research and I found Impromptu [2] seemed to do this job quite
well.
after some fiddling with the code I managed to get a nice-looking (at least
I think so -> but that doesn't count as I fail at any design/graphics tasks)
prompt dialog. A screenshot of it can be seen under [3]
my only problem is: to get this working, I had to refactor some code in
app.js (not much, but still enough that it could break something :))
Because of this I'm asking for someone who could review my code
and suggest what could've been done better. A patch against svn
trunk is provided under [4]
PS: I also think that the milestone for the ticket should be set to
0.4-beta, as it requires a bit more work than just replacing one
line in app.js
Regards,
Martin
[1] http://trac.roundcube.net/ticket/1485135
[2] http://trentrichardson.com/Impromptu/index.php
[3] http://img5.abload.de/img/rcppuje3.png
[4] http://pastebin.ca/1467910
_______________________________________________
List info: http://lists.roundcube.net/dev/