Roundcube Community Forum

Miscellaneous => Roundcube Discussion => Topic started by: AzazelMango on November 27, 2025, 09:56:23 AM

Title: username.domain to just username
Post by: AzazelMango on November 27, 2025, 09:56:23 AM
Im trying to make it so you do not need the .domain when logging in but I am not aware of a way to do this.

Context, Im using a virtualmin panel
Title: Re: username.domain to just username
Post by: SKaero on November 27, 2025, 12:53:34 PM
If you only have one domain then you set the username_domain in Roundcube config.inc.php file:
// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
// 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['username_domain'] = '';
Title: Re: username.domain to just username
Post by: AzazelMango on November 29, 2025, 01:05:42 PM
no matter what I set it to, it does not allow me to only use the Username without the added .domain (i.e. azazelmango.azpost to azazelmango) Im genuinely at a loss here
Title: Re: username.domain to just username
Post by: SKaero on November 29, 2025, 01:41:29 PM
Just to be clear you are setting the config value in the <RC root>/config/config.inc.php?
Title: Re: username.domain to just username
Post by: AzazelMango on November 30, 2025, 01:26:17 PM
yes of course
Title: Re: username.domain to just username
Post by: SKaero on November 30, 2025, 07:51:15 PM
I'm not sure why that would be, you could enable imap_debug to see what Roundcube is sending to the server.
Title: Re: username.domain to just username
Post by: AzazelMango on December 01, 2025, 09:48:34 AM
Here is what I was able to log, doesnt seem very helpful but I may be mistaken.

[01-Dec-2025 14:08:27 +0000]: <gti8d2q7> [535C] C: A0001 AUTHENTICATE PLAIN ****** [53]
[01-Dec-2025 14:08:31 +0000]: <gti8d2q7> [535C] S: A0001 NO [AUTHENTICATIONFAILED] Authentication failed.
[01-Dec-2025 14:08:36 +0000]: <gti8d2q7> [73B6] Connecting to [DOMAIN REDACTED]:143...
[01-Dec-2025 14:08:36 +0000]: <gti8d2q7> [73B6] S: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ STARTTLS AUTH=PLAIN AUTH=LOGIN]
Dovecot (Ubuntu) ready.
[01-Dec-2025 14:08:36 +0000]: <gti8d2q7> [73B6] C: A0001 AUTHENTICATE PLAIN ****** [61]
[01-Dec-2025 14:08:44 +0000]: <gti8d2q7> [73B6] S: A0001 NO [AUTHENTICATIONFAILED] Authentication failed.
Title: Re: username.domain to just username
Post by: SKaero on December 01, 2025, 10:38:34 AM
The username and password where striped from the log for the plain authentication, so its not helpful. Maybe try enabling:
// Log successful/failed logins to <log_dir>/userlogins.log or to syslog
$config['log_logins'] = false;

That should have the username that is trying to login.