RainLoop / rainloop-webmail

Simple, modern & fast web-based email client
http://rainloop.net
MIT License
4.11k stars 891 forks source link

Adding wildcard Domain "*" as .ini file does not work properly #1986

Open DerGnomi opened 4 years ago

DerGnomi commented 4 years ago

RainLoop version, browser, OS: RainLoop Version: 1.12.0 OS: Debian 10

Expected behavior and actual behavior: I want to configure RainLoop automaticly without interactin with the adminpanel via ansible.

Expected: Adding *.ini file to /var/www/webmail/data/_data_/_default_/domains/ and getting a configured allowed login domain.

Actual: Adding .ini file to /var/www/webmail/data/_data_/_default_/domains/ and wildcard Domain " " is show but if you want to select it no pop-up opens. You even can add another " * " entry from the browsers admin config without getting the "This domain is already configured" Error.

Steps to reproduce the problem:

  1. Install RainLoop with "curl -sL https://repository.rainloop.net/installer.php | php"
  2. Setting the correct permissions to the files
  3. Add /var/www/webmail/data/_data_/_default_/domains/*.ini
  4. Curl the admin page to create initial config
  5. Open the admin panel and move to domains tab
  6. Try to select the wildcard domain.
DerGnomi commented 4 years ago
<?php                                                                                                                 
$_ENV['RAINLOOP_INCLUDE_AS_API'] = true;
include '/var/www/webmail/index.php';

$oActions = \RainLoop\Actions::NewInstance();
$oDomainProvider = $oActions->DomainProvider();
$oDomain = \RainLoop\Model\Domain::NewInstance('*', 'IMAPHOST',
  (int) '993', (int) '1',
  (int) '0', (int) '0', '', (int) '4190', '', 'SMTPHOST',
  (int) '25', (int) '2', (int) '0',
  (int) '0', (int) '0', '');
$oDomainProvider->Save($oDomain);

?>

This works for creating a domain via the API. Maybe someone else can use this if they run into the same problem.

thuanduongpa commented 3 years ago

Hi, I have same question, i need all domain can login this without error Domain is not allowed Any idea ? Thanks