Hi Octavio,
I did a patch long time ago that added this functionality but it was done via a very simple RPC (Remote Procedure Call) to cleanly seperate the RC functionality from the change_password functionality (which is clearly in the IMAP side).
You can have a look at track Ticket #1484558,
http://trac.roundcube.net/ticket/1484558
In any case, it will probably be better to use the new plugin architecture that is surely coming (I haven't had a look in RC source code in a vereery long time, so I don't know how things are now!). The ticket was marked "later" since I guess it will be implemented as a plugin in a newer RC version.
Good luck!
Cheers,