Roundcube Community Forum

Release Support => Pending Issues => Topic started by: Shadow1000 on September 03, 2024, 01:00:37 PM

Title: Multiple domain help issue
Post by: Shadow1000 on September 03, 2024, 01:00:37 PM

Issue Summary: Multiple Domain Configuration Using Different SMTP and IMAP Servers Not Working as Expected

Description:

I'm setting up Roundcube to handle multiple domains, each with distinct SMTP and IMAP servers. Despite specifying server details in host-specific configuration files, Roundcube defaults to `localhost` for IMAP authentication, leading to login failures.

Main Configuration (`config.inc.php`):

Code (php) Select
<?php

$config
['db_dsnw'] = 'database';

$config['support_url'] = '';

$config['ip_check'] = true;

$config['des_key'] = 'key';

$config['product_name'] = 'Webmail';

// Host-specific configuration
$config['include_host_config'] = array(
  
'yash-dj-films-and-studio.is-local.org' => 'ydfs_config.inc.php',
  
'codelabworks.is-cool.dev' => 'codelabworks_config.inc.php',
);

$config['mime_types'] = '/usr/home/mycodelab-mail/domains/mycodelab-mail.serv00.net/public_html/config/mime.types';

$config['plugins'] = [
  
'acl''archive''autologout''database_attachments''filesystem_attachments',
  
'jqueryui''managesieve''markasjunk''newmail_notifier''password'
  
'reconnect''redundant_attachments''show_additional_headers''userinfo'
  
'vcard_attachments''zipdownload'
];

$config['enable_spellcheck'] = true;

Host-Specific Configuration Files:

ydfs_config.inc.php

Code (php) Select
<?php

$config
['smtp_host'] = 'mail8.serv00.com';
$config['imap_host'] = 'mail8.serv00.com';

codelabworks_config.inc.php

Code (php) Select
<?php

$config
['smtp_host'] = 'mail10.serv00.com';
$config['imap_host'] = 'mail10.serv00.com';

Logs Indicating the Issue:

[03-Sep-2024 17:34:04 +0200]: <875285a6> IMAP Error: Login failed for [email protected] against localhost from 148.63.25.3. AUTHENTICATE PLAIN: Authentication failed. in /usr/home/mycodelab-mail/domains/mycodelab-mail.serv00.net/public_html/program/lib/Roundcube/rcube_imap.php on line 211 (POST /?_task=login&_action=login)
...
[03-Sep-2024 18:15:25 +0200]: <875285a6> IMAP Error: Login failed for [email protected] against localhost from 148.63.25.3. AUTHENTICATE PLAIN: Authentication failed. in /usr/home/mycodelab-mail/domains/mycodelab-mail.serv00.net/public_html/program/lib/Roundcube/rcube_imap.php on line 211 (POST /?_task=login&_action=login)

Steps to Reproduce:

1. Configure Roundcube for multiple domains with distinct SMTP and IMAP servers as shown above.
2. Attempt to log in using credentials for each domain.

Expected Behavior:

Roundcube should use the specified IMAP and SMTP servers (`mail8.serv00.com` and `mail10.serv00.com`) rather than defaulting to `localhost`.

Actual Behavior:

Roundcube tries to authenticate against `localhost`, resulting in repeated authentication failures.

Additional Information:

- This issue does not occur when only one domain and its corresponding SMTP/IMAP server are configured.

Request:

I would appreciate assistance in resolving why Roundcube defaults to `localhost` instead of using the specified server configurations for each domain.
Title: Re: Multiple domain setup
Post by: Shadow1000 on September 05, 2024, 03:06:17 PM
hello?
Title: Re: Multiple domain help issue
Post by: SKaero on September 05, 2024, 08:03:14 PM
If you create a php file in the Roundcube directory with the following what does it return?
1. <?php echo $_SERVER['HTTP_HOST']; ?><br />
2. <?php echo $_SERVER['SERVER_NAME']; ?><br />
3. <?php echo $_SERVER['SERVER_ADDR']; ?><br />