Author Topic: Use email domain as host  (Read 2485 times)

Offline epsdomains

  • Newbie
  • *
  • Posts: 2
Use email domain as host
« on: March 05, 2014, 09:00:45 AM »
Hello.

I am very new to Roundcube and are evaluating it to replace atMail for our 2000+ webhosting customers with the following setup:

-> We will install Roundcube 1.0RC-1 on one central server, like webmail.webhsotingisp.xyz
-> Customers have different domain names and are spread over multiple email servers. All customers IMAP host are in the form mail.theirdomain.xyz.

We would like the customer to only need to specify the email adress (user@theirdomain.xyz) and their password, not having to specify the IMAP-host. We would then like Roundcube to automaticly strip the "user@" from the email adress and instead apply "mail." + the "theirdomain.xyz" to use as IMAP-server for the login. Mening, "user@theirdomain.xyz" will be using IMAP server mail.theirdomain.xyz and user something@domain.com will automaticly be directed to IMAP host mail.domain.com and so on.

Also, it would be great if the login domain could be checked agains a predefined list/db of allowed domains to log in, to prevent non-customers/spammers to abuse the system.

Has anyone done this and would it be possible? I have read the article at http://trac.roundcube.net/wiki/Howto_Config/Multidomains but it does not really solve the problem I think.

I got some PHP coding knowledge but might need some pointers on where in the code to look and what to change.

Thanks for any input.

Offline epsdomains

  • Newbie
  • *
  • Posts: 2
Re: Use email domain as host
« Reply #1 on: March 05, 2014, 09:44:11 AM »
I might have asked for help to fast and I have found solutions to both questions.

Email host can be specified within the config.inc.php:
$config['default_host'] = 'mail.%s';

...and a plugin to specify valid domains is already present:
http://myroundcube.com/myroundcube-plugins/domain_check-plugin

Sorry for my post, but perhaps this can help others.