Author Topic: help with virtuser or default_host & username_domain arrays  (Read 3010 times)

Offline ArielZusya

  • Newbie
  • *
  • Posts: 2
I'm currently running 0.2alpha.

I'd like to configure roundcube with a dropdown menu on login with three different imap servers I use (one local, one gmail, one other). I can use:

Code: [Select]

$rcmail_config['default_host'] = array(
  'first.server.name' => 'LocalMail',
  'ssl://second.server.name:993' => 'OtherMail',
  'ssl://imap.gmail.com:993' => 'Secure GMail'
);


Which gives me the three imap servers but I'd like the proper smtp server configs to match up with each. Is there an easy way (or at least a way easy enough that a novice like me can thumb his way through) to do this? Thanks!

Update:
So... Here's where I'm struggling. I think I've got most of this working. I just got rid of the SMTP call alltogether and let the system use the PHP send function. However, what I really need to do is just not working form me.

The trouble is for some reason the main account on my hosted imap is set to username@mail.domain.com and when loging in the user just enters username but for all other accounts on the host they are set to username@domain.com and when logging in the user has to enter username@domain.com. I'd like to create an array with the various servers into which a user can login, and then create an array with the various domains to add or not add to the end of the username depending on what's selected from the first list. I tried this:

Code: [Select]

$rcmail_config['default_host'] = array(
  'mail.first.server' => 'RegAllUsers',
  'ssl://mail.first.server:993' => 'Secure RegUsers',
  'ssl://mail.first.server:993' => 'Secure MainUser',
  'ssl://mail.second.server:993' => 'Secure Ext1Mail',
  'ssl://imap.gmail.com:993' => 'Secure GMail'
);


and this a few lines later:

Code: [Select]

$rcmail_config['username_domain'] = array(
  'RegAllUsers' => '',
  'Secure RegUsers' => '@first.server',
  'Secure MainUser' => '',
  'Secure Ext1Mail' => '@mail.second.server',
  'Secure GMail' => '@gmail.com',
);


My thought was that I'd leave a RegAllUsers profile as a catchall which would require the regular users to use username@domain.com and the main user to use username. I would then have Secure RegUsers which would add the @first.server to the end of the username, Secure MainUser which wouldn't add anything, Secure Ext1Mail which would add @mail.second.server to the end and Secure GMail would would add @gmail.com to the end. Some of this worked. Here's what happened:

1) the drop down list on the login page only showed RegAllUsers, Secure MainUser, Secure Ext1Mail, and Secure GMail. No clue what happened to the Secure RegUsers except to say that perhaps roundcube saw the same server address twice and ignored the double entry.
2) all of the profiles that appeared on the drop down work as expected with the adding on of the appropriate @.

So... can this be fixed? Though I don't know much about it, should I be working all of this out with the virtuser option? I freely admit that this is all about laziness - not wanting to type out the corresponding @blah.blah after the username but I'd really like that functionality if possible. Your help is greatly appreciated!
« Last Edit: July 03, 2008, 11:29:36 AM by ArielZusya »