Author Topic: how to set domain account different from IMAP server  (Read 4112 times)

Offline drafintech

  • Newbie
  • *
  • Posts: 2
how to set domain account different from IMAP server
« on: May 29, 2015, 11:41:28 AM »
Hi,
in both 1.0.5 and 1.1.1 I'm facing an issue:
We have an IMAP Server imap.something.it containing and lot of users such as tizio@asd.qwe.it.
During the configuration, I want that RoundCube creates entries in both users and identities tables with tizio@asd.qwe.it, but the only thing I reach out for is to have in both tables tizio@imap.something.it, that means that every user that first logs into the system must change his identity to send emails.

I looked for every possibile configuration property but I haven't found any suitable except making a very dirty hack to
program/include/rcmail.php:603 :
 if ($created = rcube_user::create($username, "asd.qwe.it")) {


Can you please guide me to a better solution?
Thanks in advance

Offline SKaero

  • Administrator
  • Hero Member
  • *****
  • Posts: 5,879
    • SKaero - Custom Roundcube development
Re: how to set domain account different from IMAP server
« Reply #1 on: May 29, 2015, 12:35:52 PM »
The username_domain config option should be set to "asd.qwe.it".

Offline drafintech

  • Newbie
  • *
  • Posts: 2
Re: how to set domain account different from IMAP server
« Reply #2 on: June 01, 2015, 06:07:13 AM »
It's already set to $config['username_domain'] = array('asd.qwe.it' => 'asd.qwe.it',); but it keeps creating the identity with imap.something.it
What can I do?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,850
Re: how to set domain account different from IMAP server
« Reply #3 on: June 01, 2015, 09:50:38 AM »
I think it should be the imap host as the key so `$config['username_domain'] = array('imap.something.it' => 'asd.qwe.it');` certainly having the same thing for key and value does not make sense. Also if you want them all to be asd.qwe.it then you do not need to define an array it can just be `$config['username_domain'] = 'asd.qwe.it';`
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦