Hi everyone,
I needed RoundCube to access shared folders on a Courier-IMAP server. I've seen a couple of posts / forum threads related to this, but no real solution.
If I change $rcmail_config['imap_root'] to 'shared', I can see them. But I needed to have both namespaces, 'INBOX' and 'shared', displayed in the folder list. Is there a way to do this? Or is it feasible to implement considering the current code structure? I'm willing to hack at it. ^^
Cheers, João Vale
Hi there.
João Vale wrote:
I needed RoundCube to access shared folders on a Courier-IMAP server. I've seen a couple of posts / forum threads related to this, but no real solution.
If I change $rcmail_config['imap_root'] to 'shared', I can see them. But I needed to have both namespaces, 'INBOX' and 'shared', displayed in the folder list. Is there a way to do this? Or is it feasible to implement considering the current code structure? I'm willing to hack at it. ^^
Are you willing to hack the PHP source or hit the (ignorant) PHP guys with a cluebat? The PHP imap module is limited/broken, since it doesn't support (read: expose) both mandatory imap RFC operations (like the CAPABILITIES command) and optional operations that depend on this part (like NAMESPACES). The latter is the right command to ask your (or mine..) courier-imap server for the global namespace, the shared folders namespace etc..
Ironically PHP _could_ support that with ridiculous ease: The imap library PHP uses (c-client) already supports/exposes both CAPABILTIES and NAMESPACES.. I reported the bug several times, it was never considered a bug but merely a request for enhancement and ignored for quite some time.
I have very limited C skills and never hacked the PHP code, so I hesitated to try it on my own yet. Anyone with more only _some_ practice on that field should be able to create a patch for that methods in merely 20 minutes..
Rant mode off, back to the basic problem: Currently the language PHP has limited IMAP support and therefor it's hard to support environments like yours or mine in applications that rely on/are written in PHP.
Regards, Ben
Please remember that RoundCube does not rely on the PHP imap extension!
If you're willing to have a look at the RoundCube code for this issue, you should start with program/include/rcube_imap.inc and program/lib/imap.inc where the IMAP communication is handled.
~Thomas
Benjamin Podszun wrote:
Hi there.
João Vale wrote:
I needed RoundCube to access shared folders on a Courier-IMAP server. I've seen a couple of posts / forum threads related to this, but no real solution.
If I change $rcmail_config['imap_root'] to 'shared', I can see them. But I needed to have both namespaces, 'INBOX' and 'shared', displayed in the folder list. Is there a way to do this? Or is it feasible to implement considering the current code structure? I'm willing to hack at it. ^^
Are you willing to hack the PHP source or hit the (ignorant) PHP guys with a cluebat? The PHP imap module is limited/broken, since it doesn't support (read: expose) both mandatory imap RFC operations (like the CAPABILITIES command) and optional operations that depend on this part (like NAMESPACES). The latter is the right command to ask your (or mine..) courier-imap server for the global namespace, the shared folders namespace etc..
Ironically PHP _could_ support that with ridiculous ease: The imap library PHP uses (c-client) already supports/exposes both CAPABILTIES and NAMESPACES.. I reported the bug several times, it was never considered a bug but merely a request for enhancement and ignored for quite some time.
I have very limited C skills and never hacked the PHP code, so I hesitated to try it on my own yet. Anyone with more only _some_ practice on that field should be able to create a patch for that methods in merely 20 minutes..
Rant mode off, back to the basic problem: Currently the language PHP has limited IMAP support and therefor it's hard to support environments like yours or mine in applications that rely on/are written in PHP.
Regards, Ben
Thomas Bruederli wrote:
Please remember that RoundCube does not rely on the PHP imap extension!
Thank you for pointing that out. So my rant was nearly useless, apart from the pointers to the NAMESPACE command. Which roundcube (in lib/imap.inc) already supports. My starting point to hack on this (I'll check if I understand the code good enough when I've called it a day here at work) would be the function iil_C_NameSpace - which parses the result of the NAMESPACE command (which returns a list of namespaces) and already uses the first result. I don't see that the code uses the other namespaces, specifically the shared folder namespace. It might either be missing and need some love or I just cannot find it right away..
If you're willing to have a look at the RoundCube code for this issue, you should start with program/include/rcube_imap.inc and program/lib/imap.inc where the IMAP communication is handled.
Thanks for you pointers. And great that you don't rely on that library. I just start considering RC for my server again.. ;-)
Regards, Ben
Benjamin Podszun wrote:
Hi there.
João Vale wrote:
I needed RoundCube to access shared folders on a Courier-IMAP server. I've seen a couple of posts / forum threads related to this, but no real solution.
If I change $rcmail_config['imap_root'] to 'shared', I can see them. But I needed to have both namespaces, 'INBOX' and 'shared', displayed in the folder list. Is there a way to do this? Or is it feasible to implement considering the current code structure? I'm willing to hack at it. ^^
Are you willing to hack the PHP source or hit the (ignorant) PHP guys with a cluebat? The PHP imap module is limited/broken, since it doesn't support (read: expose) both mandatory imap RFC operations (like the CAPABILITIES command) and optional operations that depend on this part (like NAMESPACES). The latter is the right command to ask your (or mine..) courier-imap server for the global namespace, the shared folders namespace etc..
Ironically PHP _could_ support that with ridiculous ease: The imap library PHP uses (c-client) already supports/exposes both CAPABILTIES and NAMESPACES.. I reported the bug several times, it was never considered a bug but merely a request for enhancement and ignored for quite some time.
I have very limited C skills and never hacked the PHP code, so I hesitated to try it on my own yet. Anyone with more only _some_ practice on that field should be able to create a patch for that methods in merely 20 minutes..
Rant mode off, back to the basic problem: Currently the language PHP has limited IMAP support and therefor it's hard to support environments like yours or mine in applications that rely on/are written in PHP.
Regards, Ben
!DSPAM:45e848fd313819860331630!
Ok. I'll look into it as time and college allows it. And report any progress. ^^
//Vale
On Fri, 2007-03-02 at 16:54 +0100, Thomas Bruederli wrote:
Please remember that RoundCube does not rely on the PHP imap extension!
If you're willing to have a look at the RoundCube code for this issue, you should start with program/include/rcube_imap.inc and program/lib/imap.inc where the IMAP communication is handled.
~Thomas
Benjamin Podszun wrote:
Hi there.
João Vale wrote:
I needed RoundCube to access shared folders on a Courier-IMAP server. I've seen a couple of posts / forum threads related to this, but no real solution.
If I change $rcmail_config['imap_root'] to 'shared', I can see them. But I needed to have both namespaces, 'INBOX' and 'shared', displayed in the folder list. Is there a way to do this? Or is it feasible to implement considering the current code structure? I'm willing to hack at it. ^^
Are you willing to hack the PHP source or hit the (ignorant) PHP guys with a cluebat? The PHP imap module is limited/broken, since it doesn't support (read: expose) both mandatory imap RFC operations (like the CAPABILITIES command) and optional operations that depend on this part (like NAMESPACES). The latter is the right command to ask your (or mine..) courier-imap server for the global namespace, the shared folders namespace etc..
Ironically PHP _could_ support that with ridiculous ease: The imap library PHP uses (c-client) already supports/exposes both CAPABILTIES and NAMESPACES.. I reported the bug several times, it was never considered a bug but merely a request for enhancement and ignored for quite some time.
I have very limited C skills and never hacked the PHP code, so I hesitated to try it on my own yet. Anyone with more only _some_ practice on that field should be able to create a patch for that methods in merely 20 minutes..
Rant mode off, back to the basic problem: Currently the language PHP has limited IMAP support and therefor it's hard to support environments like yours or mine in applications that rely on/are written in PHP.
Regards, Ben
Hi Sean.
Here are some explanations about .htaccess and error logging.
config/main.inc.php.dist that sets 'log_dir' to that directory. According to the installation guide you should make sure that the webserver can write to that log dir. With all these conditions met, the errors file will be create once the first error is logged. If this fails, PHP will write the errors to it's default error_log file.
URL. This is one of the reasons why we use .inc for included PHP files which are not subject to be executed directly. Since RoundCube is open source, everybody can get the source and analyze it and the FilesMatch section in .htaccess is not absolutely necessary. Nevertheless, direct access via webserver should not be allowed. This also includes auto-saving files from emacs (ending with ~).
As you can see, there are .htaccess files in 'temp' and 'logs' dirs which deny all access from outside.
If you use Apache and you have AllowOverride set for the RoundCube directory your log files should be save.
~Thomas
Sean N. Heukels wrote:
Found something strange in the code about error logging
<1> in main.inc the errors directory is defined, but this directory does not exist. Does PHP complain about this?
// set PHP error logging according to config if ($conf['debug_level'] & 1) { ini_set('log_errors', 1); ini_set('error_log', $conf['log_dir'].'/errors'); }
<2> In .htaccess in the root of roundcube there is a deny/allow statement for *.inc (suffix as .inc). Does this mean that if a user would know the directory format that he/she would be able to read/execute other file formats under the directory structure. For example files with the suffix php or log?
Kind regards, Sean
Sean N. Heukels wrote:
Hi there,
Out of interest.
Is there a specific reason why roundcube uses two cookies: sessid and sessauth? I understand sessauth is used in the DB backend, but why isnt the ID/UID used that is returned by start_session (sessid)
sessid represents the current session identifier which was generated using the PHP session functions. This ID remains the same during the whole session. sessauth is used to validate a request and has to match with the credentials saved in the current session record. This auth-hash changes every five minutes and should prevent from one steeling an active session cookie. See function rcmail_authenticate_session() in program/main.inc for more details.
~Thomas