Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure Roundcube can I first login roundcube with my information be set xxx@a.com instead of xxx@mail.a.com? #6635

Closed
jesseshihanxu opened this issue Feb 22, 2019 · 4 comments

Comments

@jesseshihanxu
Copy link

Roundcube version is v1.3.8 .Install setting: smtp server and imap server are both mail.a.com .

@alecpl
Copy link
Member

alecpl commented Feb 27, 2019

Check username_domain and mail_domain options (descriptions in defaults.inc.php).

@alecpl alecpl closed this as completed Feb 27, 2019
@jesseshihanxu
Copy link
Author

Check username_domain and mail_domain options (descriptions in defaults.inc.php).

Hi alecpl,I'm sorry for bothering you.Please help to check my setting,my config file is:

**// ----------------------------------
// IMAP
// ----------------------------------
// The mail host chosen to perform the log-in.
// Leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// Supported replacement variables:
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %s - domain name after the '@' from e-mail address provided at login screen
// For example %n = mail.domain.tld, %t = domain.tld
// WARNING: After hostname change update of mail_host column in users table is
//          required to match old user data records with the new host.
$config['default_host'] = 'mail.ctsig.com';

// ----------------------------------
// SMTP
// ----------------------------------
// SMTP server host (for sending mails).
// To use SSL/TLS connection, enter hostname with prefix ssl:// or tls://
// If left blank, the PHP mail() function is used
// Supported replacement variables:
// %h - user's IMAP hostname
// %n - hostname ($_SERVER['SERVER_NAME'])
// %t - hostname without the first part
// %d - domain (http hostname $_SERVER['HTTP_HOST'] without the first part)
// %z - IMAP domain (IMAP hostname without the first part)
// For example %n = mail.domain.tld, %t = domain.tld
$config['smtp_server'] = 'mail.ctsig.com';
// SMTP username (if required) if you use %u as the username Roundcube
// will use the current username for login
$config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password Roundcube
// will use the current user's password for login
$config['smtp_pass'] = '%p';**

What should I do? Thanks!

@loelkes
Copy link

loelkes commented Oct 16, 2020

I did not find any additional documentation about it and I had to try a bit to make it work.

$config['default_host'] = array(
        'ssl://mail.example.com' => 'example.com'
);

$config['mail_domain'] = array(
        'mail.example.com' => 'example.com'
);

This worked for me.

@melroy89
Copy link

melroy89 commented Feb 8, 2024

I did not find any additional documentation about it and I had to try a bit to make it work.

$config['default_host'] = array(
        'ssl://mail.example.com' => 'example.com'
);
$config['mail_domain'] = array(
        'mail.example.com' => 'example.com'
);

This worked for me.

This can be documented better IMO indeed.

Wiki does mention providing a list of imap hosts:

$config['imap_host'] = [
  'mail.example.com' => 'Default Server',
  'webmail.example.com' => 'Webmail Server',
  'ssl://mail.example.com:993' => 'Secure Webmail Server'
];

https://github.com/roundcube/roundcubemail/wiki/Configuration#imap-server-connection

However, nothing about setting mail_domain or default_host in this manner..?

EDIT: default_host i still mentioned in the defaults.inc.php, but should be renamed to imap_host if I'm not mistaken by the change log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants