Author Topic: How to set the IMAP server directory in Roundcube 1.1.2  (Read 9745 times)

Offline MarkEHansen

  • Jr. Member
  • **
  • Posts: 10
How to set the IMAP server directory in Roundcube 1.1.2
« on: September 20, 2015, 03:04:34 PM »
I've installed Roundcube 1.1.2 (complete version) on a CentOS 7.0 Linux host. It's up and running and I can view my e-mail from my IMAP server and send e-mail using my SMTP server, etc.

However, I can't figure out how to configure the IMAP server root directory. My searching keeps coming up with what look like old configuration methods which are no longer used. My mailbox list in the Roundcube client page shows the Inbox and what look like a fresh Sent and Trash mailboxes. Although the Inbox looks correct (all my e-mail is there), the Sent and Trash mailboxes appear to be new (they do not contain the messages in my actual Sent and Trash mailboxes).

For my other IMAP e-mail clients, I specify the IMAP server root directory as, for example, /home/{myuser}/Mail (where {myuser} is my user's login name). How do I specify this in the Roundcube configuration? Is there a configuration which I can set to "/home/%u/Mail" - where %u will be replaced by the user's login name?

Thanks for any help.

Offline MarkEHansen

  • Jr. Member
  • **
  • Posts: 10
Re: How to set the IMAP server directory in Roundcube 1.1.2
« Reply #1 on: September 20, 2015, 04:43:02 PM »
I've done some debugging and see that Roundcube is inspecting all the files in my user's home directory, recursively, when looking for mail folders. I really need it to look just in the Mail directory under my user's home directory. How do I configure this? In Thunderbird, for example, I provide the following configurations:

Code: [Select]
IMAP server directory: /home/meh/Mail/
[X] Show only subscribed folders
[X] Server supports folders that contain sub-folders and messages
[X]Use IDLE command if ther server supports it

These preferences specify the namespaces on your IMAP server:
  Personal namespace: "#mh/", "#mhinbox", ""
  Public (shared): "#public/", "#news.", "#ftp/", "#shared/"
  Other Users: "~"
[X] Allow server to override these namespaces

I provide the above to let you know that this is the configuration I think I'm trying to find for Roundcube.

I've been searching for quite some time and can't find anything which appears to resolve my issue.

Can someone please help?


Offline MarkEHansen

  • Jr. Member
  • **
  • Posts: 10
Re: How to set the IMAP server directory in Roundcube 1.1.2
« Reply #2 on: September 20, 2015, 10:26:26 PM »
My imap server is uw-imap (2007f-4), and my user's HOME directories contain a file named .mailboxlist, which contains a list of all the subscribed mailbox folders. This file is maintained by the IMAP server (or the client portion of it - I'm not really sure). All I know is that when I create a new mailbox in my IMAP client (Thunderbird, for example), this file is updated with the new mailbox entry.

I just noticed that when I log into the roundcube webmail client as one of my users, that user's .mailboxlist file gets cleared out (zero-length file) - poof. Contents are gone.

If I put the contents back (by hand, which takes a long time), then my other e-mail clients start working again, but if my user logs into Roundcube - poof: the contents are wiped out again.

Does Roundcube support the uw-imap IMAP server?

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,876
    • SKaero - Custom Roundcube development
Re: How to set the IMAP server directory in Roundcube 1.1.2
« Reply #3 on: September 21, 2015, 08:53:19 AM »
The way Roundcube configuration works now all of the config options are defined in the <RC root>/config/defaults.inc.php and you copy the settings that you want to change to the <RC root>/config/config.inc.php. If your mail server is using uw-imap I think you want to change the imap_vendor option to 'uw-imap'.
Code: [Select]
// If you know your imap's folder vendor, you can specify it here.
// Otherwise it will be determined automatically. Use lower-case
// identifiers, e.g. 'dovecot', 'cyrus', 'gmail', 'hmail', 'uw-imap'.
$config['imap_vendor'] = null;

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: How to set the IMAP server directory in Roundcube 1.1.2
« Reply #4 on: September 21, 2015, 12:21:27 PM »
imap_vendor option does not exist in 1.1, and even in git-master it does nothing for uw-imap.

Offline alec

  • Hero Member
  • *****
  • Posts: 1,363
Re: How to set the IMAP server directory in Roundcube 1.1.2
« Reply #5 on: September 21, 2015, 12:30:44 PM »
I just noticed that when I log into the roundcube webmail client as one of my users, that user's .mailboxlist file gets cleared out (zero-length file) - poof. Contents are gone.
UW-IMAP is a crap. Roundcube does not remove this file. Enable imap_debug in Roundcube to see exactly what's going on. There are many imap_* options in Roundcube but none allows you to force use of one folder as a folder hierarchy root. Maybe this will give you some clues http://trac.roundcube.net/ticket/1489181.

Offline MarkEHansen

  • Jr. Member
  • **
  • Posts: 10
Re: How to set the IMAP server directory in Roundcube 1.1.2
« Reply #6 on: September 21, 2015, 01:45:58 PM »
Are you saying that Roundcube doesn't support the ability to set the root of the mail folder hierarchy because it shouldn't have to? But my e-mail clients allow for this (I've used Seamonkey, Thunderbird and an IMAP e-mail client on Android - I can't recall the name just now).

I have to use uw-imap. Should I take from this that Roundcube is not compatible and I should not use it?

By the way, when I connect to uw-imap with my other IMAP clients, the .mailboxlist (subscribed folders) file is not destroyed. When I log into Roundcube webmail, the file is destroyed. I've turned on the imap debugging in the Roundcube configuration, but there is so much written to the file, I can't tell what it is that might be causing this file to be overwritten. Perhaps Roundcube is running out of memory trying to deal with all the "folders" and is unable to re-write the file properly?

If there is any way to get Roundcube to work with uw-imap, I would really appreciate any help.

Thanks,

Offline MarkEHansen

  • Jr. Member
  • **
  • Posts: 10
Re: How to set the IMAP server directory in Roundcube 1.1.2
« Reply #7 on: September 26, 2015, 08:16:04 PM »
First, thanks to everyone for trying to help. For those that would like to use Roundcube with uw-imap, I figured out how to get it working.

Basically, there's a configuration file used by the imap server, called /etc/c-client.cf. I added the following line to this file:
Code: [Select]
set mail-subdirectory Mailand now roundcube works.

It looks like the problems I was seeing (like the .mailboxlist files getting cleared out) were due to problems with the application trying to process all the files in my home directory. It was likely running out of memory and not handling the error well. Once I configured uw-imap to look in the "Mail" subdirectory, those problems went away. I just had to adjust my other IMAP clients to no longer specify the root of the mail directory (as now they will use the default) and they all still worked.

I hope this is helpful to others.

Offline Along-Hesitation

  • Newbie
  • *
  • Posts: 5
Re: How to set the IMAP server directory in Roundcube 1.1.2
« Reply #8 on: October 01, 2021, 01:56:34 PM »
You're a hero - but here I am to throw a wrench into the spokes:

Is there any way to apply this to just ONE mailbox?